blob: d48e8dcb64b8848eebfba6c4340835ba067b02df [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Peterson19a14882010-06-27 23:34:03 +00002# From configure.in Revision: 82090 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Matthias Kloseb9621712010-04-24 17:59:49 +00004# Generated by GNU Autoconf 2.65 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Matthias Kloseb9621712010-04-24 17:59:49 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
11# Inc.
12#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
220 BASH_ENV=/dev/null
221 ENV=/dev/null
222 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
223 export CONFIG_SHELL
224 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
225fi
226
227 if test x$as_have_required = xno; then :
228 $as_echo "$0: This script requires a shell more modern than all"
229 $as_echo "$0: the shells that I found on your system."
230 if test x${ZSH_VERSION+set} = xset ; then
231 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
232 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
233 else
234 $as_echo "$0: Please tell bug-autoconf@gnu.org and
235$0: http://bugs.python.org/ about your system, including
236$0: any error possibly output before this message. Then
237$0: install a modern shell, or manually run the script
238$0: under such a shell if you do have one."
239 fi
240 exit 1
241fi
242fi
243fi
244SHELL=${CONFIG_SHELL-/bin/sh}
245export SHELL
246# Unset more variables known to interfere with behavior of common tools.
247CLICOLOR_FORCE= GREP_OPTIONS=
248unset CLICOLOR_FORCE GREP_OPTIONS
249
250## --------------------- ##
251## M4sh Shell Functions. ##
252## --------------------- ##
253# as_fn_unset VAR
254# ---------------
255# Portably unset VAR.
256as_fn_unset ()
257{
258 { eval $1=; unset $1;}
259}
260as_unset=as_fn_unset
261
262# as_fn_set_status STATUS
263# -----------------------
264# Set $? to STATUS, without forking.
265as_fn_set_status ()
266{
267 return $1
268} # as_fn_set_status
269
270# as_fn_exit STATUS
271# -----------------
272# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
273as_fn_exit ()
274{
275 set +e
276 as_fn_set_status $1
277 exit $1
278} # as_fn_exit
279
280# as_fn_mkdir_p
281# -------------
282# Create "$as_dir" as a directory, including parents if necessary.
283as_fn_mkdir_p ()
284{
285
286 case $as_dir in #(
287 -*) as_dir=./$as_dir;;
288 esac
289 test -d "$as_dir" || eval $as_mkdir_p || {
290 as_dirs=
291 while :; do
292 case $as_dir in #(
293 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
294 *) as_qdir=$as_dir;;
295 esac
296 as_dirs="'$as_qdir' $as_dirs"
297 as_dir=`$as_dirname -- "$as_dir" ||
298$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
299 X"$as_dir" : 'X\(//\)[^/]' \| \
300 X"$as_dir" : 'X\(//\)$' \| \
301 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
302$as_echo X"$as_dir" |
303 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)[^/].*/{
308 s//\1/
309 q
310 }
311 /^X\(\/\/\)$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\).*/{
316 s//\1/
317 q
318 }
319 s/.*/./; q'`
320 test -d "$as_dir" && break
321 done
322 test -z "$as_dirs" || eval "mkdir $as_dirs"
323 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
324
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
363# as_fn_error ERROR [LINENO LOG_FD]
364# ---------------------------------
365# 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
367# script with status $?, using 1 if that was 0.
368as_fn_error ()
369{
370 as_status=$?; test $as_status -eq 0 && as_status=1
371 if test "$3"; then
372 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
374 fi
375 $as_echo "$as_me: error: $1" >&2
376 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.
537# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
538# 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
601LIBC
602LIBM
603HAVE_GETHOSTBYNAME
604HAVE_GETHOSTBYNAME_R
605HAVE_GETHOSTBYNAME_R_3_ARG
606HAVE_GETHOSTBYNAME_R_5_ARG
607HAVE_GETHOSTBYNAME_R_6_ARG
608LIBOBJS
609TRUE
610MACHDEP_OBJS
611DYNLOADFILE
612DLINCLDIR
613THREADOBJ
614LDLAST
615USE_THREAD_MODULE
616SIGNAL_OBJS
617USE_SIGNAL_MODULE
618LIBFFI_INCLUDEDIR
619PKG_CONFIG
620SHLIBS
621CFLAGSFORSHARED
622LINKFORSHARED
623CCSHARED
624BLDSHARED
625LDCXXSHARED
626LDSHARED
627SO
628LIBTOOL_CRUFT
629OTHER_LIBTOOL_OPT
630UNIVERSAL_ARCH_FLAGS
631BASECFLAGS
632OPT
633LN
634INSTALL_DATA
635INSTALL_SCRIPT
636INSTALL_PROGRAM
637SVNVERSION
638ARFLAGS
639AR
640RANLIB
641GNULD
642LINKCC
643RUNSHARED
644INSTSONAME
645LDLIBRARYDIR
646BLDLIBRARY
647DLLLIBRARY
648LDLIBRARY
649LIBRARY
650BUILDEXEEXT
651EGREP
652GREP
653CPP
654MAINCC
655CXX
656OBJEXT
657EXEEXT
658ac_ct_CC
659CPPFLAGS
660LDFLAGS
661CFLAGS
662CC
663EXPORT_MACOSX_DEPLOYMENT_TARGET
664CONFIGURE_MACOSX_DEPLOYMENT_TARGET
665SGI_ABI
666MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000667FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000668FRAMEWORKUNIXTOOLSPREFIX
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKALTINSTALLFIRST
671FRAMEWORKINSTALLLAST
672FRAMEWORKINSTALLFIRST
673PYTHONFRAMEWORKINSTALLDIR
674PYTHONFRAMEWORKPREFIX
675PYTHONFRAMEWORKDIR
676PYTHONFRAMEWORKIDENTIFIER
677PYTHONFRAMEWORK
678LIPO_32BIT_FLAGS
679ARCH_RUN_32BIT
680UNIVERSALSDK
681CONFIG_ARGS
682SOVERSION
683VERSION
684target_alias
685host_alias
686build_alias
687LIBS
688ECHO_T
689ECHO_N
690ECHO_C
691DEFS
692mandir
693localedir
694libdir
695psdir
696pdfdir
697dvidir
698htmldir
699infodir
700docdir
701oldincludedir
702includedir
703localstatedir
704sharedstatedir
705sysconfdir
706datadir
707datarootdir
708libexecdir
709sbindir
710bindir
711program_transform_name
712prefix
713exec_prefix
714PACKAGE_URL
715PACKAGE_BUGREPORT
716PACKAGE_STRING
717PACKAGE_VERSION
718PACKAGE_TARNAME
719PACKAGE_NAME
720PATH_SEPARATOR
721SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000722ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000723ac_user_opts='
724enable_option_checking
725enable_universalsdk
726with_universal_archs
727with_framework_name
728enable_framework
729with_gcc
730with_cxx_main
731with_suffix
732enable_shared
733enable_profiling
734with_pydebug
735with_libs
736with_system_expat
737with_system_ffi
738with_dbmliborder
739with_signal_module
740with_dec_threads
741with_threads
742with_thread
743enable_ipv6
744with_doc_strings
745with_tsc
746with_pymalloc
747with_valgrind
748with_wctype_functions
749with_fpectl
750with_libm
751with_libc
752enable_big_digits
753with_wide_unicode
754with_computed_gotos
755'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000756 ac_precious_vars='build_alias
757host_alias
758target_alias
759CC
760CFLAGS
761LDFLAGS
762LIBS
763CPPFLAGS
764CPP'
765
Guido van Rossum627b2d71993-12-24 10:39:16 +0000766
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000768ac_init_help=
769ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000770ac_unrecognized_opts=
771ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000772# The variables have the same names as the options, with
773# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000774cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000775exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000776no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000777no_recursion=
778prefix=NONE
779program_prefix=NONE
780program_suffix=NONE
781program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000782silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000783site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000786x_includes=NONE
787x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000788
789# Installation directory options.
790# These are left unexpanded so users can "make install exec_prefix=/foo"
791# and all the variables that are supposed to be based on exec_prefix
792# by default will actually change.
793# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000794# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000795bindir='${exec_prefix}/bin'
796sbindir='${exec_prefix}/sbin'
797libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000798datarootdir='${prefix}/share'
799datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000800sysconfdir='${prefix}/etc'
801sharedstatedir='${prefix}/com'
802localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000803includedir='${prefix}/include'
804oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000805docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
806infodir='${datarootdir}/info'
807htmldir='${docdir}'
808dvidir='${docdir}'
809pdfdir='${docdir}'
810psdir='${docdir}'
811libdir='${exec_prefix}/lib'
812localedir='${datarootdir}/locale'
813mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814
Guido van Rossum7f43da71994-08-01 12:15:30 +0000815ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000816ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000818do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819 # If the previous option needs an argument, assign it.
820 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822 ac_prev=
823 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000824 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826 case $ac_option in
827 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
828 *) ac_optarg=yes ;;
829 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831 # Accept the important Cygnus configure options, so we can diagnose typos.
832
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833 case $ac_dashdash$ac_option in
834 --)
835 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000837 -bindir | --bindir | --bindi | --bind | --bin | --bi)
838 ac_prev=bindir ;;
839 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841
842 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000845 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000847 -cache-file | --cache-file | --cache-fil | --cache-fi \
848 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
849 ac_prev=cache_file ;;
850 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
851 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000852 cache_file=$ac_optarg ;;
853
854 --config-cache | -C)
855 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000860 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000861
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
863 | --dataroo | --dataro | --datar)
864 ac_prev=datarootdir ;;
865 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
866 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
867 datarootdir=$ac_optarg ;;
868
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000870 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000872 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
873 as_fn_error "invalid feature name: $ac_useropt"
874 ac_useropt_orig=$ac_useropt
875 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
876 case $ac_user_opts in
877 *"
878"enable_$ac_useropt"
879"*) ;;
880 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
881 ac_unrecognized_sep=', ';;
882 esac
883 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884
885 -docdir | --docdir | --docdi | --doc | --do)
886 ac_prev=docdir ;;
887 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
888 docdir=$ac_optarg ;;
889
890 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
891 ac_prev=dvidir ;;
892 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
893 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894
895 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000896 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000897 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000898 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
899 as_fn_error "invalid feature name: $ac_useropt"
900 ac_useropt_orig=$ac_useropt
901 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
902 case $ac_user_opts in
903 *"
904"enable_$ac_useropt"
905"*) ;;
906 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
907 ac_unrecognized_sep=', ';;
908 esac
909 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
912 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
913 | --exec | --exe | --ex)
914 ac_prev=exec_prefix ;;
915 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
916 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
917 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
920 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000921 # Obsolete; use --with-gas.
922 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 -help | --help | --hel | --he | -h)
925 ac_init_help=long ;;
926 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
927 ac_init_help=recursive ;;
928 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
929 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930
931 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000936 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
937 ac_prev=htmldir ;;
938 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
939 | --ht=*)
940 htmldir=$ac_optarg ;;
941
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 -includedir | --includedir | --includedi | --included | --include \
943 | --includ | --inclu | --incl | --inc)
944 ac_prev=includedir ;;
945 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
946 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
949 -infodir | --infodir | --infodi | --infod | --info | --inf)
950 ac_prev=infodir ;;
951 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953
954 -libdir | --libdir | --libdi | --libd)
955 ac_prev=libdir ;;
956 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
959 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
960 | --libexe | --libex | --libe)
961 ac_prev=libexecdir ;;
962 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
963 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000964 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000965
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000966 -localedir | --localedir | --localedi | --localed | --locale)
967 ac_prev=localedir ;;
968 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
969 localedir=$ac_optarg ;;
970
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000972 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000973 ac_prev=localstatedir ;;
974 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000975 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977
978 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
979 ac_prev=mandir ;;
980 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984 # Obsolete; use --without-fp.
985 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989 no_create=yes ;;
990
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000991 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
992 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
993 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
996 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
997 | --oldin | --oldi | --old | --ol | --o)
998 ac_prev=oldincludedir ;;
999 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1000 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1001 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001003
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1005 ac_prev=prefix ;;
1006 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
1009 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1010 | --program-pre | --program-pr | --program-p)
1011 ac_prev=program_prefix ;;
1012 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1013 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1017 | --program-suf | --program-su | --program-s)
1018 ac_prev=program_suffix ;;
1019 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1020 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
1023 -program-transform-name | --program-transform-name \
1024 | --program-transform-nam | --program-transform-na \
1025 | --program-transform-n | --program-transform- \
1026 | --program-transform | --program-transfor \
1027 | --program-transfo | --program-transf \
1028 | --program-trans | --program-tran \
1029 | --progr-tra | --program-tr | --program-t)
1030 ac_prev=program_transform_name ;;
1031 -program-transform-name=* | --program-transform-name=* \
1032 | --program-transform-nam=* | --program-transform-na=* \
1033 | --program-transform-n=* | --program-transform-=* \
1034 | --program-transform=* | --program-transfor=* \
1035 | --program-transfo=* | --program-transf=* \
1036 | --program-trans=* | --program-tran=* \
1037 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001040 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1041 ac_prev=pdfdir ;;
1042 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1043 pdfdir=$ac_optarg ;;
1044
1045 -psdir | --psdir | --psdi | --psd | --ps)
1046 ac_prev=psdir ;;
1047 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1048 psdir=$ac_optarg ;;
1049
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1051 | -silent | --silent | --silen | --sile | --sil)
1052 silent=yes ;;
1053
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1055 ac_prev=sbindir ;;
1056 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1057 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
1060 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1061 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1062 | --sharedst | --shareds | --shared | --share | --shar \
1063 | --sha | --sh)
1064 ac_prev=sharedstatedir ;;
1065 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1066 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1067 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1068 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071 -site | --site | --sit)
1072 ac_prev=site ;;
1073 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1077 ac_prev=srcdir ;;
1078 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1082 | --syscon | --sysco | --sysc | --sys | --sy)
1083 ac_prev=sysconfdir ;;
1084 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1085 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1094 verbose=yes ;;
1095
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 -version | --version | --versio | --versi | --vers | -V)
1097 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
1099 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001100 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001101 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001102 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1103 as_fn_error "invalid package name: $ac_useropt"
1104 ac_useropt_orig=$ac_useropt
1105 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1106 case $ac_user_opts in
1107 *"
1108"with_$ac_useropt"
1109"*) ;;
1110 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1111 ac_unrecognized_sep=', ';;
1112 esac
1113 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001116 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001117 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001118 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1119 as_fn_error "invalid package name: $ac_useropt"
1120 ac_useropt_orig=$ac_useropt
1121 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1122 case $ac_user_opts in
1123 *"
1124"with_$ac_useropt"
1125"*) ;;
1126 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1127 ac_unrecognized_sep=', ';;
1128 esac
1129 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001131 --x)
1132 # Obsolete; use --with-x.
1133 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
1135 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1136 | --x-incl | --x-inc | --x-in | --x-i)
1137 ac_prev=x_includes ;;
1138 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1139 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141
1142 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1143 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1144 ac_prev=x_libraries ;;
1145 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1146 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
Matthias Kloseb9621712010-04-24 17:59:49 +00001149 -*) as_fn_error "unrecognized option: \`$ac_option'
1150Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151 ;;
1152
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 *=*)
1154 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1155 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001156 case $ac_envvar in #(
1157 '' | [0-9]* | *[!_$as_cr_alnum]* )
1158 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1159 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001160 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 export $ac_envvar ;;
1162
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001163 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001165 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001167 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 ;;
1170
1171 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001172done
1173
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001176 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177fi
1178
Matthias Kloseb9621712010-04-24 17:59:49 +00001179if test -n "$ac_unrecognized_opts"; then
1180 case $enable_option_checking in
1181 no) ;;
1182 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1183 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1184 esac
1185fi
1186
1187# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001188for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1189 datadir sysconfdir sharedstatedir localstatedir includedir \
1190 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1191 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001192do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001193 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001194 # Remove trailing slashes.
1195 case $ac_val in
1196 */ )
1197 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1198 eval $ac_var=\$ac_val;;
1199 esac
1200 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001202 [\\/$]* | ?:[\\/]* ) continue;;
1203 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001206done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001207
Martin v. Löwis11437992002-04-12 09:54:03 +00001208# There might be people who depend on the old broken behavior: `$host'
1209# used to hold the argument of --host etc.
1210# FIXME: To remove some day.
1211build=$build_alias
1212host=$host_alias
1213target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214
Martin v. Löwis11437992002-04-12 09:54:03 +00001215# FIXME: To remove some day.
1216if test "x$host_alias" != x; then
1217 if test "x$build_alias" = x; then
1218 cross_compiling=maybe
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 If a cross compiler is detected then cross compile mode will be used." >&2
1221 elif test "x$build_alias" != "x$host_alias"; then
1222 cross_compiling=yes
1223 fi
1224fi
1225
1226ac_tool_prefix=
1227test -n "$host_alias" && ac_tool_prefix=$host_alias-
1228
1229test "$silent" = yes && exec 6>/dev/null
1230
Guido van Rossum627b2d71993-12-24 10:39:16 +00001231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001232ac_pwd=`pwd` && test -n "$ac_pwd" &&
1233ac_ls_di=`ls -di .` &&
1234ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Matthias Kloseb9621712010-04-24 17:59:49 +00001235 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001236test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Matthias Kloseb9621712010-04-24 17:59:49 +00001237 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001238
1239
Guido van Rossum627b2d71993-12-24 10:39:16 +00001240# Find the source files, if location was not specified.
1241if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001243 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001244 ac_confdir=`$as_dirname -- "$as_myself" ||
1245$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1246 X"$as_myself" : 'X\(//\)[^/]' \| \
1247 X"$as_myself" : 'X\(//\)$' \| \
1248 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1249$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1251 s//\1/
1252 q
1253 }
1254 /^X\(\/\/\)[^/].*/{
1255 s//\1/
1256 q
1257 }
1258 /^X\(\/\/\)$/{
1259 s//\1/
1260 q
1261 }
1262 /^X\(\/\).*/{
1263 s//\1/
1264 q
1265 }
1266 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001268 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269 srcdir=..
1270 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001271else
1272 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001274if test ! -r "$srcdir/$ac_unique_file"; then
1275 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Matthias Kloseb9621712010-04-24 17:59:49 +00001276 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1279ac_abs_confdir=`(
Matthias Kloseb9621712010-04-24 17:59:49 +00001280 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001281 pwd)`
1282# When building in place, set srcdir=.
1283if test "$ac_abs_confdir" = "$ac_pwd"; then
1284 srcdir=.
1285fi
1286# Remove unnecessary trailing slashes from srcdir.
1287# Double slashes in file names in object file debugging info
1288# mess up M-x gdb in Emacs.
1289case $srcdir in
1290*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1291esac
1292for ac_var in $ac_precious_vars; do
1293 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1294 eval ac_env_${ac_var}_value=\$${ac_var}
1295 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1296 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1297done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001298
Martin v. Löwis11437992002-04-12 09:54:03 +00001299#
1300# Report the --help message.
1301#
1302if test "$ac_init_help" = "long"; then
1303 # Omit some internal or obsolete options to make the list less imposing.
1304 # This message is too long to be a string in the A/UX 3.1 sh.
1305 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001306\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001307
1308Usage: $0 [OPTION]... [VAR=VALUE]...
1309
1310To assign environment variables (e.g., CC, CFLAGS...), specify them as
1311VAR=VALUE. See below for descriptions of some of the useful variables.
1312
1313Defaults for the options are specified in brackets.
1314
1315Configuration:
1316 -h, --help display this help and exit
1317 --help=short display options specific to this package
1318 --help=recursive display the short help of all the included packages
1319 -V, --version display version information and exit
1320 -q, --quiet, --silent do not print \`checking...' messages
1321 --cache-file=FILE cache test results in FILE [disabled]
1322 -C, --config-cache alias for \`--cache-file=config.cache'
1323 -n, --no-create do not create output files
1324 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1325
Martin v. Löwis11437992002-04-12 09:54:03 +00001326Installation directories:
1327 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001328 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001329 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001330 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001331
1332By default, \`make install' will install all the files in
1333\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1334an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1335for instance \`--prefix=\$HOME'.
1336
1337For better control, use the options below.
1338
1339Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001340 --bindir=DIR user executables [EPREFIX/bin]
1341 --sbindir=DIR system admin executables [EPREFIX/sbin]
1342 --libexecdir=DIR program executables [EPREFIX/libexec]
1343 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1344 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1345 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1346 --libdir=DIR object code libraries [EPREFIX/lib]
1347 --includedir=DIR C header files [PREFIX/include]
1348 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1349 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1350 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1351 --infodir=DIR info documentation [DATAROOTDIR/info]
1352 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1353 --mandir=DIR man documentation [DATAROOTDIR/man]
1354 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1355 --htmldir=DIR html documentation [DOCDIR]
1356 --dvidir=DIR dvi documentation [DOCDIR]
1357 --pdfdir=DIR pdf documentation [DOCDIR]
1358 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001359_ACEOF
1360
1361 cat <<\_ACEOF
1362_ACEOF
1363fi
1364
1365if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001366 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001367 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001368 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001369 cat <<\_ACEOF
1370
1371Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001372 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1374 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001375 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001376 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001377 --enable-framework[=INSTALLDIR]
1378 Build (MacOSX|Darwin) framework
1379 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001380 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001381 --enable-ipv6 Enable ipv6 (with ipv4) support
1382 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001383 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001384 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001385
1386Optional Packages:
1387 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1388 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001389 --with-universal-archs=ARCH
1390 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001391 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001392 --with-framework-name=FRAMEWORK
1393 specify an alternate name of the framework built
1394 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001396 --with-cxx-main=<compiler>
1397 compile main() and link python executable with C++
1398 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001399 --with-suffix=.exe set executable suffix
1400 --with-pydebug build with Py_DEBUG defined
1401 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001402 --with-system-expat build pyexpat module using an installed expat
1403 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001404 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001405 --with-dbmliborder=db1:db2:...
1406 order to check db backends for dbm. Valid value is a
1407 colon separated string with the backend names
1408 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001409 --with-signal-module disable/enable signal module
1410 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1411 --with(out)-threads[=DIRECTORY]
1412 disable/enable thread support
1413 --with(out)-thread[=DIRECTORY]
1414 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001416 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001417 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001418 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --with-fpectl enable SIGFPE catching
1421 --with-libm=STRING math library
1422 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001423 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001424 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1425 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
1427Some influential environment variables:
1428 CC C compiler command
1429 CFLAGS C compiler flags
1430 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1431 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001432 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001434 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 CPP C preprocessor
1436
1437Use these variables to override the choices made by `configure' or to help
1438it to find libraries and programs with nonstandard names/locations.
1439
Georg Brandle2e15612009-05-20 18:25:10 +00001440Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001441_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001442ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001443fi
1444
1445if test "$ac_init_help" = "recursive"; then
1446 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001447 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001448 test -d "$ac_dir" ||
1449 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1450 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001451 ac_builddir=.
1452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453case "$ac_dir" in
1454.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1455*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001456 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001457 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001458 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001459 case $ac_top_builddir_sub in
1460 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1461 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1462 esac ;;
1463esac
1464ac_abs_top_builddir=$ac_pwd
1465ac_abs_builddir=$ac_pwd$ac_dir_suffix
1466# for backward compatibility:
1467ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001468
1469case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001470 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001472 ac_top_srcdir=$ac_top_builddir_sub
1473 ac_abs_top_srcdir=$ac_pwd ;;
1474 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476 ac_top_srcdir=$srcdir
1477 ac_abs_top_srcdir=$srcdir ;;
1478 *) # Relative name.
1479 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1480 ac_top_srcdir=$ac_top_build_prefix$srcdir
1481 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001482esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485 cd "$ac_dir" || { ac_status=$?; continue; }
1486 # Check for guested configure.
1487 if test -f "$ac_srcdir/configure.gnu"; then
1488 echo &&
1489 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1490 elif test -f "$ac_srcdir/configure"; then
1491 echo &&
1492 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001493 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001494 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 fi || ac_status=$?
1496 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001497 done
1498fi
1499
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001501if $ac_init_version; then
1502 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001503python configure 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +00001504generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001505
Matthias Kloseb9621712010-04-24 17:59:49 +00001506Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001507This configure script is free software; the Free Software Foundation
1508gives unlimited permission to copy, distribute and modify it.
1509_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001510 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001511fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001512
1513## ------------------------ ##
1514## Autoconf initialization. ##
1515## ------------------------ ##
1516
1517# ac_fn_c_try_compile LINENO
1518# --------------------------
1519# Try to compile conftest.$ac_ext, and return whether this succeeded.
1520ac_fn_c_try_compile ()
1521{
1522 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1523 rm -f conftest.$ac_objext
1524 if { { ac_try="$ac_compile"
1525case "(($ac_try" in
1526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1527 *) ac_try_echo=$ac_try;;
1528esac
1529eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1530$as_echo "$ac_try_echo"; } >&5
1531 (eval "$ac_compile") 2>conftest.err
1532 ac_status=$?
1533 if test -s conftest.err; then
1534 grep -v '^ *+' conftest.err >conftest.er1
1535 cat conftest.er1 >&5
1536 mv -f conftest.er1 conftest.err
1537 fi
1538 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1539 test $ac_status = 0; } && {
1540 test -z "$ac_c_werror_flag" ||
1541 test ! -s conftest.err
1542 } && test -s conftest.$ac_objext; then :
1543 ac_retval=0
1544else
1545 $as_echo "$as_me: failed program was:" >&5
1546sed 's/^/| /' conftest.$ac_ext >&5
1547
1548 ac_retval=1
1549fi
1550 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1551 as_fn_set_status $ac_retval
1552
1553} # ac_fn_c_try_compile
1554
1555# ac_fn_c_try_cpp LINENO
1556# ----------------------
1557# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1558ac_fn_c_try_cpp ()
1559{
1560 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1561 if { { ac_try="$ac_cpp conftest.$ac_ext"
1562case "(($ac_try" in
1563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1564 *) ac_try_echo=$ac_try;;
1565esac
1566eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1567$as_echo "$ac_try_echo"; } >&5
1568 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1569 ac_status=$?
1570 if test -s conftest.err; then
1571 grep -v '^ *+' conftest.err >conftest.er1
1572 cat conftest.er1 >&5
1573 mv -f conftest.er1 conftest.err
1574 fi
1575 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1576 test $ac_status = 0; } >/dev/null && {
1577 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1578 test ! -s conftest.err
1579 }; then :
1580 ac_retval=0
1581else
1582 $as_echo "$as_me: failed program was:" >&5
1583sed 's/^/| /' conftest.$ac_ext >&5
1584
1585 ac_retval=1
1586fi
1587 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1588 as_fn_set_status $ac_retval
1589
1590} # ac_fn_c_try_cpp
1591
1592# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1593# -------------------------------------------------------
1594# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1595# the include files in INCLUDES and setting the cache variable VAR
1596# accordingly.
1597ac_fn_c_check_header_mongrel ()
1598{
1599 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1600 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1602$as_echo_n "checking for $2... " >&6; }
1603if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1604 $as_echo_n "(cached) " >&6
1605fi
1606eval ac_res=\$$3
1607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1608$as_echo "$ac_res" >&6; }
1609else
1610 # Is the header compilable?
1611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1612$as_echo_n "checking $2 usability... " >&6; }
1613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1614/* end confdefs.h. */
1615$4
1616#include <$2>
1617_ACEOF
1618if ac_fn_c_try_compile "$LINENO"; then :
1619 ac_header_compiler=yes
1620else
1621 ac_header_compiler=no
1622fi
1623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1625$as_echo "$ac_header_compiler" >&6; }
1626
1627# Is the header present?
1628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1629$as_echo_n "checking $2 presence... " >&6; }
1630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1631/* end confdefs.h. */
1632#include <$2>
1633_ACEOF
1634if ac_fn_c_try_cpp "$LINENO"; then :
1635 ac_header_preproc=yes
1636else
1637 ac_header_preproc=no
1638fi
1639rm -f conftest.err conftest.$ac_ext
1640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1641$as_echo "$ac_header_preproc" >&6; }
1642
1643# So? What about this header?
1644case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1645 yes:no: )
1646 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1647$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1648 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1649$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1650 ;;
1651 no:yes:* )
1652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1653$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1655$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1657$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1659$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1661$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1662( cat <<\_ASBOX
1663## -------------------------------------- ##
1664## Report this to http://bugs.python.org/ ##
1665## -------------------------------------- ##
1666_ASBOX
1667 ) | sed "s/^/$as_me: WARNING: /" >&2
1668 ;;
1669esac
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1671$as_echo_n "checking for $2... " >&6; }
1672if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1673 $as_echo_n "(cached) " >&6
1674else
1675 eval "$3=\$ac_header_compiler"
1676fi
1677eval ac_res=\$$3
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1679$as_echo "$ac_res" >&6; }
1680fi
1681 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1682
1683} # ac_fn_c_check_header_mongrel
1684
1685# ac_fn_c_try_run LINENO
1686# ----------------------
1687# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1688# that executables *can* be run.
1689ac_fn_c_try_run ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 if { { ac_try="$ac_link"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_link") 2>&5
1700 ac_status=$?
1701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1702 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1703 { { case "(($ac_try" in
1704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1705 *) ac_try_echo=$ac_try;;
1706esac
1707eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1708$as_echo "$ac_try_echo"; } >&5
1709 (eval "$ac_try") 2>&5
1710 ac_status=$?
1711 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1712 test $ac_status = 0; }; }; then :
1713 ac_retval=0
1714else
1715 $as_echo "$as_me: program exited with status $ac_status" >&5
1716 $as_echo "$as_me: failed program was:" >&5
1717sed 's/^/| /' conftest.$ac_ext >&5
1718
1719 ac_retval=$ac_status
1720fi
1721 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1722 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1723 as_fn_set_status $ac_retval
1724
1725} # ac_fn_c_try_run
1726
1727# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1728# -------------------------------------------------------
1729# Tests whether HEADER exists and can be compiled using the include files in
1730# INCLUDES, setting the cache variable VAR accordingly.
1731ac_fn_c_check_header_compile ()
1732{
1733 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1735$as_echo_n "checking for $2... " >&6; }
1736if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1737 $as_echo_n "(cached) " >&6
1738else
1739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1740/* end confdefs.h. */
1741$4
1742#include <$2>
1743_ACEOF
1744if ac_fn_c_try_compile "$LINENO"; then :
1745 eval "$3=yes"
1746else
1747 eval "$3=no"
1748fi
1749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1750fi
1751eval ac_res=\$$3
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1753$as_echo "$ac_res" >&6; }
1754 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1755
1756} # ac_fn_c_check_header_compile
1757
1758# ac_fn_c_try_link LINENO
1759# -----------------------
1760# Try to link conftest.$ac_ext, and return whether this succeeded.
1761ac_fn_c_try_link ()
1762{
1763 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1764 rm -f conftest.$ac_objext conftest$ac_exeext
1765 if { { ac_try="$ac_link"
1766case "(($ac_try" in
1767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1768 *) ac_try_echo=$ac_try;;
1769esac
1770eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1771$as_echo "$ac_try_echo"; } >&5
1772 (eval "$ac_link") 2>conftest.err
1773 ac_status=$?
1774 if test -s conftest.err; then
1775 grep -v '^ *+' conftest.err >conftest.er1
1776 cat conftest.er1 >&5
1777 mv -f conftest.er1 conftest.err
1778 fi
1779 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1780 test $ac_status = 0; } && {
1781 test -z "$ac_c_werror_flag" ||
1782 test ! -s conftest.err
1783 } && test -s conftest$ac_exeext && {
1784 test "$cross_compiling" = yes ||
1785 $as_test_x conftest$ac_exeext
1786 }; then :
1787 ac_retval=0
1788else
1789 $as_echo "$as_me: failed program was:" >&5
1790sed 's/^/| /' conftest.$ac_ext >&5
1791
1792 ac_retval=1
1793fi
1794 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1795 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1796 # interfere with the next link command; also delete a directory that is
1797 # left behind by Apple's compiler. We do this before executing the actions.
1798 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1799 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1800 as_fn_set_status $ac_retval
1801
1802} # ac_fn_c_try_link
1803
1804# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1805# -------------------------------------------
1806# Tests whether TYPE exists after having included INCLUDES, setting cache
1807# variable VAR accordingly.
1808ac_fn_c_check_type ()
1809{
1810 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1812$as_echo_n "checking for $2... " >&6; }
1813if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1814 $as_echo_n "(cached) " >&6
1815else
1816 eval "$3=no"
1817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1818/* end confdefs.h. */
1819$4
1820int
1821main ()
1822{
1823if (sizeof ($2))
1824 return 0;
1825 ;
1826 return 0;
1827}
1828_ACEOF
1829if ac_fn_c_try_compile "$LINENO"; then :
1830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1831/* end confdefs.h. */
1832$4
1833int
1834main ()
1835{
1836if (sizeof (($2)))
1837 return 0;
1838 ;
1839 return 0;
1840}
1841_ACEOF
1842if ac_fn_c_try_compile "$LINENO"; then :
1843
1844else
1845 eval "$3=yes"
1846fi
1847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1848fi
1849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1850fi
1851eval ac_res=\$$3
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1853$as_echo "$ac_res" >&6; }
1854 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1855
1856} # ac_fn_c_check_type
1857
1858# ac_fn_c_find_uintX_t LINENO BITS VAR
1859# ------------------------------------
1860# Finds an unsigned integer type with width BITS, setting cache variable VAR
1861# accordingly.
1862ac_fn_c_find_uintX_t ()
1863{
1864 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1866$as_echo_n "checking for uint$2_t... " >&6; }
1867if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1868 $as_echo_n "(cached) " >&6
1869else
1870 eval "$3=no"
1871 # Order is important - never check a type that is potentially smaller
1872 # than half of the expected target width.
1873 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1874 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1876/* end confdefs.h. */
1877$ac_includes_default
1878int
1879main ()
1880{
1881static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1882test_array [0] = 0
1883
1884 ;
1885 return 0;
1886}
1887_ACEOF
1888if ac_fn_c_try_compile "$LINENO"; then :
1889 case $ac_type in #(
1890 uint$2_t) :
1891 eval "$3=yes" ;; #(
1892 *) :
1893 eval "$3=\$ac_type" ;;
1894esac
1895fi
1896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1897 eval as_val=\$$3
1898 if test "x$as_val" = x""no; then :
1899
1900else
1901 break
1902fi
1903 done
1904fi
1905eval ac_res=\$$3
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1907$as_echo "$ac_res" >&6; }
1908 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1909
1910} # ac_fn_c_find_uintX_t
1911
1912# ac_fn_c_find_intX_t LINENO BITS VAR
1913# -----------------------------------
1914# Finds a signed integer type with width BITS, setting cache variable VAR
1915# accordingly.
1916ac_fn_c_find_intX_t ()
1917{
1918 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1920$as_echo_n "checking for int$2_t... " >&6; }
1921if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1922 $as_echo_n "(cached) " >&6
1923else
1924 eval "$3=no"
1925 # Order is important - never check a type that is potentially smaller
1926 # than half of the expected target width.
1927 for ac_type in int$2_t 'int' 'long int' \
1928 'long long int' 'short int' 'signed char'; do
1929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1930/* end confdefs.h. */
1931$ac_includes_default
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00001932 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001933int
1934main ()
1935{
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00001936static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001937test_array [0] = 0
1938
1939 ;
1940 return 0;
1941}
1942_ACEOF
1943if ac_fn_c_try_compile "$LINENO"; then :
1944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945/* end confdefs.h. */
1946$ac_includes_default
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00001947 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001948int
1949main ()
1950{
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00001951static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001952 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1953test_array [0] = 0
1954
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960
1961else
1962 case $ac_type in #(
1963 int$2_t) :
1964 eval "$3=yes" ;; #(
1965 *) :
1966 eval "$3=\$ac_type" ;;
1967esac
1968fi
1969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1970fi
1971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1972 eval as_val=\$$3
1973 if test "x$as_val" = x""no; then :
1974
1975else
1976 break
1977fi
1978 done
1979fi
1980eval ac_res=\$$3
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982$as_echo "$ac_res" >&6; }
1983 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1984
1985} # ac_fn_c_find_intX_t
1986
1987# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1988# --------------------------------------------
1989# Tries to find the compile-time value of EXPR in a program that includes
1990# INCLUDES, setting VAR accordingly. Returns whether the value could be
1991# computed
1992ac_fn_c_compute_int ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 if test "$cross_compiling" = yes; then
1996 # Depending upon the size, compute the lo and hi bounds.
1997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) >= 0)];
2004test_array [0] = 0
2005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 ac_lo=0 ac_mid=0
2012 while :; do
2013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2020test_array [0] = 0
2021
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 ac_hi=$ac_mid; break
2028else
2029 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2030 if test $ac_lo -le $ac_mid; then
2031 ac_lo= ac_hi=
2032 break
2033 fi
2034 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2035fi
2036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2037 done
2038else
2039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h. */
2041$4
2042int
2043main ()
2044{
2045static int test_array [1 - 2 * !(($2) < 0)];
2046test_array [0] = 0
2047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 ac_hi=-1 ac_mid=-1
2054 while :; do
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2062test_array [0] = 0
2063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_lo=$ac_mid; break
2070else
2071 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2072 if test $ac_mid -le $ac_hi; then
2073 ac_lo= ac_hi=
2074 break
2075 fi
2076 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079 done
2080else
2081 ac_lo= ac_hi=
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086# Binary search between lo and hi bounds.
2087while test "x$ac_lo" != "x$ac_hi"; do
2088 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2090/* end confdefs.h. */
2091$4
2092int
2093main ()
2094{
2095static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2096test_array [0] = 0
2097
2098 ;
2099 return 0;
2100}
2101_ACEOF
2102if ac_fn_c_try_compile "$LINENO"; then :
2103 ac_hi=$ac_mid
2104else
2105 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108done
2109case $ac_lo in #((
2110?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2111'') ac_retval=1 ;;
2112esac
2113 else
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117static long int longval () { return $2; }
2118static unsigned long int ulongval () { return $2; }
2119#include <stdio.h>
2120#include <stdlib.h>
2121int
2122main ()
2123{
2124
2125 FILE *f = fopen ("conftest.val", "w");
2126 if (! f)
2127 return 1;
2128 if (($2) < 0)
2129 {
2130 long int i = longval ();
2131 if (i != ($2))
2132 return 1;
2133 fprintf (f, "%ld", i);
2134 }
2135 else
2136 {
2137 unsigned long int i = ulongval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%lu", i);
2141 }
2142 /* Do not output a trailing newline, as this causes \r\n confusion
2143 on some platforms. */
2144 return ferror (f) || fclose (f) != 0;
2145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_run "$LINENO"; then :
2151 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2152else
2153 ac_retval=1
2154fi
2155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2156 conftest.$ac_objext conftest.beam conftest.$ac_ext
2157rm -f conftest.val
2158
2159 fi
2160 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2161 as_fn_set_status $ac_retval
2162
2163} # ac_fn_c_compute_int
2164
2165# ac_fn_c_check_func LINENO FUNC VAR
2166# ----------------------------------
2167# Tests whether FUNC exists, setting the cache variable VAR accordingly
2168ac_fn_c_check_func ()
2169{
2170 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2172$as_echo_n "checking for $2... " >&6; }
2173if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2174 $as_echo_n "(cached) " >&6
2175else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2179 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2180#define $2 innocuous_$2
2181
2182/* System header to define __stub macros and hopefully few prototypes,
2183 which can conflict with char $2 (); below.
2184 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2185 <limits.h> exists even on freestanding compilers. */
2186
2187#ifdef __STDC__
2188# include <limits.h>
2189#else
2190# include <assert.h>
2191#endif
2192
2193#undef $2
2194
2195/* Override any GCC internal prototype to avoid an error.
2196 Use char because int might match the return type of a GCC
2197 builtin and then its argument prototype would still apply. */
2198#ifdef __cplusplus
2199extern "C"
2200#endif
2201char $2 ();
2202/* The GNU C library defines this for functions which it implements
2203 to always fail with ENOSYS. Some functions are actually named
2204 something starting with __ and the normal name is an alias. */
2205#if defined __stub_$2 || defined __stub___$2
2206choke me
2207#endif
2208
2209int
2210main ()
2211{
2212return $2 ();
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_link "$LINENO"; then :
2218 eval "$3=yes"
2219else
2220 eval "$3=no"
2221fi
2222rm -f core conftest.err conftest.$ac_objext \
2223 conftest$ac_exeext conftest.$ac_ext
2224fi
2225eval ac_res=\$$3
2226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2227$as_echo "$ac_res" >&6; }
2228 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2229
2230} # ac_fn_c_check_func
2231
2232# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2233# ----------------------------------------------------
2234# Tries to find if the field MEMBER exists in type AGGR, after including
2235# INCLUDES, setting cache variable VAR accordingly.
2236ac_fn_c_check_member ()
2237{
2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2240$as_echo_n "checking for $2.$3... " >&6; }
2241if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2242 $as_echo_n "(cached) " >&6
2243else
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h. */
2246$5
2247int
2248main ()
2249{
2250static $2 ac_aggr;
2251if (ac_aggr.$3)
2252return 0;
2253 ;
2254 return 0;
2255}
2256_ACEOF
2257if ac_fn_c_try_compile "$LINENO"; then :
2258 eval "$4=yes"
2259else
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
2262$5
2263int
2264main ()
2265{
2266static $2 ac_aggr;
2267if (sizeof ac_aggr.$3)
2268return 0;
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"; then :
2274 eval "$4=yes"
2275else
2276 eval "$4=no"
2277fi
2278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279fi
2280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2281fi
2282eval ac_res=\$$4
2283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2284$as_echo "$ac_res" >&6; }
2285 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2286
2287} # ac_fn_c_check_member
2288
2289# ac_fn_c_check_decl LINENO SYMBOL VAR
2290# ------------------------------------
2291# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2292ac_fn_c_check_decl ()
2293{
2294 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2296$as_echo_n "checking whether $2 is declared... " >&6; }
2297if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2298 $as_echo_n "(cached) " >&6
2299else
2300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2301/* end confdefs.h. */
2302$4
2303int
2304main ()
2305{
2306#ifndef $2
2307 (void) $2;
2308#endif
2309
2310 ;
2311 return 0;
2312}
2313_ACEOF
2314if ac_fn_c_try_compile "$LINENO"; then :
2315 eval "$3=yes"
2316else
2317 eval "$3=no"
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320fi
2321eval ac_res=\$$3
2322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2323$as_echo "$ac_res" >&6; }
2324 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2325
2326} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002327cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002328This file contains any messages produced by compilers while
2329running configure, to aid debugging if configure makes a mistake.
2330
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002331It was created by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +00002332generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002333
2334 $ $0 $@
2335
2336_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002337exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002338{
2339cat <<_ASUNAME
2340## --------- ##
2341## Platform. ##
2342## --------- ##
2343
2344hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2345uname -m = `(uname -m) 2>/dev/null || echo unknown`
2346uname -r = `(uname -r) 2>/dev/null || echo unknown`
2347uname -s = `(uname -s) 2>/dev/null || echo unknown`
2348uname -v = `(uname -v) 2>/dev/null || echo unknown`
2349
2350/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2351/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2352
2353/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2354/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2355/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002356/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002357/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2358/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2359/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2360
2361_ASUNAME
2362
2363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2364for as_dir in $PATH
2365do
2366 IFS=$as_save_IFS
2367 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002368 $as_echo "PATH: $as_dir"
2369 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002370IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002371
2372} >&5
2373
2374cat >&5 <<_ACEOF
2375
2376
2377## ----------- ##
2378## Core tests. ##
2379## ----------- ##
2380
2381_ACEOF
2382
2383
2384# Keep a trace of the command line.
2385# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002386# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002387# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002388# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002389ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002390ac_configure_args0=
2391ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002392ac_must_keep_next=false
2393for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002394do
Skip Montanaro6dead952003-09-25 14:50:04 +00002395 for ac_arg
2396 do
2397 case $ac_arg in
2398 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2399 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2400 | -silent | --silent | --silen | --sile | --sil)
2401 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002402 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002403 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002404 esac
2405 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002406 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002407 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002408 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002410 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002412 case $ac_arg in
2413 *=* | --config-cache | -C | -disable-* | --disable-* \
2414 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2415 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2416 | -with-* | --with-* | -without-* | --without-* | --x)
2417 case "$ac_configure_args0 " in
2418 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2419 esac
2420 ;;
2421 -* ) ac_must_keep_next=true ;;
2422 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002424 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 ;;
2426 esac
2427 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002428done
Matthias Kloseb9621712010-04-24 17:59:49 +00002429{ ac_configure_args0=; unset ac_configure_args0;}
2430{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002431
2432# When interrupted or exit'd, cleanup temporary files, and complete
2433# config.log. We remove comments because anyway the quotes in there
2434# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002435# WARNING: Use '\'' to represent an apostrophe within the trap.
2436# 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 +00002437trap 'exit_status=$?
2438 # Save into config.log some information that might help in debugging.
2439 {
2440 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002441
Martin v. Löwis11437992002-04-12 09:54:03 +00002442 cat <<\_ASBOX
2443## ---------------- ##
2444## Cache variables. ##
2445## ---------------- ##
2446_ASBOX
2447 echo
2448 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002449(
2450 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2451 eval ac_val=\$$ac_var
2452 case $ac_val in #(
2453 *${as_nl}*)
2454 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002455 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2456$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457 esac
2458 case $ac_var in #(
2459 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2461 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac ;;
2463 esac
2464 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2467 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 "s/'\''/'\''\\\\'\'''\''/g;
2470 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2471 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002472 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002474 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 esac |
2476 sort
2477)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002479
2480 cat <<\_ASBOX
2481## ----------------- ##
2482## Output variables. ##
2483## ----------------- ##
2484_ASBOX
2485 echo
2486 for ac_var in $ac_subst_vars
2487 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 eval ac_val=\$$ac_var
2489 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002490 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002492 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 done | sort
2494 echo
2495
2496 if test -n "$ac_subst_files"; then
2497 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498## ------------------- ##
2499## File substitutions. ##
2500## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002501_ASBOX
2502 echo
2503 for ac_var in $ac_subst_files
2504 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 eval ac_val=\$$ac_var
2506 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 done | sort
2511 echo
2512 fi
2513
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 if test -s confdefs.h; then
2515 cat <<\_ASBOX
2516## ----------- ##
2517## confdefs.h. ##
2518## ----------- ##
2519_ASBOX
2520 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 echo
2523 fi
2524 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 $as_echo "$as_me: caught signal $ac_signal"
2526 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 rm -f core *.core core.conftest.* &&
2529 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002532for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002533 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002534done
2535ac_signal=0
2536
2537# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002539
Matthias Kloseb9621712010-04-24 17:59:49 +00002540$as_echo "/* confdefs.h */" > confdefs.h
2541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542# Predefined preprocessor variables.
2543
2544cat >>confdefs.h <<_ACEOF
2545#define PACKAGE_NAME "$PACKAGE_NAME"
2546_ACEOF
2547
Martin v. Löwis11437992002-04-12 09:54:03 +00002548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2550_ACEOF
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_VERSION "$PACKAGE_VERSION"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_STRING "$PACKAGE_STRING"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2562_ACEOF
2563
Matthias Kloseb9621712010-04-24 17:59:49 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_URL "$PACKAGE_URL"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568
2569# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002570# Prefer an explicitly selected file to automatically selected ones.
2571ac_site_file1=NONE
2572ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573if test -n "$CONFIG_SITE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002576 ac_site_file1=$prefix/share/config.site
2577 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578else
Matthias Kloseb9621712010-04-24 17:59:49 +00002579 ac_site_file1=$ac_default_prefix/share/config.site
2580 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002582for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583do
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 test "x$ac_site_file" = xNONE && continue
2585 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2586 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2587$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002589 . "$ac_site_file"
2590 fi
2591done
2592
2593if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 # Some versions of bash will fail to source /dev/null (special files
2595 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2596 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2597 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2598$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2601 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 esac
2603 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604else
Matthias Kloseb9621712010-04-24 17:59:49 +00002605 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2606$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 >$cache_file
2608fi
2609
2610# Check that the precious variables saved in the cache have kept the same
2611# value.
2612ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2615 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2617 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 case $ac_old_set,$ac_new_set in
2619 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2621$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 +00002622 ac_cache_corrupted=: ;;
2623 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002624 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2625$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 ac_cache_corrupted=: ;;
2627 ,);;
2628 *)
2629 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 # differences in whitespace do not lead to failure.
2631 ac_old_val_w=`echo x $ac_old_val`
2632 ac_new_val_w=`echo x $ac_new_val`
2633 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2635$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2636 ac_cache_corrupted=:
2637 else
2638 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2639$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2640 eval $ac_var=\$ac_old_val
2641 fi
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2643$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2645$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 fi;;
2647 esac
2648 # Pass precious variables to config.status.
2649 if test "$ac_new_set" = set; then
2650 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 *) ac_arg=$ac_var=$ac_new_val ;;
2653 esac
2654 case " $ac_configure_args " in
2655 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002656 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 esac
2658 fi
2659done
2660if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002661 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2664$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2665 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002667## -------------------- ##
2668## Main body of script. ##
2669## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670
Guido van Rossum7f43da71994-08-01 12:15:30 +00002671ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002672ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002673ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2674ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2675ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002676
Guido van Rossum627b2d71993-12-24 10:39:16 +00002677
Michael W. Hudson54241132001-12-07 15:38:26 +00002678
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002679ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002680
2681
Martin v. Löwis11437992002-04-12 09:54:03 +00002682
Benjamin Petersond23f8222009-04-05 19:13:16 +00002683if test "$prefix" != "/"; then
2684 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2685fi
2686
2687
Martin v. Löwis11437992002-04-12 09:54:03 +00002688
2689
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002690# We don't use PACKAGE_ variables, and they cause conflicts
2691# with other autoconf-based packages that include Python.h
2692grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2693rm confdefs.h
2694mv confdefs.h.new confdefs.h
2695
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002696
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002697VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002698
Martin v. Löwis1142de32002-03-29 16:28:31 +00002699
2700SOVERSION=1.0
2701
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002702# The later defininition of _XOPEN_SOURCE disables certain features
2703# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2704
Matthias Kloseb9621712010-04-24 17:59:49 +00002705$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002706
2707
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002708# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2709# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2710# them.
2711
Matthias Kloseb9621712010-04-24 17:59:49 +00002712$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002713
2714
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002715# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2716# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2717# them.
2718
Matthias Kloseb9621712010-04-24 17:59:49 +00002719$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002720
2721
Martin v. Löwisd6320502004-08-12 13:45:08 +00002722# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2723# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2724
Matthias Kloseb9621712010-04-24 17:59:49 +00002725$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002726
2727
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002728# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2729# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2730# them.
2731
Matthias Kloseb9621712010-04-24 17:59:49 +00002732$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002733
2734
2735
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002736define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002737
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002738# Arguments passed to configure.
2739
2740CONFIG_ARGS="$ac_configure_args"
2741
Matthias Kloseb9621712010-04-24 17:59:49 +00002742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2743$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002744# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002745if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002746 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002747 case $enableval in
2748 yes)
2749 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002750 if test ! -d "${enableval}"
2751 then
2752 enableval=/
2753 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002754 ;;
2755 esac
2756 case $enableval in
2757 no)
2758 UNIVERSALSDK=
2759 enable_universalsdk=
2760 ;;
2761 *)
2762 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002763 if test ! -d "${UNIVERSALSDK}"
2764 then
Matthias Kloseb9621712010-04-24 17:59:49 +00002765 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002766 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002767 ;;
2768 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002769
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002770
Thomas Wouters477c8d52006-05-27 19:21:47 +00002771else
2772
2773 UNIVERSALSDK=
2774 enable_universalsdk=
2775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002776fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002777
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002778if test -n "${UNIVERSALSDK}"
2779then
Matthias Kloseb9621712010-04-24 17:59:49 +00002780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2781$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002782else
Matthias Kloseb9621712010-04-24 17:59:49 +00002783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2784$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002785fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002787
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002788
2789
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002790UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002791
Matthias Kloseb9621712010-04-24 17:59:49 +00002792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2793$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002794
2795# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002796if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002797 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2799$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002800 UNIVERSAL_ARCHS="$withval"
2801
2802else
2803
Matthias Kloseb9621712010-04-24 17:59:49 +00002804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2805$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002806
2807fi
2808
2809
2810
2811
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002812
2813# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002814if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002815 withval=$with_framework_name;
2816 PYTHONFRAMEWORK=${withval}
2817 PYTHONFRAMEWORKDIR=${withval}.framework
2818 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2819
2820else
2821
2822 PYTHONFRAMEWORK=Python
2823 PYTHONFRAMEWORKDIR=Python.framework
2824 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2825
2826fi
2827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002828# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002829if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002830 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002831 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002832 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002833 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002834 esac
2835 case $enableval in
2836 no)
2837 PYTHONFRAMEWORK=
2838 PYTHONFRAMEWORKDIR=no-framework
2839 PYTHONFRAMEWORKPREFIX=
2840 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002841 FRAMEWORKINSTALLFIRST=
2842 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002843 FRAMEWORKALTINSTALLFIRST=
2844 FRAMEWORKALTINSTALLLAST=
2845 if test "x${prefix}" = "xNONE"; then
2846 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2847 else
2848 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2849 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002850 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002851 ;;
2852 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002853 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002854 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002855 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002856 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002857 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2858 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002859 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002860
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002861 if test "x${prefix}" = "xNONE" ; then
2862 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002863
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002864 else
2865 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2866 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002867
2868 case "${enableval}" in
2869 /System*)
2870 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2871 if test "${prefix}" = "NONE" ; then
2872 # See below
2873 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2874 fi
2875 ;;
2876
2877 /Library*)
2878 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2879 ;;
2880
2881 */Library/Frameworks)
2882 MDIR="`dirname "${enableval}"`"
2883 MDIR="`dirname "${MDIR}"`"
2884 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2885
2886 if test "${prefix}" = "NONE"; then
2887 # User hasn't specified the
2888 # --prefix option, but wants to install
2889 # the framework in a non-default location,
2890 # ensure that the compatibility links get
2891 # installed relative to that prefix as well
2892 # instead of in /usr/local.
2893 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2894 fi
2895 ;;
2896
2897 *)
2898 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2899 ;;
2900 esac
2901
Jack Jansen127e56e2001-09-11 14:41:54 +00002902 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002903
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002904 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002905 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002906 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002908 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002909
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002910 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2911
2912 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2913
Jack Jansene578a632001-08-15 01:27:14 +00002914 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002915
Guido van Rossum563e7081996-09-10 18:20:48 +00002916else
Martin v. Löwis11437992002-04-12 09:54:03 +00002917
Jack Jansene578a632001-08-15 01:27:14 +00002918 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002919 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002920 PYTHONFRAMEWORKPREFIX=
2921 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002922 FRAMEWORKINSTALLFIRST=
2923 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002924 FRAMEWORKALTINSTALLFIRST=
2925 FRAMEWORKALTINSTALLLAST=
2926 if test "x${prefix}" = "xNONE" ; then
2927 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2928 else
2929 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2930 fi
Jack Jansene578a632001-08-15 01:27:14 +00002931 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002932
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002933
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002934fi
2935
Thomas Wouters477c8d52006-05-27 19:21:47 +00002936
2937
Michael W. Hudson54241132001-12-07 15:38:26 +00002938
2939
2940
2941
Jack Jansene578a632001-08-15 01:27:14 +00002942
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002943
2944
2945
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002946
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002947
Jack Jansene578a632001-08-15 01:27:14 +00002948##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002949## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002950## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002951##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002952# Set name for machine-dependent library files
2953
Matthias Kloseb9621712010-04-24 17:59:49 +00002954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2955$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002956if test -z "$MACHDEP"
2957then
Guido van Rossum563e7081996-09-10 18:20:48 +00002958 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002959 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002960 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002961 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002962 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002963 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002964 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002965 ac_md_system=`echo $ac_sys_system |
2966 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2967 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002968 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002969 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002970
Guido van Rossum07397971997-04-29 21:49:50 +00002971 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002972 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002973 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002974 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002975 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002976 esac
2977fi
Guido van Rossum91922671997-10-09 20:24:13 +00002978
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002979# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2980# disable features if it is defined, without any means to access these
2981# features as extensions. For these systems, we skip the definition of
2982# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2983# some feature, make sure there is no alternative way to access this
2984# feature. Also, when using wildcards, make sure you have verified the
2985# need for not defining _XOPEN_SOURCE on all systems matching the
2986# wildcard, and that the wildcard does not include future systems
2987# (which may remove their limitations).
2988case $ac_sys_system/$ac_sys_release in
2989 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2990 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002991 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002992 # In addition, Stefan Krah confirms that issue #1244610 exists through
2993 # OpenBSD 4.6, but is fixed in 4.7.
2994 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002995 define_xopen_source=no
2996 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2997 # also defined. This can be overridden by defining _BSD_SOURCE
2998 # As this has a different meaning on Linux, only define it on OpenBSD
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003001
3002 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003003 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003004 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3005 # also defined. This can be overridden by defining _BSD_SOURCE
3006 # As this has a different meaning on Linux, only define it on OpenBSD
3007
Matthias Kloseb9621712010-04-24 17:59:49 +00003008$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003009
3010 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003011 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3012 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3013 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003014 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 +00003015 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003016 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3017 # request to enable features supported by the standard as a request
3018 # to disable features not supported by the standard. The best way
3019 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3020 # entirely and define __EXTENSIONS__ instead.
3021 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003022 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003023 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3024 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003025 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003026 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003027 define_xopen_source=no;;
3028 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003029 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003030 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003031 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003032 # On FreeBSD 4, the math functions C89 does not cover are never defined
3033 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3034 FreeBSD/4.*)
3035 define_xopen_source=no;;
3036 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3037 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3038 # identifies itself as Darwin/7.*
3039 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3040 # disables platform specific features beyond repair.
3041 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3042 # has no effect, don't bother defining them
3043 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003044 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003045 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003046 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003047 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3048 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3049 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003050 AIX/4)
3051 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003052 AIX/5)
3053 if test `uname -r` -eq 1; then
3054 define_xopen_source=no
3055 fi
3056 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003057 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3058 # defining NI_NUMERICHOST.
3059 QNX/6.3.2)
3060 define_xopen_source=no
3061 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003062
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003063esac
3064
3065if test $define_xopen_source = yes
3066then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003067
Matthias Kloseb9621712010-04-24 17:59:49 +00003068$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003069
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003070
3071 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3072 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3073 # several APIs are not declared. Since this is also needed in some
3074 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003075
Matthias Kloseb9621712010-04-24 17:59:49 +00003076$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003077
3078
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003079
Matthias Kloseb9621712010-04-24 17:59:49 +00003080$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003081
3082
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003083fi
3084
Guido van Rossum91922671997-10-09 20:24:13 +00003085#
3086# SGI compilers allow the specification of the both the ABI and the
3087# ISA on the command line. Depending on the values of these switches,
3088# different and often incompatable code will be generated.
3089#
3090# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3091# thus supply support for various ABI/ISA combinations. The MACHDEP
3092# variable is also adjusted.
3093#
3094
3095if test ! -z "$SGI_ABI"
3096then
3097 CC="cc $SGI_ABI"
3098 LDFLAGS="$SGI_ABI $LDFLAGS"
3099 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3102$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003103
Jack Jansen6b08a402004-06-03 12:41:45 +00003104# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3105# it may influence the way we can build extensions, so distutils
3106# needs to check it
3107
Thomas Wouters477c8d52006-05-27 19:21:47 +00003108
Jack Jansen6b08a402004-06-03 12:41:45 +00003109CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003110EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003111
Matthias Kloseb9621712010-04-24 17:59:49 +00003112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3113$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003114ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3116$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003117
Guido van Rossum627b2d71993-12-24 10:39:16 +00003118# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003119
3120# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3121# for debug/optimization stuff. BASECFLAGS is for flags that are required
3122# just to get things to compile and link. Users are free to override OPT
3123# when running configure or make. The build should not break if they do.
3124# BASECFLAGS should generally not be messed with, however.
3125
3126# XXX shouldn't some/most/all of this code be merged with the stuff later
3127# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3129$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003130
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003131# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003132if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003133 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003134 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003135 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003136 without_gcc=yes;;
3137 yes) CC=gcc
3138 without_gcc=no;;
3139 *) CC=$withval
3140 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003141 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003142else
Martin v. Löwis11437992002-04-12 09:54:03 +00003143
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003144 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003145 AIX*) CC=cc_r
3146 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003147 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003148 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149fi
3150
Matthias Kloseb9621712010-04-24 17:59:49 +00003151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3152$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003153
Guido van Rossum8b131c51995-03-09 14:10:13 +00003154# If the user switches compilers, we can't believe the cache
3155if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3156then
Matthias Kloseb9621712010-04-24 17:59:49 +00003157 as_fn_error "cached CC is different -- throw away $cache_file
3158(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003159fi
3160
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003161# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3162# when the compiler supports them, but we don't always want -O2, and
3163# we set -g later.
3164if test -z "$CFLAGS"; then
3165 CFLAGS=
3166fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003167ac_ext=c
3168ac_cpp='$CPP $CPPFLAGS'
3169ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3170ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3171ac_compiler_gnu=$ac_cv_c_compiler_gnu
3172if test -n "$ac_tool_prefix"; then
3173 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3174set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3176$as_echo_n "checking for $ac_word... " >&6; }
3177if test "${ac_cv_prog_CC+set}" = set; then :
3178 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003179else
3180 if test -n "$CC"; then
3181 ac_cv_prog_CC="$CC" # Let the user override the test.
3182else
Martin v. Löwis11437992002-04-12 09:54:03 +00003183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3184for as_dir in $PATH
3185do
3186 IFS=$as_save_IFS
3187 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003188 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003189 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 +00003190 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003191 $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 +00003192 break 2
3193 fi
3194done
Matthias Kloseb9621712010-04-24 17:59:49 +00003195 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003196IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003197
Jack Jansendd19cf82001-12-06 22:36:17 +00003198fi
3199fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003200CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003201if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3203$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003204else
Matthias Kloseb9621712010-04-24 17:59:49 +00003205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3206$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003207fi
3208
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003209
Martin v. Löwis11437992002-04-12 09:54:03 +00003210fi
3211if test -z "$ac_cv_prog_CC"; then
3212 ac_ct_CC=$CC
3213 # Extract the first word of "gcc", so it can be a program name with args.
3214set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3216$as_echo_n "checking for $ac_word... " >&6; }
3217if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3218 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003219else
3220 if test -n "$ac_ct_CC"; then
3221 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3222else
3223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3224for as_dir in $PATH
3225do
3226 IFS=$as_save_IFS
3227 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003228 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003229 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 +00003230 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003231 $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 +00003232 break 2
3233 fi
3234done
Matthias Kloseb9621712010-04-24 17:59:49 +00003235 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003236IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003237
3238fi
3239fi
3240ac_ct_CC=$ac_cv_prog_ac_ct_CC
3241if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3243$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003244else
Matthias Kloseb9621712010-04-24 17:59:49 +00003245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3246$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003247fi
3248
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003249 if test "x$ac_ct_CC" = x; then
3250 CC=""
3251 else
3252 case $cross_compiling:$ac_tool_warned in
3253yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003254{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3255$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003256ac_tool_warned=yes ;;
3257esac
3258 CC=$ac_ct_CC
3259 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003260else
3261 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003262fi
3263
Jack Jansendd19cf82001-12-06 22:36:17 +00003264if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003265 if test -n "$ac_tool_prefix"; then
3266 # 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 +00003267set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3269$as_echo_n "checking for $ac_word... " >&6; }
3270if test "${ac_cv_prog_CC+set}" = set; then :
3271 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003272else
3273 if test -n "$CC"; then
3274 ac_cv_prog_CC="$CC" # Let the user override the test.
3275else
Martin v. Löwis11437992002-04-12 09:54:03 +00003276as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3277for as_dir in $PATH
3278do
3279 IFS=$as_save_IFS
3280 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003281 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003282 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 +00003283 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003284 $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 +00003285 break 2
3286 fi
3287done
Matthias Kloseb9621712010-04-24 17:59:49 +00003288 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003289IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003290
3291fi
3292fi
3293CC=$ac_cv_prog_CC
3294if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3296$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003297else
Matthias Kloseb9621712010-04-24 17:59:49 +00003298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3299$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003300fi
3301
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003302
Martin v. Löwis11437992002-04-12 09:54:03 +00003303 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003304fi
3305if test -z "$CC"; then
3306 # Extract the first word of "cc", so it can be a program name with args.
3307set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3309$as_echo_n "checking for $ac_word... " >&6; }
3310if test "${ac_cv_prog_CC+set}" = set; then :
3311 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003312else
3313 if test -n "$CC"; then
3314 ac_cv_prog_CC="$CC" # Let the user override the test.
3315else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003316 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003317as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3318for as_dir in $PATH
3319do
3320 IFS=$as_save_IFS
3321 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003322 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003323 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 +00003324 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3325 ac_prog_rejected=yes
3326 continue
3327 fi
3328 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003329 $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 +00003330 break 2
3331 fi
3332done
Matthias Kloseb9621712010-04-24 17:59:49 +00003333 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003334IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003335
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003336if test $ac_prog_rejected = yes; then
3337 # We found a bogon in the path, so make sure we never use it.
3338 set dummy $ac_cv_prog_CC
3339 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003340 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003341 # We chose a different compiler from the bogus one.
3342 # However, it has the same basename, so the bogon will be chosen
3343 # first if we set CC to just the basename; use the full file name.
3344 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003345 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003346 fi
3347fi
3348fi
3349fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003350CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003351if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3353$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003354else
Matthias Kloseb9621712010-04-24 17:59:49 +00003355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3356$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003357fi
3358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003359
Martin v. Löwis11437992002-04-12 09:54:03 +00003360fi
3361if test -z "$CC"; then
3362 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003363 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003364 do
3365 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3366set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3368$as_echo_n "checking for $ac_word... " >&6; }
3369if test "${ac_cv_prog_CC+set}" = set; then :
3370 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003371else
3372 if test -n "$CC"; then
3373 ac_cv_prog_CC="$CC" # Let the user override the test.
3374else
Martin v. Löwis11437992002-04-12 09:54:03 +00003375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3376for as_dir in $PATH
3377do
3378 IFS=$as_save_IFS
3379 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003380 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003381 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 +00003382 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003383 $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 +00003384 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003385 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003386done
Matthias Kloseb9621712010-04-24 17:59:49 +00003387 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003388IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003389
3390fi
3391fi
3392CC=$ac_cv_prog_CC
3393if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3395$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003396else
Matthias Kloseb9621712010-04-24 17:59:49 +00003397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3398$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003399fi
3400
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003401
Martin v. Löwis11437992002-04-12 09:54:03 +00003402 test -n "$CC" && break
3403 done
3404fi
3405if test -z "$CC"; then
3406 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003407 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003408do
3409 # Extract the first word of "$ac_prog", so it can be a program name with args.
3410set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3412$as_echo_n "checking for $ac_word... " >&6; }
3413if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3414 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003415else
3416 if test -n "$ac_ct_CC"; then
3417 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3418else
3419as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3420for as_dir in $PATH
3421do
3422 IFS=$as_save_IFS
3423 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003424 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003425 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 +00003426 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003427 $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 +00003428 break 2
3429 fi
3430done
Matthias Kloseb9621712010-04-24 17:59:49 +00003431 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003432IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003433
Martin v. Löwis11437992002-04-12 09:54:03 +00003434fi
3435fi
3436ac_ct_CC=$ac_cv_prog_ac_ct_CC
3437if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3439$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003440else
Matthias Kloseb9621712010-04-24 17:59:49 +00003441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3442$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003443fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003444
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003445
Martin v. Löwis11437992002-04-12 09:54:03 +00003446 test -n "$ac_ct_CC" && break
3447done
Michael W. Hudson54241132001-12-07 15:38:26 +00003448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003449 if test "x$ac_ct_CC" = x; then
3450 CC=""
3451 else
3452 case $cross_compiling:$ac_tool_warned in
3453yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003454{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3455$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003456ac_tool_warned=yes ;;
3457esac
3458 CC=$ac_ct_CC
3459 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003460fi
3461
3462fi
3463
3464
Matthias Kloseb9621712010-04-24 17:59:49 +00003465test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3466$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3467as_fn_error "no acceptable C compiler found in \$PATH
3468See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003469
3470# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003471$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3472set X $ac_compile
3473ac_compiler=$2
3474for ac_option in --version -v -V -qversion; do
3475 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003476case "(($ac_try" in
3477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3478 *) ac_try_echo=$ac_try;;
3479esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003480eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3481$as_echo "$ac_try_echo"; } >&5
3482 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003484 if test -s conftest.err; then
3485 sed '10a\
3486... rest of stderr output deleted ...
3487 10q' conftest.err >conftest.er1
3488 cat conftest.er1 >&5
3489 fi
3490 rm -f conftest.er1 conftest.err
3491 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3492 test $ac_status = 0; }
3493done
Martin v. Löwis11437992002-04-12 09:54:03 +00003494
Matthias Kloseb9621712010-04-24 17:59:49 +00003495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003496/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003497
Martin v. Löwis11437992002-04-12 09:54:03 +00003498int
3499main ()
3500{
3501
3502 ;
3503 return 0;
3504}
3505_ACEOF
3506ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003507ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003508# Try to create an executable without -o first, disregard a.out.
3509# It will help us diagnose broken compilers, and finding out an intuition
3510# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3512$as_echo_n "checking whether the C compiler works... " >&6; }
3513ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3514
3515# The possible output files:
3516ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003518ac_rmfiles=
3519for ac_file in $ac_files
3520do
3521 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003522 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003523 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3524 esac
3525done
3526rm -f $ac_rmfiles
3527
Matthias Kloseb9621712010-04-24 17:59:49 +00003528if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003529case "(($ac_try" in
3530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3531 *) ac_try_echo=$ac_try;;
3532esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003533eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3534$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003535 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003536 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003537 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3538 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003539 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3540# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3541# in a Makefile. We should not override ac_cv_exeext if it was cached,
3542# so that the user can short-circuit this test for compilers unknown to
3543# Autoconf.
3544for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003545do
3546 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003547 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003548 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003549 ;;
3550 [ab].out )
3551 # We found the default executable, but exeext='' is most
3552 # certainly right.
3553 break;;
3554 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003555 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003556 then :; else
3557 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3558 fi
3559 # We set ac_cv_exeext here because the later test for it is not
3560 # safe: cross compilers may not add the suffix if given an `-o'
3561 # argument, so we may need to know it at that point already.
3562 # Even if this section looks crufty: it has the advantage of
3563 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003564 break;;
3565 * )
3566 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 esac
3568done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003569test "$ac_cv_exeext" = no && ac_cv_exeext=
3570
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003571else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003572 ac_file=''
3573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003574if test -z "$ac_file"; then :
3575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3576$as_echo "no" >&6; }
3577$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003578sed 's/^/| /' conftest.$ac_ext >&5
3579
Matthias Kloseb9621712010-04-24 17:59:49 +00003580{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3581$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3582{ as_fn_set_status 77
3583as_fn_error "C compiler cannot create executables
3584See \`config.log' for more details." "$LINENO" 5; }; }
3585else
3586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3587$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3590$as_echo_n "checking for C compiler default output file name... " >&6; }
3591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3592$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003593ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003594
Matthias Kloseb9621712010-04-24 17:59:49 +00003595rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003596ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3598$as_echo_n "checking for suffix of executables... " >&6; }
3599if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003600case "(($ac_try" in
3601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3602 *) ac_try_echo=$ac_try;;
3603esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003604eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3605$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003606 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003607 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3609 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003610 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3611# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3612# work properly (i.e., refer to `conftest.exe'), while it won't with
3613# `rm'.
3614for ac_file in conftest.exe conftest conftest.*; do
3615 test -f "$ac_file" || continue
3616 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003617 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003618 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3619 break;;
3620 * ) break;;
3621 esac
3622done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003623else
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3625$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3626as_fn_error "cannot compute suffix of executables: cannot compile and link
3627See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003629rm -f conftest conftest$ac_cv_exeext
3630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3631$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003632
3633rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003634EXEEXT=$ac_cv_exeext
3635ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3637/* end confdefs.h. */
3638#include <stdio.h>
3639int
3640main ()
3641{
3642FILE *f = fopen ("conftest.out", "w");
3643 return ferror (f) || fclose (f) != 0;
3644
3645 ;
3646 return 0;
3647}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003649ac_clean_files="$ac_clean_files conftest.out"
3650# Check that the compiler produces executables we can run. If not, either
3651# the compiler is broken, or we cross compile.
3652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3653$as_echo_n "checking whether we are cross compiling... " >&6; }
3654if test "$cross_compiling" != yes; then
3655 { { ac_try="$ac_link"
3656case "(($ac_try" in
3657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3658 *) ac_try_echo=$ac_try;;
3659esac
3660eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3661$as_echo "$ac_try_echo"; } >&5
3662 (eval "$ac_link") 2>&5
3663 ac_status=$?
3664 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3665 test $ac_status = 0; }
3666 if { ac_try='./conftest$ac_cv_exeext'
3667 { { case "(($ac_try" in
3668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3669 *) ac_try_echo=$ac_try;;
3670esac
3671eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3672$as_echo "$ac_try_echo"; } >&5
3673 (eval "$ac_try") 2>&5
3674 ac_status=$?
3675 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3676 test $ac_status = 0; }; }; then
3677 cross_compiling=no
3678 else
3679 if test "$cross_compiling" = maybe; then
3680 cross_compiling=yes
3681 else
3682 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3684as_fn_error "cannot run C compiled programs.
3685If you meant to cross compile, use \`--host'.
3686See \`config.log' for more details." "$LINENO" 5; }
3687 fi
3688 fi
3689fi
3690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3691$as_echo "$cross_compiling" >&6; }
3692
3693rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3694ac_clean_files=$ac_clean_files_save
3695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3696$as_echo_n "checking for suffix of object files... " >&6; }
3697if test "${ac_cv_objext+set}" = set; then :
3698 $as_echo_n "(cached) " >&6
3699else
3700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003701/* end confdefs.h. */
3702
3703int
3704main ()
3705{
3706
3707 ;
3708 return 0;
3709}
3710_ACEOF
3711rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003712if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003713case "(($ac_try" in
3714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3715 *) ac_try_echo=$ac_try;;
3716esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003717eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3718$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003719 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003720 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3722 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723 for ac_file in conftest.o conftest.obj conftest.*; do
3724 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003725 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003726 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3728 break;;
3729 esac
3730done
3731else
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003733sed 's/^/| /' conftest.$ac_ext >&5
3734
Matthias Kloseb9621712010-04-24 17:59:49 +00003735{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3736$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3737as_fn_error "cannot compute suffix of object files: cannot compile
3738See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003739fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003740rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3743$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003744OBJEXT=$ac_cv_objext
3745ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3747$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3748if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3749 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003750else
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003753
Martin v. Löwis11437992002-04-12 09:54:03 +00003754int
3755main ()
3756{
3757#ifndef __GNUC__
3758 choke me
3759#endif
3760
3761 ;
3762 return 0;
3763}
3764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003765if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003766 ac_compiler_gnu=yes
3767else
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003771ac_cv_c_compiler_gnu=$ac_compiler_gnu
3772
3773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3775$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3776if test $ac_compiler_gnu = yes; then
3777 GCC=yes
3778else
3779 GCC=
3780fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003781ac_test_CFLAGS=${CFLAGS+set}
3782ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3784$as_echo_n "checking whether $CC accepts -g... " >&6; }
3785if test "${ac_cv_prog_cc_g+set}" = set; then :
3786 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003787else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788 ac_save_c_werror_flag=$ac_c_werror_flag
3789 ac_c_werror_flag=yes
3790 ac_cv_prog_cc_g=no
3791 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003793/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003794
Martin v. Löwis11437992002-04-12 09:54:03 +00003795int
3796main ()
3797{
3798
3799 ;
3800 return 0;
3801}
3802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003803if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003804 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003805else
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 CFLAGS=""
3807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808/* end confdefs.h. */
3809
3810int
3811main ()
3812{
3813
3814 ;
3815 return 0;
3816}
3817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003818if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003819
Matthias Kloseb9621712010-04-24 17:59:49 +00003820else
3821 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003822 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824/* end confdefs.h. */
3825
3826int
3827main ()
3828{
3829
3830 ;
3831 return 0;
3832}
3833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003834if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3842 ac_c_werror_flag=$ac_save_c_werror_flag
3843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3845$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003846if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003847 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003848elif test $ac_cv_prog_cc_g = yes; then
3849 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003850 CFLAGS="-g -O2"
3851 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003852 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003853 fi
3854else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003855 if test "$GCC" = yes; then
3856 CFLAGS="-O2"
3857 else
3858 CFLAGS=
3859 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3862$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3863if test "${ac_cv_prog_cc_c89+set}" = set; then :
3864 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003865else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003867ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003869/* end confdefs.h. */
3870#include <stdarg.h>
3871#include <stdio.h>
3872#include <sys/types.h>
3873#include <sys/stat.h>
3874/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3875struct buf { int x; };
3876FILE * (*rcsopen) (struct buf *, struct stat *, int);
3877static char *e (p, i)
3878 char **p;
3879 int i;
3880{
3881 return p[i];
3882}
3883static char *f (char * (*g) (char **, int), char **p, ...)
3884{
3885 char *s;
3886 va_list v;
3887 va_start (v,p);
3888 s = g (p, va_arg (v,int));
3889 va_end (v);
3890 return s;
3891}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003892
3893/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3894 function prototypes and stuff, but not '\xHH' hex character constants.
3895 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003897 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3898 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003900int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3901
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3903 inside strings and character constants. */
3904#define FOO(x) 'x'
3905int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3906
Skip Montanaro6dead952003-09-25 14:50:04 +00003907int test (int i, double x);
3908struct s1 {int (*f) (int a);};
3909struct s2 {int (*f) (double a);};
3910int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3911int argc;
3912char **argv;
3913int
3914main ()
3915{
3916return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3917 ;
3918 return 0;
3919}
3920_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003921for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3922 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003923do
3924 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003925 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003926 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928rm -f core conftest.err conftest.$ac_objext
3929 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003930done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003931rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003932CC=$ac_save_CC
3933
3934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935# AC_CACHE_VAL
3936case "x$ac_cv_prog_cc_c89" in
3937 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3939$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3942$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003943 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003944 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3946$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003947esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003948if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003949
Matthias Kloseb9621712010-04-24 17:59:49 +00003950fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003951
Martin v. Löwis11437992002-04-12 09:54:03 +00003952ac_ext=c
3953ac_cpp='$CPP $CPPFLAGS'
3954ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3955ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3956ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003957
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003958
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003959
3960
Matthias Kloseb9621712010-04-24 17:59:49 +00003961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3962$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003965if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003967
3968 case $withval in
3969 no) with_cxx_main=no
3970 MAINCC='$(CC)';;
3971 yes) with_cxx_main=yes
3972 MAINCC='$(CXX)';;
3973 *) with_cxx_main=yes
3974 MAINCC=$withval
3975 if test -z "$CXX"
3976 then
3977 CXX=$withval
3978 fi;;
3979 esac
3980else
3981
3982 with_cxx_main=no
3983 MAINCC='$(CC)'
3984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985fi
3986
Matthias Kloseb9621712010-04-24 17:59:49 +00003987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3988$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003989
3990preset_cxx="$CXX"
3991if test -z "$CXX"
3992then
3993 case "$CC" in
3994 gcc) # Extract the first word of "g++", so it can be a program name with args.
3995set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3997$as_echo_n "checking for $ac_word... " >&6; }
3998if test "${ac_cv_path_CXX+set}" = set; then :
3999 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004000else
4001 case $CXX in
4002 [\\/]* | ?:[\\/]*)
4003 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4004 ;;
4005 *)
4006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4007for as_dir in notfound
4008do
4009 IFS=$as_save_IFS
4010 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004011 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012 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 +00004013 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004014 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004015 break 2
4016 fi
4017done
Matthias Kloseb9621712010-04-24 17:59:49 +00004018 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004019IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004020
4021 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4022 ;;
4023esac
4024fi
4025CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004026if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4028$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004029else
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4031$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004033
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004034 ;;
4035 cc) # Extract the first word of "c++", so it can be a program name with args.
4036set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4038$as_echo_n "checking for $ac_word... " >&6; }
4039if test "${ac_cv_path_CXX+set}" = set; then :
4040 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004041else
4042 case $CXX in
4043 [\\/]* | ?:[\\/]*)
4044 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4045 ;;
4046 *)
4047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4048for as_dir in notfound
4049do
4050 IFS=$as_save_IFS
4051 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004053 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 +00004054 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004056 break 2
4057 fi
4058done
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004060IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004061
4062 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4063 ;;
4064esac
4065fi
4066CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004067if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4069$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004070else
Matthias Kloseb9621712010-04-24 17:59:49 +00004071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4072$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004074
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004075 ;;
4076 esac
4077 if test "$CXX" = "notfound"
4078 then
4079 CXX=""
4080 fi
4081fi
4082if test -z "$CXX"
4083then
4084 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4085do
4086 # Extract the first word of "$ac_prog", so it can be a program name with args.
4087set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4089$as_echo_n "checking for $ac_word... " >&6; }
4090if test "${ac_cv_prog_CXX+set}" = set; then :
4091 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004092else
4093 if test -n "$CXX"; then
4094 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4095else
4096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4097for as_dir in $PATH
4098do
4099 IFS=$as_save_IFS
4100 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004101 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004102 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 +00004103 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004105 break 2
4106 fi
4107done
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004109IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004110
4111fi
4112fi
4113CXX=$ac_cv_prog_CXX
4114if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4116$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004117else
Matthias Kloseb9621712010-04-24 17:59:49 +00004118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4119$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004120fi
4121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004122
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004123 test -n "$CXX" && break
4124done
4125test -n "$CXX" || CXX="notfound"
4126
4127 if test "$CXX" = "notfound"
4128 then
4129 CXX=""
4130 fi
4131fi
4132if test "$preset_cxx" != "$CXX"
4133then
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004135
4136 By default, distutils will build C++ extension modules with \"$CXX\".
4137 If this is not intended, then set CXX on the configure command line.
4138 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004139$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004140
4141 By default, distutils will build C++ extension modules with \"$CXX\".
4142 If this is not intended, then set CXX on the configure command line.
4143 " >&2;}
4144fi
4145
4146
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004147# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004148
4149ac_ext=c
4150ac_cpp='$CPP $CPPFLAGS'
4151ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4152ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4153ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4155$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004156# On Suns, sometimes $CPP names a directory.
4157if test -n "$CPP" && test -d "$CPP"; then
4158 CPP=
4159fi
4160if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 if test "${ac_cv_prog_CPP+set}" = set; then :
4162 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004163else
Martin v. Löwis11437992002-04-12 09:54:03 +00004164 # Double quotes because CPP needs to be expanded
4165 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4166 do
4167 ac_preproc_ok=false
4168for ac_c_preproc_warn_flag in '' yes
4169do
4170 # Use a header file that comes with gcc, so configuring glibc
4171 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004172 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4173 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004174 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004175 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004177/* end confdefs.h. */
4178#ifdef __STDC__
4179# include <limits.h>
4180#else
4181# include <assert.h>
4182#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004183 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004185if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004186
Matthias Kloseb9621712010-04-24 17:59:49 +00004187else
Martin v. Löwis11437992002-04-12 09:54:03 +00004188 # Broken: fails on valid input.
4189continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004191rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004192
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004193 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004194 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004197#include <ac_nonexistent.h>
4198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004199if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004200 # Broken: success on invalid input.
4201continue
4202else
Martin v. Löwis11437992002-04-12 09:54:03 +00004203 # Passes both tests.
4204ac_preproc_ok=:
4205break
4206fi
4207rm -f conftest.err conftest.$ac_ext
4208
4209done
4210# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4211rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004212if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004213 break
4214fi
4215
4216 done
4217 ac_cv_prog_CPP=$CPP
4218
4219fi
4220 CPP=$ac_cv_prog_CPP
4221else
4222 ac_cv_prog_CPP=$CPP
4223fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4225$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004226ac_preproc_ok=false
4227for ac_c_preproc_warn_flag in '' yes
4228do
4229 # Use a header file that comes with gcc, so configuring glibc
4230 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004231 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4232 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004233 # On the NeXT, cc -E runs the code through the compiler's parser,
4234 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004236/* end confdefs.h. */
4237#ifdef __STDC__
4238# include <limits.h>
4239#else
4240# include <assert.h>
4241#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004242 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004244if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004245
Matthias Kloseb9621712010-04-24 17:59:49 +00004246else
Martin v. Löwis11437992002-04-12 09:54:03 +00004247 # Broken: fails on valid input.
4248continue
4249fi
4250rm -f conftest.err conftest.$ac_ext
4251
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004253 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004256#include <ac_nonexistent.h>
4257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004258if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004259 # Broken: success on invalid input.
4260continue
4261else
Martin v. Löwis11437992002-04-12 09:54:03 +00004262 # Passes both tests.
4263ac_preproc_ok=:
4264break
4265fi
4266rm -f conftest.err conftest.$ac_ext
4267
4268done
4269# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4270rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004271if $ac_preproc_ok; then :
4272
Martin v. Löwis11437992002-04-12 09:54:03 +00004273else
Matthias Kloseb9621712010-04-24 17:59:49 +00004274 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4275$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4276as_fn_error "C preprocessor \"$CPP\" fails sanity check
4277See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004278fi
4279
4280ac_ext=c
4281ac_cpp='$CPP $CPPFLAGS'
4282ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4283ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4284ac_compiler_gnu=$ac_cv_c_compiler_gnu
4285
4286
Matthias Kloseb9621712010-04-24 17:59:49 +00004287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4288$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4289if test "${ac_cv_path_GREP+set}" = set; then :
4290 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004291else
Matthias Kloseb9621712010-04-24 17:59:49 +00004292 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004293 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004294 # Loop through the user's path and test for each of PROGNAME-LIST
4295 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004296for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4297do
4298 IFS=$as_save_IFS
4299 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004300 for ac_prog in grep ggrep; do
4301 for ac_exec_ext in '' $ac_executable_extensions; do
4302 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4303 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4304# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305 # Check for GNU $ac_path_GREP
4306case `"$ac_path_GREP" --version 2>&1` in
4307*GNU*)
4308 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4309*)
4310 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004311 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004312 while :
4313 do
4314 cat "conftest.in" "conftest.in" >"conftest.tmp"
4315 mv "conftest.tmp" "conftest.in"
4316 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004317 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004318 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4319 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004320 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4322 # Best one so far, save it but keep looking for a better one
4323 ac_cv_path_GREP="$ac_path_GREP"
4324 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004325 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326 # 10*(2^10) chars as input seems more than enough
4327 test $ac_count -gt 10 && break
4328 done
4329 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4330esac
4331
Matthias Kloseb9621712010-04-24 17:59:49 +00004332 $ac_path_GREP_found && break 3
4333 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004335 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004337 if test -z "$ac_cv_path_GREP"; then
4338 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4339 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340else
4341 ac_cv_path_GREP=$GREP
4342fi
4343
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4346$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347 GREP="$ac_cv_path_GREP"
4348
4349
Matthias Kloseb9621712010-04-24 17:59:49 +00004350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4351$as_echo_n "checking for egrep... " >&6; }
4352if test "${ac_cv_path_EGREP+set}" = set; then :
4353 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354else
4355 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4356 then ac_cv_path_EGREP="$GREP -E"
4357 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004360 # Loop through the user's path and test for each of PROGNAME-LIST
4361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4363do
4364 IFS=$as_save_IFS
4365 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 for ac_prog in egrep; do
4367 for ac_exec_ext in '' $ac_executable_extensions; do
4368 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4369 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4370# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371 # Check for GNU $ac_path_EGREP
4372case `"$ac_path_EGREP" --version 2>&1` in
4373*GNU*)
4374 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4375*)
4376 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004377 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 while :
4379 do
4380 cat "conftest.in" "conftest.in" >"conftest.tmp"
4381 mv "conftest.tmp" "conftest.in"
4382 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004383 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004384 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4385 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004386 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004387 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4388 # Best one so far, save it but keep looking for a better one
4389 ac_cv_path_EGREP="$ac_path_EGREP"
4390 ac_path_EGREP_max=$ac_count
4391 fi
4392 # 10*(2^10) chars as input seems more than enough
4393 test $ac_count -gt 10 && break
4394 done
4395 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4396esac
4397
Matthias Kloseb9621712010-04-24 17:59:49 +00004398 $ac_path_EGREP_found && break 3
4399 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004400 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004401 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004403 if test -z "$ac_cv_path_EGREP"; then
4404 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4405 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004406else
4407 ac_cv_path_EGREP=$EGREP
4408fi
4409
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004410 fi
4411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4413$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004414 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004415
4416
Matthias Kloseb9621712010-04-24 17:59:49 +00004417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4418$as_echo_n "checking for ANSI C header files... " >&6; }
4419if test "${ac_cv_header_stdc+set}" = set; then :
4420 $as_echo_n "(cached) " >&6
4421else
4422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004423/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004424#include <stdlib.h>
4425#include <stdarg.h>
4426#include <string.h>
4427#include <float.h>
4428
4429int
4430main ()
4431{
4432
4433 ;
4434 return 0;
4435}
4436_ACEOF
4437if ac_fn_c_try_compile "$LINENO"; then :
4438 ac_cv_header_stdc=yes
4439else
4440 ac_cv_header_stdc=no
4441fi
4442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4443
4444if test $ac_cv_header_stdc = yes; then
4445 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4447/* end confdefs.h. */
4448#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004449
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004450_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004452 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004453
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004454else
Matthias Kloseb9621712010-04-24 17:59:49 +00004455 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004456fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004457rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004458
Matthias Kloseb9621712010-04-24 17:59:49 +00004459fi
4460
4461if test $ac_cv_header_stdc = yes; then
4462 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4464/* end confdefs.h. */
4465#include <stdlib.h>
4466
4467_ACEOF
4468if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4469 $EGREP "free" >/dev/null 2>&1; then :
4470
4471else
4472 ac_cv_header_stdc=no
4473fi
4474rm -f conftest*
4475
4476fi
4477
4478if test $ac_cv_header_stdc = yes; then
4479 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4480 if test "$cross_compiling" = yes; then :
4481 :
4482else
4483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4484/* end confdefs.h. */
4485#include <ctype.h>
4486#include <stdlib.h>
4487#if ((' ' & 0x0FF) == 0x020)
4488# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4489# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4490#else
4491# define ISLOWER(c) \
4492 (('a' <= (c) && (c) <= 'i') \
4493 || ('j' <= (c) && (c) <= 'r') \
4494 || ('s' <= (c) && (c) <= 'z'))
4495# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4496#endif
4497
4498#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4499int
4500main ()
4501{
4502 int i;
4503 for (i = 0; i < 256; i++)
4504 if (XOR (islower (i), ISLOWER (i))
4505 || toupper (i) != TOUPPER (i))
4506 return 2;
4507 return 0;
4508}
4509_ACEOF
4510if ac_fn_c_try_run "$LINENO"; then :
4511
4512else
4513 ac_cv_header_stdc=no
4514fi
4515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4516 conftest.$ac_objext conftest.beam conftest.$ac_ext
4517fi
4518
4519fi
4520fi
4521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4522$as_echo "$ac_cv_header_stdc" >&6; }
4523if test $ac_cv_header_stdc = yes; then
4524
4525$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4526
4527fi
4528
4529# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4530for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4531 inttypes.h stdint.h unistd.h
4532do :
4533 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4534ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4535"
4536eval as_val=\$$as_ac_Header
4537 if test "x$as_val" = x""yes; then :
4538 cat >>confdefs.h <<_ACEOF
4539#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4540_ACEOF
4541
4542fi
4543
4544done
4545
4546
4547
4548 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4549if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4550 MINIX=yes
4551else
4552 MINIX=
4553fi
4554
4555
4556 if test "$MINIX" = yes; then
4557
4558$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4559
4560
4561$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4562
4563
4564$as_echo "#define _MINIX 1" >>confdefs.h
4565
4566 fi
4567
4568
4569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4570$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4571if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4572 $as_echo_n "(cached) " >&6
4573else
4574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4575/* end confdefs.h. */
4576
4577# define __EXTENSIONS__ 1
4578 $ac_includes_default
4579int
4580main ()
4581{
4582
4583 ;
4584 return 0;
4585}
4586_ACEOF
4587if ac_fn_c_try_compile "$LINENO"; then :
4588 ac_cv_safe_to_define___extensions__=yes
4589else
4590 ac_cv_safe_to_define___extensions__=no
4591fi
4592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4593fi
4594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4595$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4596 test $ac_cv_safe_to_define___extensions__ = yes &&
4597 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4598
4599 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4600
4601 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4602
4603 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4604
4605 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4606
4607
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004608
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004609# Check for unsupported systems
4610case $ac_sys_system/$ac_sys_release in
4611atheos*|Linux*/1*)
4612 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4613 echo See README for details.
4614 exit 1;;
4615esac
4616
4617
Matthias Kloseb9621712010-04-24 17:59:49 +00004618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4619$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004620
4621# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004622if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004623 withval=$with_suffix;
4624 case $withval in
4625 no) EXEEXT=;;
4626 yes) EXEEXT=.exe;;
4627 *) EXEEXT=$withval;;
4628 esac
4629fi
4630
Matthias Kloseb9621712010-04-24 17:59:49 +00004631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4632$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004633
4634# Test whether we're running on a non-case-sensitive system, in which
4635# case we give a warning if no ext is given
4636
Matthias Kloseb9621712010-04-24 17:59:49 +00004637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4638$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004639if test ! -d CaseSensitiveTestDir; then
4640mkdir CaseSensitiveTestDir
4641fi
4642
4643if test -d casesensitivetestdir
4644then
Matthias Kloseb9621712010-04-24 17:59:49 +00004645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4646$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004647 BUILDEXEEXT=.exe
4648else
Matthias Kloseb9621712010-04-24 17:59:49 +00004649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4650$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004651 BUILDEXEEXT=$EXEEXT
4652fi
4653rmdir CaseSensitiveTestDir
4654
4655case $MACHDEP in
4656bsdos*)
4657 case $CC in
4658 gcc) CC="$CC -D_HAVE_BSDI";;
4659 esac;;
4660esac
4661
4662case $ac_sys_system in
4663hp*|HP*)
4664 case $CC in
4665 cc|*/cc) CC="$CC -Ae";;
4666 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004667esac
4668
4669
4670
Matthias Kloseb9621712010-04-24 17:59:49 +00004671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4672$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004673if test -z "$LIBRARY"
4674then
4675 LIBRARY='libpython$(VERSION).a'
4676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4678$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004679
4680# LDLIBRARY is the name of the library to link against (as opposed to the
4681# name of the library into which to insert object files). BLDLIBRARY is also
4682# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4683# is blank as the main program is not linked directly against LDLIBRARY.
4684# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4685# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4686# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4687# DLLLIBRARY is the shared (i.e., DLL) library.
4688#
4689# RUNSHARED is used to run shared python without installed libraries
4690#
4691# INSTSONAME is the name of the shared library that will be use to install
4692# on the system - some systems like version suffix, others don't
4693
4694
4695
4696
4697
4698
4699LDLIBRARY="$LIBRARY"
4700BLDLIBRARY='$(LDLIBRARY)'
4701INSTSONAME='$(LDLIBRARY)'
4702DLLLIBRARY=''
4703LDLIBRARYDIR=''
4704RUNSHARED=''
4705
4706# LINKCC is the command that links the python executable -- default is $(CC).
4707# If CXX is set, and if it is needed to link a main function that was
4708# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4709# python might then depend on the C++ runtime
4710# This is altered for AIX in order to build the export list before
4711# linking.
4712
Matthias Kloseb9621712010-04-24 17:59:49 +00004713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4714$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004715if test -z "$LINKCC"
4716then
4717 LINKCC='$(PURIFY) $(MAINCC)'
4718 case $ac_sys_system in
4719 AIX*)
4720 exp_extra="\"\""
4721 if test $ac_sys_release -ge 5 -o \
4722 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4723 exp_extra="."
4724 fi
4725 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004726 QNX*)
4727 # qcc must be used because the other compilers do not
4728 # support -N.
4729 LINKCC=qcc;;
4730 esac
4731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4733$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004734
4735# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4736# make sure we default having it set to "no": this is used by
4737# distutils.unixccompiler to know if it should add --enable-new-dtags
4738# to linker command lines, and failing to detect GNU ld simply results
4739# in the same bahaviour as before.
4740
Matthias Kloseb9621712010-04-24 17:59:49 +00004741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4742$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004743ac_prog=ld
4744if test "$GCC" = yes; then
4745 ac_prog=`$CC -print-prog-name=ld`
4746fi
4747case `"$ac_prog" -V 2>&1 < /dev/null` in
4748 *GNU*)
4749 GNULD=yes;;
4750 *)
4751 GNULD=no;;
4752esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4754$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004755
Matthias Kloseb9621712010-04-24 17:59:49 +00004756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4757$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004758# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004759if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004760 enableval=$enable_shared;
4761fi
4762
4763
4764if test -z "$enable_shared"
4765then
4766 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004767 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004768 enable_shared="yes";;
4769 *)
4770 enable_shared="no";;
4771 esac
4772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4774$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004775
Matthias Kloseb9621712010-04-24 17:59:49 +00004776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4777$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004778# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004779if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004780 enableval=$enable_profiling; ac_save_cc="$CC"
4781 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004782 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004783 ac_enable_profiling="no"
4784else
Matthias Kloseb9621712010-04-24 17:59:49 +00004785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004786/* end confdefs.h. */
4787int main() { return 0; }
4788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004789if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004790 ac_enable_profiling="yes"
4791else
Matthias Kloseb9621712010-04-24 17:59:49 +00004792 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4795 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004796fi
4797
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004798 CC="$ac_save_cc"
4799fi
4800
Matthias Kloseb9621712010-04-24 17:59:49 +00004801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4802$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004803
4804case "$ac_enable_profiling" in
4805 "yes")
4806 BASECFLAGS="-pg $BASECFLAGS"
4807 LDFLAGS="-pg $LDFLAGS"
4808 ;;
4809esac
4810
Matthias Kloseb9621712010-04-24 17:59:49 +00004811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4812$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004813
4814# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4815# library that we build, but we do not want to link against it (we
4816# will find it with a -framework option). For this reason there is an
4817# extra variable BLDLIBRARY against which Python and the extension
4818# modules are linked, BLDLIBRARY. This is normally the same as
4819# LDLIBRARY, but empty for MacOSX framework builds.
4820if test "$enable_framework"
4821then
4822 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4823 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4824 BLDLIBRARY=''
4825else
4826 BLDLIBRARY='$(LDLIBRARY)'
4827fi
4828
4829# Other platforms follow
4830if test $enable_shared = "yes"; then
4831
Matthias Kloseb9621712010-04-24 17:59:49 +00004832$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004833
4834 case $ac_sys_system in
4835 CYGWIN*)
4836 LDLIBRARY='libpython$(VERSION).dll.a'
4837 DLLLIBRARY='libpython$(VERSION).dll'
4838 ;;
4839 SunOS*)
4840 LDLIBRARY='libpython$(VERSION).so'
4841 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4842 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4843 INSTSONAME="$LDLIBRARY".$SOVERSION
4844 ;;
4845 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4846 LDLIBRARY='libpython$(VERSION).so'
4847 BLDLIBRARY='-L. -lpython$(VERSION)'
4848 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4849 case $ac_sys_system in
4850 FreeBSD*)
4851 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4852 ;;
4853 esac
4854 INSTSONAME="$LDLIBRARY".$SOVERSION
4855 ;;
4856 hp*|HP*)
4857 case `uname -m` in
4858 ia64)
4859 LDLIBRARY='libpython$(VERSION).so'
4860 ;;
4861 *)
4862 LDLIBRARY='libpython$(VERSION).sl'
4863 ;;
4864 esac
4865 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4866 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4867 ;;
4868 OSF*)
4869 LDLIBRARY='libpython$(VERSION).so'
4870 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4871 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4872 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004873 Darwin*)
4874 LDLIBRARY='libpython$(VERSION).dylib'
4875 BLDLIBRARY='-L. -lpython$(VERSION)'
4876 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4877 ;;
4878
4879 esac
4880else # shared is disabled
4881 case $ac_sys_system in
4882 CYGWIN*)
4883 BLDLIBRARY='$(LIBRARY)'
4884 LDLIBRARY='libpython$(VERSION).dll.a'
4885 ;;
4886 esac
4887fi
4888
Matthias Kloseb9621712010-04-24 17:59:49 +00004889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4890$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004891
4892if test -n "$ac_tool_prefix"; then
4893 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4894set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4896$as_echo_n "checking for $ac_word... " >&6; }
4897if test "${ac_cv_prog_RANLIB+set}" = set; then :
4898 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004899else
4900 if test -n "$RANLIB"; then
4901 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4902else
4903as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4904for as_dir in $PATH
4905do
4906 IFS=$as_save_IFS
4907 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004908 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004909 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4910 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004911 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004912 break 2
4913 fi
4914done
Matthias Kloseb9621712010-04-24 17:59:49 +00004915 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004916IFS=$as_save_IFS
4917
4918fi
4919fi
4920RANLIB=$ac_cv_prog_RANLIB
4921if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4923$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004924else
Matthias Kloseb9621712010-04-24 17:59:49 +00004925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4926$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927fi
4928
4929
4930fi
4931if test -z "$ac_cv_prog_RANLIB"; then
4932 ac_ct_RANLIB=$RANLIB
4933 # Extract the first word of "ranlib", so it can be a program name with args.
4934set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4936$as_echo_n "checking for $ac_word... " >&6; }
4937if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4938 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004939else
4940 if test -n "$ac_ct_RANLIB"; then
4941 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4942else
4943as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4944for as_dir in $PATH
4945do
4946 IFS=$as_save_IFS
4947 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004948 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004949 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4950 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004951 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004952 break 2
4953 fi
4954done
Matthias Kloseb9621712010-04-24 17:59:49 +00004955 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004956IFS=$as_save_IFS
4957
4958fi
4959fi
4960ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4961if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4963$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004964else
Matthias Kloseb9621712010-04-24 17:59:49 +00004965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4966$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004967fi
4968
4969 if test "x$ac_ct_RANLIB" = x; then
4970 RANLIB=":"
4971 else
4972 case $cross_compiling:$ac_tool_warned in
4973yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00004974{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4975$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004976ac_tool_warned=yes ;;
4977esac
4978 RANLIB=$ac_ct_RANLIB
4979 fi
4980else
4981 RANLIB="$ac_cv_prog_RANLIB"
4982fi
4983
4984
4985for ac_prog in ar aal
4986do
4987 # Extract the first word of "$ac_prog", so it can be a program name with args.
4988set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4990$as_echo_n "checking for $ac_word... " >&6; }
4991if test "${ac_cv_prog_AR+set}" = set; then :
4992 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004993else
4994 if test -n "$AR"; then
4995 ac_cv_prog_AR="$AR" # Let the user override the test.
4996else
4997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4998for as_dir in $PATH
4999do
5000 IFS=$as_save_IFS
5001 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005002 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005003 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5004 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005006 break 2
5007 fi
5008done
Matthias Kloseb9621712010-04-24 17:59:49 +00005009 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005010IFS=$as_save_IFS
5011
5012fi
5013fi
5014AR=$ac_cv_prog_AR
5015if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5017$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018else
Matthias Kloseb9621712010-04-24 17:59:49 +00005019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5020$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005021fi
5022
5023
5024 test -n "$AR" && break
5025done
5026test -n "$AR" || AR="ar"
5027
5028
5029# tweak ARFLAGS only if the user didn't set it on the command line
5030
5031if test -z "$ARFLAGS"
5032then
5033 ARFLAGS="rc"
5034fi
5035
5036
5037# Extract the first word of "svnversion", so it can be a program name with args.
5038set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5040$as_echo_n "checking for $ac_word... " >&6; }
5041if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5042 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043else
5044 if test -n "$SVNVERSION"; then
5045 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5046else
5047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5048for as_dir in $PATH
5049do
5050 IFS=$as_save_IFS
5051 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005053 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5054 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005056 break 2
5057 fi
5058done
Matthias Kloseb9621712010-04-24 17:59:49 +00005059 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005060IFS=$as_save_IFS
5061
5062 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5063fi
5064fi
5065SVNVERSION=$ac_cv_prog_SVNVERSION
5066if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5068$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005069else
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5071$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005072fi
5073
5074
5075if test $SVNVERSION = found
5076then
5077 SVNVERSION="svnversion \$(srcdir)"
5078else
5079 SVNVERSION="echo Unversioned directory"
5080fi
5081
5082case $MACHDEP in
5083bsdos*|hp*|HP*)
5084 # install -d does not work on BSDI or HP-UX
5085 if test -z "$INSTALL"
5086 then
5087 INSTALL="${srcdir}/install-sh -c"
5088 fi
5089esac
5090ac_aux_dir=
5091for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 for ac_t in install-sh install.sh shtool; do
5093 if test -f "$ac_dir/$ac_t"; then
5094 ac_aux_dir=$ac_dir
5095 ac_install_sh="$ac_aux_dir/$ac_t -c"
5096 break 2
5097 fi
5098 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005099done
5100if test -z "$ac_aux_dir"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005101 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005102fi
5103
5104# These three variables are undocumented and unsupported,
5105# and are intended to be withdrawn in a future Autoconf release.
5106# They can cause serious problems if a builder's source tree is in a directory
5107# whose full name contains unusual characters.
5108ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5109ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5110ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5111
5112
5113# Find a good install program. We prefer a C program (faster),
5114# so one script is as good as another. But avoid the broken or
5115# incompatible versions:
5116# SysV /etc/install, /usr/sbin/install
5117# SunOS /usr/etc/install
5118# IRIX /sbin/install
5119# AIX /bin/install
5120# AmigaOS /C/install, which installs bootblocks on floppy discs
5121# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5122# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5123# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5124# OS/2's system install, which has a completely different semantic
5125# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005126# Reject install programs that cannot install multiple files.
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5128$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005129if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005130if test "${ac_cv_path_install+set}" = set; then :
5131 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005132else
5133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5134for as_dir in $PATH
5135do
5136 IFS=$as_save_IFS
5137 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005138 # Account for people who put trailing slashes in PATH elements.
5139case $as_dir/ in #((
5140 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005141 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005142 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005143 /usr/ucb/* ) ;;
5144 *)
5145 # OSF1 and SCO ODT 3.0 have their own names for install.
5146 # Don't use installbsd from OSF since it installs stuff as root
5147 # by default.
5148 for ac_prog in ginstall scoinst install; do
5149 for ac_exec_ext in '' $ac_executable_extensions; do
5150 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5151 if test $ac_prog = install &&
5152 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5153 # AIX install. It has an incompatible calling convention.
5154 :
5155 elif test $ac_prog = install &&
5156 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5157 # program-specific install script used by HP pwplus--don't use.
5158 :
5159 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005160 rm -rf conftest.one conftest.two conftest.dir
5161 echo one > conftest.one
5162 echo two > conftest.two
5163 mkdir conftest.dir
5164 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5165 test -s conftest.one && test -s conftest.two &&
5166 test -s conftest.dir/conftest.one &&
5167 test -s conftest.dir/conftest.two
5168 then
5169 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5170 break 3
5171 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005172 fi
5173 fi
5174 done
5175 done
5176 ;;
5177esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005178
5179 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005180IFS=$as_save_IFS
5181
Matthias Kloseb9621712010-04-24 17:59:49 +00005182rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005183
5184fi
5185 if test "${ac_cv_path_install+set}" = set; then
5186 INSTALL=$ac_cv_path_install
5187 else
5188 # As a last resort, use the slow shell script. Don't cache a
5189 # value for INSTALL within a source directory, because that will
5190 # break other packages using the cache if that directory is
5191 # removed, or if the value is a relative name.
5192 INSTALL=$ac_install_sh
5193 fi
5194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5196$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197
5198# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5199# It thinks the first close brace ends the variable substitution.
5200test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5201
5202test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5203
5204test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5205
5206
5207# Not every filesystem supports hard links
5208
5209if test -z "$LN" ; then
5210 case $ac_sys_system in
5211 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005212 *) LN=ln;;
5213 esac
5214fi
5215
5216# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5218$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005219
5220# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005221if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005222 withval=$with_pydebug;
5223if test "$withval" != no
5224then
5225
Matthias Kloseb9621712010-04-24 17:59:49 +00005226$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005227
Matthias Kloseb9621712010-04-24 17:59:49 +00005228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5229$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005230 Py_DEBUG='true'
Matthias Kloseb9621712010-04-24 17:59:49 +00005231else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5232$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005233fi
5234else
Matthias Kloseb9621712010-04-24 17:59:49 +00005235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5236$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005237fi
5238
5239
5240# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5241# merged with this chunk of code?
5242
5243# Optimizer/debugger flags
5244# ------------------------
5245# (The following bit of code is complicated enough - please keep things
5246# indented properly. Just pretend you're editing Python code. ;-)
5247
5248# There are two parallel sets of case statements below, one that checks to
5249# see if OPT was set and one that does BASECFLAGS setting based upon
5250# compiler and platform. BASECFLAGS tweaks need to be made even if the
5251# user set OPT.
5252
5253# tweak OPT based on compiler and platform, only if the user didn't set
5254# it on the command line
5255
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005256if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005257then
5258 case $GCC in
5259 yes)
5260 if test "$CC" != 'g++' ; then
5261 STRICT_PROTO="-Wstrict-prototypes"
5262 fi
5263 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5264 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5265 WRAP="-fwrapv"
5266 fi
5267 case $ac_cv_prog_cc_g in
5268 yes)
5269 if test "$Py_DEBUG" = 'true' ; then
5270 # Optimization messes up debuggers, so turn it off for
5271 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005272 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005273 else
5274 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5275 fi
5276 ;;
5277 *)
5278 OPT="-O3 -Wall $STRICT_PROTO"
5279 ;;
5280 esac
5281 case $ac_sys_system in
5282 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5283 ;;
5284 esac
5285 ;;
5286
5287 *)
5288 OPT="-O"
5289 ;;
5290 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005291fi
5292
5293
5294
5295# The -arch flags for universal builds on OSX
5296UNIVERSAL_ARCH_FLAGS=
5297
5298
5299# tweak BASECFLAGS based on compiler and platform
5300case $GCC in
5301yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005302 # Python doesn't violate C99 aliasing rules, but older versions of
5303 # GCC produce warnings for legal Python code. Enable
5304 # -fno-strict-aliasing on versions of GCC that support but produce
5305 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5307$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005308 ac_save_cc="$CC"
5309 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005310 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005311 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5312 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005313else
Matthias Kloseb9621712010-04-24 17:59:49 +00005314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005315/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005316
Matthias Kloseb159a552010-04-25 21:00:44 +00005317
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005318int
5319main ()
5320{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005321
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005322 ;
5323 return 0;
5324}
Matthias Kloseb159a552010-04-25 21:00:44 +00005325
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005327if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005328
5329 CC="$ac_save_cc -fstrict-aliasing"
5330 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005332/* end confdefs.h. */
5333
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005334 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005335int
5336main ()
5337{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005338double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005339 ;
5340 return 0;
5341}
Matthias Kloseb159a552010-04-25 21:00:44 +00005342
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005344if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005345
5346 ac_cv_no_strict_aliasing=no
5347
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005348else
Matthias Kloseb159a552010-04-25 21:00:44 +00005349
5350 ac_cv_no_strict_aliasing=yes
5351
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005352fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005354
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005355else
Matthias Kloseb159a552010-04-25 21:00:44 +00005356
5357 ac_cv_no_strict_aliasing=no
5358
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005361fi
5362
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005363 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5366$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005367 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368 then
5369 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5370 fi
5371
5372 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5373 # support. Without this, treatment of subnormals doesn't follow
5374 # the standard.
5375 case $ac_sys_machine in
5376 alpha*)
5377 BASECFLAGS="$BASECFLAGS -mieee"
5378 ;;
5379 esac
5380
5381 case $ac_sys_system in
5382 SCO_SV*)
5383 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5384 ;;
5385 # is there any other compiler on Darwin besides gcc?
5386 Darwin*)
5387 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5388 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005389 if test "${CC}" = gcc
5390 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5392$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005393 case "${UNIVERSALSDK}" in
5394 */MacOSX10.4u.sdk)
5395 # Build using 10.4 SDK, force usage of gcc when the
5396 # compiler is gcc, otherwise the user will get very
5397 # confusing error messages when building on OSX 10.6
5398 CC=gcc-4.0
5399 CPP=cpp-4.0
5400 ;;
5401 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5403$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005404 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405
5406
5407 if test "${enable_universalsdk}"; then
5408 UNIVERSAL_ARCH_FLAGS=""
5409 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5410 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5411 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005412 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005413 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5414 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005415 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005416 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005417
5418 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5419 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005420 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005421 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005423 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5424 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005425 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005426 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005427
5428 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5429 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005430 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005431 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005432
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005433 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005434 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 +00005435
5436 fi
5437
5438
Ronald Oussoren666028b2010-04-18 19:07:43 +00005439 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5440 if test "${UNIVERSALSDK}" != "/"
5441 then
5442 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5443 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005444 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005445 fi
5446 fi
5447
5448 # Calculate the right deployment target for this build.
5449 #
5450 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5451 if test ${cur_target} '>' 10.2; then
5452 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005453 if test ${enable_universalsdk}; then
5454 if test "${UNIVERSAL_ARCHS}" = "all"; then
5455 # Ensure that the default platform for a
5456 # 4-way universal build is OSX 10.5,
5457 # that's the first OS release where
5458 # 4-way builds make sense.
5459 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005460
5461 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5462 cur_target='10.5'
5463
5464 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5465 cur_target='10.5'
5466
5467 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5468 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005469 fi
5470 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005471 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005472 # On Intel macs default to a deployment
5473 # target of 10.4, that's the first OSX
5474 # release with Intel support.
5475 cur_target="10.4"
5476 fi
5477 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005478 fi
5479 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5480
5481 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5482 # environment with a value that is the same as what we'll use
5483 # in the Makefile to ensure that we'll get the same compiler
5484 # environment during configure and build time.
5485 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5486 export MACOSX_DEPLOYMENT_TARGET
5487 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5488
5489 ;;
5490 OSF*)
5491 BASECFLAGS="$BASECFLAGS -mieee"
5492 ;;
5493 esac
5494 ;;
5495
5496*)
5497 case $ac_sys_system in
5498 OpenUNIX*|UnixWare*)
5499 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5500 ;;
5501 OSF*)
5502 BASECFLAGS="$BASECFLAGS -ieee -std"
5503 ;;
5504 SCO_SV*)
5505 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5506 ;;
5507 esac
5508 ;;
5509esac
5510
5511if test "$Py_DEBUG" = 'true'; then
5512 :
5513else
5514 OPT="-DNDEBUG $OPT"
5515fi
5516
5517if test "$ac_arch_flags"
5518then
5519 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5520fi
5521
5522# disable check for icc since it seems to pass, but generates a warning
5523if test "$CC" = icc
5524then
5525 ac_cv_opt_olimit_ok=no
5526fi
5527
Matthias Kloseb9621712010-04-24 17:59:49 +00005528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5529$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5530if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5531 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005532else
5533 ac_save_cc="$CC"
5534CC="$CC -OPT:Olimit=0"
Matthias Kloseb9621712010-04-24 17:59:49 +00005535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005537
5538int
5539main ()
5540{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005541
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005542 ;
5543 return 0;
5544}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005546if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005547 ac_cv_opt_olimit_ok=yes
5548else
Matthias Kloseb9621712010-04-24 17:59:49 +00005549 ac_cv_opt_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005550
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005551fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553CC="$ac_save_cc"
5554fi
5555
Matthias Kloseb9621712010-04-24 17:59:49 +00005556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5557$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005558if test $ac_cv_opt_olimit_ok = yes; then
5559 case $ac_sys_system in
5560 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5561 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5562 # environment?
5563 Darwin*)
5564 ;;
5565 *)
5566 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5567 ;;
5568 esac
5569else
Matthias Kloseb9621712010-04-24 17:59:49 +00005570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5571$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5572 if test "${ac_cv_olimit_ok+set}" = set; then :
5573 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005574else
5575 ac_save_cc="$CC"
5576 CC="$CC -Olimit 1500"
Matthias Kloseb9621712010-04-24 17:59:49 +00005577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005578/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005579
5580int
5581main ()
5582{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005583
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005584 ;
5585 return 0;
5586}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005588if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005589 ac_cv_olimit_ok=yes
5590else
Matthias Kloseb9621712010-04-24 17:59:49 +00005591 ac_cv_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005592
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005593fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005595 CC="$ac_save_cc"
5596fi
5597
Matthias Kloseb9621712010-04-24 17:59:49 +00005598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5599$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005600 if test $ac_cv_olimit_ok = yes; then
5601 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5602 fi
5603fi
5604
5605# Check whether GCC supports PyArg_ParseTuple format
5606if test "$GCC" = "yes"
5607then
Matthias Kloseb9621712010-04-24 17:59:49 +00005608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5609$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610 save_CFLAGS=$CFLAGS
5611 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613/* end confdefs.h. */
5614
5615 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616int
5617main ()
5618{
5619
5620 ;
5621 return 0;
5622}
Matthias Kloseb159a552010-04-25 21:00:44 +00005623
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005625if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005626
Matthias Kloseb159a552010-04-25 21:00:44 +00005627
Matthias Kloseb9621712010-04-24 17:59:49 +00005628$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629
Matthias Kloseb159a552010-04-25 21:00:44 +00005630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005631$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005632
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633else
Matthias Kloseb159a552010-04-25 21:00:44 +00005634
5635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005636$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005637
5638fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5640 CFLAGS=$save_CFLAGS
5641fi
5642
5643# On some compilers, pthreads are available without further options
5644# (e.g. MacOS X). On some of these systems, the compiler will not
5645# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5646# So we have to see first whether pthreads are available without
5647# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5649$as_echo_n "checking whether pthreads are available without options... " >&6; }
5650if test "${ac_cv_pthread_is_default+set}" = set; then :
5651 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652else
Matthias Kloseb9621712010-04-24 17:59:49 +00005653 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005654 ac_cv_pthread_is_default=no
5655else
Matthias Kloseb9621712010-04-24 17:59:49 +00005656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657/* end confdefs.h. */
5658
5659#include <pthread.h>
5660
5661void* routine(void* p){return NULL;}
5662
5663int main(){
5664 pthread_t p;
5665 if(pthread_create(&p,NULL,routine,NULL)!=0)
5666 return 1;
5667 (void)pthread_detach(p);
5668 return 0;
5669}
5670
5671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005672if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673
5674 ac_cv_pthread_is_default=yes
5675 ac_cv_kthread=no
5676 ac_cv_pthread=no
5677
5678else
Matthias Kloseb9621712010-04-24 17:59:49 +00005679 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005681rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5682 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683fi
5684
5685
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686fi
5687
Matthias Kloseb9621712010-04-24 17:59:49 +00005688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5689$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690
5691
5692if test $ac_cv_pthread_is_default = yes
5693then
5694 ac_cv_kpthread=no
5695else
5696# -Kpthread, if available, provides the right #defines
5697# and linker options to make pthread_create available
5698# Some compilers won't report that they do not support -Kpthread,
5699# so we need to run a program to see whether it really made the
5700# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5702$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5703if test "${ac_cv_kpthread+set}" = set; then :
5704 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705else
5706 ac_save_cc="$CC"
5707CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005708if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709 ac_cv_kpthread=no
5710else
Matthias Kloseb9621712010-04-24 17:59:49 +00005711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712/* end confdefs.h. */
5713
5714#include <pthread.h>
5715
5716void* routine(void* p){return NULL;}
5717
5718int main(){
5719 pthread_t p;
5720 if(pthread_create(&p,NULL,routine,NULL)!=0)
5721 return 1;
5722 (void)pthread_detach(p);
5723 return 0;
5724}
5725
5726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005727if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728 ac_cv_kpthread=yes
5729else
Matthias Kloseb9621712010-04-24 17:59:49 +00005730 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5733 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734fi
5735
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736CC="$ac_save_cc"
5737fi
5738
Matthias Kloseb9621712010-04-24 17:59:49 +00005739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5740$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741fi
5742
5743if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5744then
5745# -Kthread, if available, provides the right #defines
5746# and linker options to make pthread_create available
5747# Some compilers won't report that they do not support -Kthread,
5748# so we need to run a program to see whether it really made the
5749# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5751$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5752if test "${ac_cv_kthread+set}" = set; then :
5753 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754else
5755 ac_save_cc="$CC"
5756CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005757if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758 ac_cv_kthread=no
5759else
Matthias Kloseb9621712010-04-24 17:59:49 +00005760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761/* end confdefs.h. */
5762
5763#include <pthread.h>
5764
5765void* routine(void* p){return NULL;}
5766
5767int main(){
5768 pthread_t p;
5769 if(pthread_create(&p,NULL,routine,NULL)!=0)
5770 return 1;
5771 (void)pthread_detach(p);
5772 return 0;
5773}
5774
5775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005776if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777 ac_cv_kthread=yes
5778else
Matthias Kloseb9621712010-04-24 17:59:49 +00005779 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5782 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783fi
5784
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785CC="$ac_save_cc"
5786fi
5787
Matthias Kloseb9621712010-04-24 17:59:49 +00005788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5789$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790fi
5791
5792if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5793then
5794# -pthread, if available, provides the right #defines
5795# and linker options to make pthread_create available
5796# Some compilers won't report that they do not support -pthread,
5797# so we need to run a program to see whether it really made the
5798# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5800$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5801if test "${ac_cv_thread+set}" = set; then :
5802 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803else
5804 ac_save_cc="$CC"
5805CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005806if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807 ac_cv_pthread=no
5808else
Matthias Kloseb9621712010-04-24 17:59:49 +00005809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810/* end confdefs.h. */
5811
5812#include <pthread.h>
5813
5814void* routine(void* p){return NULL;}
5815
5816int main(){
5817 pthread_t p;
5818 if(pthread_create(&p,NULL,routine,NULL)!=0)
5819 return 1;
5820 (void)pthread_detach(p);
5821 return 0;
5822}
5823
5824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005825if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826 ac_cv_pthread=yes
5827else
Matthias Kloseb9621712010-04-24 17:59:49 +00005828 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005830rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5831 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832fi
5833
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834CC="$ac_save_cc"
5835fi
5836
Matthias Kloseb9621712010-04-24 17:59:49 +00005837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5838$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839fi
5840
5841# If we have set a CC compiler flag for thread support then
5842# check if it works for CXX, too.
5843ac_cv_cxx_thread=no
5844if test ! -z "$CXX"
5845then
Matthias Kloseb9621712010-04-24 17:59:49 +00005846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5847$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848ac_save_cxx="$CXX"
5849
5850if test "$ac_cv_kpthread" = "yes"
5851then
5852 CXX="$CXX -Kpthread"
5853 ac_cv_cxx_thread=yes
5854elif test "$ac_cv_kthread" = "yes"
5855then
5856 CXX="$CXX -Kthread"
5857 ac_cv_cxx_thread=yes
5858elif test "$ac_cv_pthread" = "yes"
5859then
5860 CXX="$CXX -pthread"
5861 ac_cv_cxx_thread=yes
5862fi
5863
5864if test $ac_cv_cxx_thread = yes
5865then
5866 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5867 $CXX -c conftest.$ac_ext 2>&5
5868 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5869 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5870 then
5871 ac_cv_cxx_thread=yes
5872 else
5873 ac_cv_cxx_thread=no
5874 fi
5875 rm -fr conftest*
5876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5878$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879fi
5880CXX="$ac_save_cxx"
5881
5882
5883# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5885$as_echo_n "checking for ANSI C header files... " >&6; }
5886if test "${ac_cv_header_stdc+set}" = set; then :
5887 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888else
Matthias Kloseb9621712010-04-24 17:59:49 +00005889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890/* end confdefs.h. */
5891#include <stdlib.h>
5892#include <stdarg.h>
5893#include <string.h>
5894#include <float.h>
5895
5896int
5897main ()
5898{
5899
5900 ;
5901 return 0;
5902}
5903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005904if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905 ac_cv_header_stdc=yes
5906else
Matthias Kloseb9621712010-04-24 17:59:49 +00005907 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5910
5911if test $ac_cv_header_stdc = yes; then
5912 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914/* end confdefs.h. */
5915#include <string.h>
5916
5917_ACEOF
5918if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005919 $EGREP "memchr" >/dev/null 2>&1; then :
5920
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921else
5922 ac_cv_header_stdc=no
5923fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005924rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925
5926fi
5927
5928if test $ac_cv_header_stdc = yes; then
5929 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931/* end confdefs.h. */
5932#include <stdlib.h>
5933
5934_ACEOF
5935if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005936 $EGREP "free" >/dev/null 2>&1; then :
5937
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938else
5939 ac_cv_header_stdc=no
5940fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005941rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942
5943fi
5944
5945if test $ac_cv_header_stdc = yes; then
5946 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005947 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 :
5949else
Matthias Kloseb9621712010-04-24 17:59:49 +00005950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951/* end confdefs.h. */
5952#include <ctype.h>
5953#include <stdlib.h>
5954#if ((' ' & 0x0FF) == 0x020)
5955# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5956# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5957#else
5958# define ISLOWER(c) \
5959 (('a' <= (c) && (c) <= 'i') \
5960 || ('j' <= (c) && (c) <= 'r') \
5961 || ('s' <= (c) && (c) <= 'z'))
5962# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5963#endif
5964
5965#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5966int
5967main ()
5968{
5969 int i;
5970 for (i = 0; i < 256; i++)
5971 if (XOR (islower (i), ISLOWER (i))
5972 || toupper (i) != TOUPPER (i))
5973 return 2;
5974 return 0;
5975}
5976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005977if ac_fn_c_try_run "$LINENO"; then :
5978
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979else
Matthias Kloseb9621712010-04-24 17:59:49 +00005980 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005982rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5983 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984fi
5985
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986fi
5987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5989$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990if test $ac_cv_header_stdc = yes; then
5991
Matthias Kloseb9621712010-04-24 17:59:49 +00005992$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993
5994fi
5995
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005996for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5997fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005998ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005999shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006000unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006001sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6002sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006003sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006004sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006005sys/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 +00006006sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006007bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006008do :
6009 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6010ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6011eval as_val=\$$as_ac_Header
6012 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006013 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006014#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006015_ACEOF
6016
6017fi
6018
Guido van Rossum627b2d71993-12-24 10:39:16 +00006019done
6020
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006021ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006022for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006023 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6025$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
6026if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
6027 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006028else
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006030/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006031#include <sys/types.h>
6032#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006033
Martin v. Löwis11437992002-04-12 09:54:03 +00006034int
6035main ()
6036{
6037if ((DIR *) 0)
6038return 0;
6039 ;
6040 return 0;
6041}
6042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006043if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006044 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006045else
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006050eval ac_res=\$$as_ac_Header
6051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6052$as_echo "$ac_res" >&6; }
6053eval as_val=\$$as_ac_Header
6054 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006055 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006056#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006057_ACEOF
6058
6059ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006060fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006061
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006062done
6063# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6064if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6066$as_echo_n "checking for library containing opendir... " >&6; }
6067if test "${ac_cv_search_opendir+set}" = set; then :
6068 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006069else
Martin v. Löwis11437992002-04-12 09:54:03 +00006070 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006073
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006074/* Override any GCC internal prototype to avoid an error.
6075 Use char because int might match the return type of a GCC
6076 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006077#ifdef __cplusplus
6078extern "C"
6079#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006080char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006081int
6082main ()
6083{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006084return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006085 ;
6086 return 0;
6087}
6088_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006089for ac_lib in '' dir; do
6090 if test -z "$ac_lib"; then
6091 ac_res="none required"
6092 else
6093 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006094 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006095 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006096 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006097 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006098fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006099rm -f core conftest.err conftest.$ac_objext \
6100 conftest$ac_exeext
6101 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006102 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006104done
Matthias Kloseb9621712010-04-24 17:59:49 +00006105if test "${ac_cv_search_opendir+set}" = set; then :
6106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006107else
6108 ac_cv_search_opendir=no
6109fi
6110rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006111LIBS=$ac_func_search_save_LIBS
6112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6114$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006115ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006116if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006117 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006118
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006119fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006120
Michael W. Hudson54241132001-12-07 15:38:26 +00006121else
Matthias Kloseb9621712010-04-24 17:59:49 +00006122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6123$as_echo_n "checking for library containing opendir... " >&6; }
6124if test "${ac_cv_search_opendir+set}" = set; then :
6125 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006126else
6127 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006129/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006130
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006131/* Override any GCC internal prototype to avoid an error.
6132 Use char because int might match the return type of a GCC
6133 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006134#ifdef __cplusplus
6135extern "C"
6136#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006137char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006138int
6139main ()
6140{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006141return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006142 ;
6143 return 0;
6144}
6145_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006146for ac_lib in '' x; do
6147 if test -z "$ac_lib"; then
6148 ac_res="none required"
6149 else
6150 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006151 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006152 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006153 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006154 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006156rm -f core conftest.err conftest.$ac_objext \
6157 conftest$ac_exeext
6158 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006159 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006160fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006161done
Matthias Kloseb9621712010-04-24 17:59:49 +00006162if test "${ac_cv_search_opendir+set}" = set; then :
6163
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006164else
6165 ac_cv_search_opendir=no
6166fi
6167rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006168LIBS=$ac_func_search_save_LIBS
6169fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6171$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006172ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006173if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006174 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006175
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006176fi
6177
6178fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006179
Matthias Kloseb9621712010-04-24 17:59:49 +00006180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6181$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6182if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6183 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006184else
Matthias Kloseb9621712010-04-24 17:59:49 +00006185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006186/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006187#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188int
6189main ()
6190{
6191return makedev(0, 0);
6192 ;
6193 return 0;
6194}
6195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006196if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006197 ac_cv_header_sys_types_h_makedev=yes
6198else
Matthias Kloseb9621712010-04-24 17:59:49 +00006199 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006201rm -f core conftest.err conftest.$ac_objext \
6202 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006203
6204fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6206$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207
6208if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006209ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6210if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006211
Matthias Kloseb9621712010-04-24 17:59:49 +00006212$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213
6214fi
6215
6216
6217
6218 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006219 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6220if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006221
Matthias Kloseb9621712010-04-24 17:59:49 +00006222$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223
6224fi
6225
6226
6227 fi
6228fi
6229
Michael W. Hudson54241132001-12-07 15:38:26 +00006230
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006231# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006232for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006233do :
6234 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006235#ifdef HAVE_CURSES_H
6236#include <curses.h>
6237#endif
6238
Matthias Kloseb9621712010-04-24 17:59:49 +00006239"
6240if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006241 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006242#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006243_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006244
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006245fi
6246
6247done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006248
6249
Martin v. Löwis11017b12006-01-14 18:12:57 +00006250# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006251for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006252do :
6253 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 +00006254#ifdef HAVE_ASM_TYPES_H
6255#include <asm/types.h>
6256#endif
6257#ifdef HAVE_SYS_SOCKET_H
6258#include <sys/socket.h>
6259#endif
6260
Matthias Kloseb9621712010-04-24 17:59:49 +00006261"
6262if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006263 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006264#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006265_ACEOF
6266
6267fi
6268
6269done
6270
6271
Guido van Rossum627b2d71993-12-24 10:39:16 +00006272# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006273was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6275$as_echo_n "checking for clock_t in time.h... " >&6; }
6276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006277/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006278#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006279
6280_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006281if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006282 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006283 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006284else
Martin v. Löwis11437992002-04-12 09:54:03 +00006285
6286
Matthias Kloseb9621712010-04-24 17:59:49 +00006287$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006288
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006289
Guido van Rossum627b2d71993-12-24 10:39:16 +00006290fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006291rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006292
Matthias Kloseb9621712010-04-24 17:59:49 +00006293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6294$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006295
Neal Norwitz11690112002-07-30 01:08:28 +00006296# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6298$as_echo_n "checking for makedev... " >&6; }
6299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006300/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006301
Jesus Cea740f53a2010-04-28 11:35:30 +00006302#if defined(MAJOR_IN_MKDEV)
6303#include <sys/mkdev.h>
6304#elif defined(MAJOR_IN_SYSMACROS)
6305#include <sys/sysmacros.h>
6306#else
6307#include <sys/types.h>
6308#endif
6309
Neal Norwitz11690112002-07-30 01:08:28 +00006310int
6311main ()
6312{
Jesus Cea740f53a2010-04-28 11:35:30 +00006313
6314 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006315 ;
6316 return 0;
6317}
Matthias Kloseb159a552010-04-25 21:00:44 +00006318
Neal Norwitz11690112002-07-30 01:08:28 +00006319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006320if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006321 ac_cv_has_makedev=yes
6322else
Matthias Kloseb9621712010-04-24 17:59:49 +00006323 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006324fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006325rm -f core conftest.err conftest.$ac_objext \
6326 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006327if test "$ac_cv_has_makedev" = "no"; then
6328 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006330/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006331
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006332#define _OSF_SOURCE 1
6333#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006334
Neal Norwitz11690112002-07-30 01:08:28 +00006335int
6336main ()
6337{
6338 makedev(0, 0)
6339 ;
6340 return 0;
6341}
6342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006343if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006344 ac_cv_has_makedev=yes
6345else
Matthias Kloseb9621712010-04-24 17:59:49 +00006346 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006348rm -f core conftest.err conftest.$ac_objext \
6349 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006350 if test "$ac_cv_has_makedev" = "yes"; then
6351
Matthias Kloseb9621712010-04-24 17:59:49 +00006352$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006353
6354 fi
6355fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6357$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006358if test "$ac_cv_has_makedev" = "yes"; then
6359
Matthias Kloseb9621712010-04-24 17:59:49 +00006360$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006361
6362fi
6363
Martin v. Löwis399a6892002-10-04 10:22:02 +00006364# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6365# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6366# defined, but the compiler does not support pragma redefine_extname,
6367# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6368# structures (such as rlimit64) without declaring them. As a
6369# work-around, disable LFS on such configurations
6370
6371use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6373$as_echo_n "checking Solaris LFS bug... " >&6; }
6374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006375/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006376
6377#define _LARGEFILE_SOURCE 1
6378#define _FILE_OFFSET_BITS 64
6379#include <sys/resource.h>
6380
Martin v. Löwis399a6892002-10-04 10:22:02 +00006381int
6382main ()
6383{
6384struct rlimit foo;
6385 ;
6386 return 0;
6387}
6388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006389if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006390 sol_lfs_bug=no
6391else
Matthias Kloseb9621712010-04-24 17:59:49 +00006392 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6396$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006397if test "$sol_lfs_bug" = "yes"; then
6398 use_lfs=no
6399fi
6400
6401if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006402# Two defines needed to enable largefile support on various platforms
6403# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006404
Matthias Kloseb9621712010-04-24 17:59:49 +00006405$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006406
6407
Matthias Kloseb9621712010-04-24 17:59:49 +00006408$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006409
Martin v. Löwis399a6892002-10-04 10:22:02 +00006410fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006411
Guido van Rossum84e7b241996-08-19 21:59:00 +00006412# Add some code to confdefs.h so that the test for off_t works on SCO
6413cat >> confdefs.h <<\EOF
6414#if defined(SCO_DS)
6415#undef _OFF_T
6416#endif
6417EOF
6418
Guido van Rossumef2255b2000-03-10 22:30:29 +00006419# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006420ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6421if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006422
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006423else
Martin v. Löwis11437992002-04-12 09:54:03 +00006424
6425cat >>confdefs.h <<_ACEOF
6426#define mode_t int
6427_ACEOF
6428
6429fi
6430
Matthias Kloseb9621712010-04-24 17:59:49 +00006431ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6432if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006433
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006434else
Martin v. Löwis11437992002-04-12 09:54:03 +00006435
6436cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006437#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006438_ACEOF
6439
6440fi
6441
Matthias Kloseb9621712010-04-24 17:59:49 +00006442ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6443if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006444
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006445else
Martin v. Löwis11437992002-04-12 09:54:03 +00006446
6447cat >>confdefs.h <<_ACEOF
6448#define pid_t int
6449_ACEOF
6450
6451fi
6452
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006453
Martin v. Löwis11437992002-04-12 09:54:03 +00006454cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006455#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006456_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006457
Matthias Kloseb9621712010-04-24 17:59:49 +00006458ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6459if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006460
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006461else
Martin v. Löwis11437992002-04-12 09:54:03 +00006462
6463cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006464#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006465_ACEOF
6466
6467fi
6468
Matthias Kloseb9621712010-04-24 17:59:49 +00006469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6470$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6471if test "${ac_cv_type_uid_t+set}" = set; then :
6472 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006473else
Matthias Kloseb9621712010-04-24 17:59:49 +00006474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006475/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006476#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006477
6478_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006479if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006480 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006481 ac_cv_type_uid_t=yes
6482else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006483 ac_cv_type_uid_t=no
6484fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006485rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006486
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006487fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6489$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006490if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006491
Matthias Kloseb9621712010-04-24 17:59:49 +00006492$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006493
6494
Matthias Kloseb9621712010-04-24 17:59:49 +00006495$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006496
6497fi
6498
Matthias Kloseb9621712010-04-24 17:59:49 +00006499ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6500case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006501 no|yes) ;; #(
6502 *)
6503
Matthias Kloseb9621712010-04-24 17:59:49 +00006504$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006505
6506
6507cat >>confdefs.h <<_ACEOF
6508#define uint32_t $ac_cv_c_uint32_t
6509_ACEOF
6510;;
6511 esac
6512
Matthias Kloseb9621712010-04-24 17:59:49 +00006513ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6514case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006515 no|yes) ;; #(
6516 *)
6517
Matthias Kloseb9621712010-04-24 17:59:49 +00006518$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006519
6520
6521cat >>confdefs.h <<_ACEOF
6522#define uint64_t $ac_cv_c_uint64_t
6523_ACEOF
6524;;
6525 esac
6526
Matthias Kloseb9621712010-04-24 17:59:49 +00006527ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6528case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006529 no|yes) ;; #(
6530 *)
6531
6532cat >>confdefs.h <<_ACEOF
6533#define int32_t $ac_cv_c_int32_t
6534_ACEOF
6535;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006536esac
6537
Matthias Kloseb9621712010-04-24 17:59:49 +00006538ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6539case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006540 no|yes) ;; #(
6541 *)
6542
6543cat >>confdefs.h <<_ACEOF
6544#define int64_t $ac_cv_c_int64_t
6545_ACEOF
6546;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006547esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006548
Matthias Kloseb9621712010-04-24 17:59:49 +00006549ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6550if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006551
Matthias Kloseb9621712010-04-24 17:59:49 +00006552$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006553
6554fi
6555
Jack Jansendd19cf82001-12-06 22:36:17 +00006556
Michael W. Hudson54241132001-12-07 15:38:26 +00006557# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006558# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006559# The cast to long int works around a bug in the HP C Compiler
6560# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6561# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6562# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6564$as_echo_n "checking size of int... " >&6; }
6565if test "${ac_cv_sizeof_int+set}" = set; then :
6566 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006567else
Matthias Kloseb9621712010-04-24 17:59:49 +00006568 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 +00006569
Martin v. Löwis11437992002-04-12 09:54:03 +00006570else
Matthias Kloseb9621712010-04-24 17:59:49 +00006571 if test "$ac_cv_type_int" = yes; then
6572 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6573$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6574{ as_fn_set_status 77
6575as_fn_error "cannot compute sizeof (int)
6576See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006577 else
6578 ac_cv_sizeof_int=0
6579 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006581
Martin v. Löwis11437992002-04-12 09:54:03 +00006582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6584$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006585
6586
6587
Martin v. Löwis11437992002-04-12 09:54:03 +00006588cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006589#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006590_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006591
6592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006593# The cast to long int works around a bug in the HP C Compiler
6594# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6595# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6596# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6598$as_echo_n "checking size of long... " >&6; }
6599if test "${ac_cv_sizeof_long+set}" = set; then :
6600 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006601else
Matthias Kloseb9621712010-04-24 17:59:49 +00006602 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 +00006603
Martin v. Löwis11437992002-04-12 09:54:03 +00006604else
Matthias Kloseb9621712010-04-24 17:59:49 +00006605 if test "$ac_cv_type_long" = yes; then
6606 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6607$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6608{ as_fn_set_status 77
6609as_fn_error "cannot compute sizeof (long)
6610See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006611 else
6612 ac_cv_sizeof_long=0
6613 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006615
Martin v. Löwis11437992002-04-12 09:54:03 +00006616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6618$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006619
6620
6621
Martin v. Löwis11437992002-04-12 09:54:03 +00006622cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006623#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006624_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006625
6626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006627# The cast to long int works around a bug in the HP C Compiler
6628# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6629# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6630# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6632$as_echo_n "checking size of void *... " >&6; }
6633if test "${ac_cv_sizeof_void_p+set}" = set; then :
6634 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006635else
Matthias Kloseb9621712010-04-24 17:59:49 +00006636 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 +00006637
Martin v. Löwis11437992002-04-12 09:54:03 +00006638else
Matthias Kloseb9621712010-04-24 17:59:49 +00006639 if test "$ac_cv_type_void_p" = yes; then
6640 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6641$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6642{ as_fn_set_status 77
6643as_fn_error "cannot compute sizeof (void *)
6644See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006645 else
6646 ac_cv_sizeof_void_p=0
6647 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006649
Martin v. Löwis11437992002-04-12 09:54:03 +00006650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6652$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006653
6654
6655
Martin v. Löwis11437992002-04-12 09:54:03 +00006656cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006657#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006658_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006659
6660
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006661# The cast to long int works around a bug in the HP C Compiler
6662# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6663# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6664# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6666$as_echo_n "checking size of short... " >&6; }
6667if test "${ac_cv_sizeof_short+set}" = set; then :
6668 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006669else
Matthias Kloseb9621712010-04-24 17:59:49 +00006670 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 +00006671
Martin v. Löwis11437992002-04-12 09:54:03 +00006672else
Matthias Kloseb9621712010-04-24 17:59:49 +00006673 if test "$ac_cv_type_short" = yes; then
6674 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6676{ as_fn_set_status 77
6677as_fn_error "cannot compute sizeof (short)
6678See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006679 else
6680 ac_cv_sizeof_short=0
6681 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006683
Martin v. Löwis11437992002-04-12 09:54:03 +00006684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6686$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006687
6688
6689
Martin v. Löwis11437992002-04-12 09:54:03 +00006690cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006691#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006692_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006693
6694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006695# The cast to long int works around a bug in the HP C Compiler
6696# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6697# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6698# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6700$as_echo_n "checking size of float... " >&6; }
6701if test "${ac_cv_sizeof_float+set}" = set; then :
6702 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006703else
Matthias Kloseb9621712010-04-24 17:59:49 +00006704 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 +00006705
Martin v. Löwis11437992002-04-12 09:54:03 +00006706else
Matthias Kloseb9621712010-04-24 17:59:49 +00006707 if test "$ac_cv_type_float" = yes; then
6708 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6709$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6710{ as_fn_set_status 77
6711as_fn_error "cannot compute sizeof (float)
6712See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006713 else
6714 ac_cv_sizeof_float=0
6715 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006717
Martin v. Löwis11437992002-04-12 09:54:03 +00006718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6720$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006721
6722
6723
Martin v. Löwis11437992002-04-12 09:54:03 +00006724cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006725#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006726_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006727
6728
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006729# The cast to long int works around a bug in the HP C Compiler
6730# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6731# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6732# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6734$as_echo_n "checking size of double... " >&6; }
6735if test "${ac_cv_sizeof_double+set}" = set; then :
6736 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006737else
Matthias Kloseb9621712010-04-24 17:59:49 +00006738 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 +00006739
Martin v. Löwis11437992002-04-12 09:54:03 +00006740else
Matthias Kloseb9621712010-04-24 17:59:49 +00006741 if test "$ac_cv_type_double" = yes; then
6742 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6743$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6744{ as_fn_set_status 77
6745as_fn_error "cannot compute sizeof (double)
6746See \`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; }
6769if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6770 $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;}
6778{ as_fn_set_status 77
6779as_fn_error "cannot compute sizeof (fpos_t)
6780See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006781 else
6782 ac_cv_sizeof_fpos_t=0
6783 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006785
Martin v. Löwis11437992002-04-12 09:54:03 +00006786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6788$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006789
6790
6791
Martin v. Löwis11437992002-04-12 09:54:03 +00006792cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006793#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006794_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006795
Michael W. Hudson54241132001-12-07 15:38:26 +00006796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006797# The cast to long int works around a bug in the HP C Compiler
6798# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6799# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6800# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6802$as_echo_n "checking size of size_t... " >&6; }
6803if test "${ac_cv_sizeof_size_t+set}" = set; then :
6804 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006805else
Matthias Kloseb9621712010-04-24 17:59:49 +00006806 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 +00006807
Martin v. Löwis18e16552006-02-15 17:27:45 +00006808else
Matthias Kloseb9621712010-04-24 17:59:49 +00006809 if test "$ac_cv_type_size_t" = yes; then
6810 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6811$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6812{ as_fn_set_status 77
6813as_fn_error "cannot compute sizeof (size_t)
6814See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006815 else
6816 ac_cv_sizeof_size_t=0
6817 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006819
Martin v. Löwis18e16552006-02-15 17:27:45 +00006820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6822$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006823
6824
6825
Martin v. Löwis18e16552006-02-15 17:27:45 +00006826cat >>confdefs.h <<_ACEOF
6827#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6828_ACEOF
6829
6830
Christian Heimes400adb02008-02-01 08:12:03 +00006831# The cast to long int works around a bug in the HP C Compiler
6832# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6833# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6834# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6836$as_echo_n "checking size of pid_t... " >&6; }
6837if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6838 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006839else
Matthias Kloseb9621712010-04-24 17:59:49 +00006840 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 +00006841
Christian Heimes400adb02008-02-01 08:12:03 +00006842else
Matthias Kloseb9621712010-04-24 17:59:49 +00006843 if test "$ac_cv_type_pid_t" = yes; then
6844 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6845$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6846{ as_fn_set_status 77
6847as_fn_error "cannot compute sizeof (pid_t)
6848See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006849 else
6850 ac_cv_sizeof_pid_t=0
6851 fi
6852fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006853
Christian Heimes400adb02008-02-01 08:12:03 +00006854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6856$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006857
6858
6859
6860cat >>confdefs.h <<_ACEOF
6861#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6862_ACEOF
6863
6864
Michael W. Hudson54241132001-12-07 15:38:26 +00006865
Matthias Kloseb9621712010-04-24 17:59:49 +00006866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6867$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006868have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006870/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006871
Martin v. Löwis11437992002-04-12 09:54:03 +00006872int
6873main ()
6874{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006875long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006876 ;
6877 return 0;
6878}
6879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006880if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006881
6882
Matthias Kloseb9621712010-04-24 17:59:49 +00006883$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006884
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006885 have_long_long=yes
6886
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6890$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006891if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006892# The cast to long int works around a bug in the HP C Compiler
6893# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6894# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6895# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6897$as_echo_n "checking size of long long... " >&6; }
6898if test "${ac_cv_sizeof_long_long+set}" = set; then :
6899 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006900else
Matthias Kloseb9621712010-04-24 17:59:49 +00006901 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 +00006902
Martin v. Löwis11437992002-04-12 09:54:03 +00006903else
Matthias Kloseb9621712010-04-24 17:59:49 +00006904 if test "$ac_cv_type_long_long" = yes; then
6905 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6907{ as_fn_set_status 77
6908as_fn_error "cannot compute sizeof (long long)
6909See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006910 else
6911 ac_cv_sizeof_long_long=0
6912 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006914
Martin v. Löwis11437992002-04-12 09:54:03 +00006915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6917$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006918
6919
6920
Martin v. Löwis11437992002-04-12 09:54:03 +00006921cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006922#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006923_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006924
Michael W. Hudson54241132001-12-07 15:38:26 +00006925
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006926fi
6927
Matthias Kloseb9621712010-04-24 17:59:49 +00006928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6929$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006930have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006932/* end confdefs.h. */
6933
6934int
6935main ()
6936{
6937long double x; x = (long double)0;
6938 ;
6939 return 0;
6940}
6941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006942if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006943
6944
Matthias Kloseb9621712010-04-24 17:59:49 +00006945$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006946
6947 have_long_double=yes
6948
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006949fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6952$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006953if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006954# The cast to long int works around a bug in the HP C Compiler
6955# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6956# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6957# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6959$as_echo_n "checking size of long double... " >&6; }
6960if test "${ac_cv_sizeof_long_double+set}" = set; then :
6961 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006962else
Matthias Kloseb9621712010-04-24 17:59:49 +00006963 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 +00006964
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006965else
Matthias Kloseb9621712010-04-24 17:59:49 +00006966 if test "$ac_cv_type_long_double" = yes; then
6967 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6968$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6969{ as_fn_set_status 77
6970as_fn_error "cannot compute sizeof (long double)
6971See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006972 else
6973 ac_cv_sizeof_long_double=0
6974 fi
6975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006976
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6979$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006980
6981
6982
6983cat >>confdefs.h <<_ACEOF
6984#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6985_ACEOF
6986
6987
6988fi
6989
6990
Matthias Kloseb9621712010-04-24 17:59:49 +00006991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6992$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006993have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006995/* end confdefs.h. */
6996
6997int
6998main ()
6999{
7000_Bool x; x = (_Bool)0;
7001 ;
7002 return 0;
7003}
7004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007005if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007006
7007
Matthias Kloseb9621712010-04-24 17:59:49 +00007008$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007009
7010 have_c99_bool=yes
7011
Thomas Woutersb2137042007-02-01 18:02:27 +00007012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7015$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007016if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007017# The cast to long int works around a bug in the HP C Compiler
7018# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7019# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7020# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7022$as_echo_n "checking size of _Bool... " >&6; }
7023if test "${ac_cv_sizeof__Bool+set}" = set; then :
7024 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007025else
Matthias Kloseb9621712010-04-24 17:59:49 +00007026 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 +00007027
Thomas Woutersb2137042007-02-01 18:02:27 +00007028else
Matthias Kloseb9621712010-04-24 17:59:49 +00007029 if test "$ac_cv_type__Bool" = yes; then
7030 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7032{ as_fn_set_status 77
7033as_fn_error "cannot compute sizeof (_Bool)
7034See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007035 else
7036 ac_cv_sizeof__Bool=0
7037 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007039
Thomas Woutersb2137042007-02-01 18:02:27 +00007040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7042$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007043
7044
7045
Thomas Woutersb2137042007-02-01 18:02:27 +00007046cat >>confdefs.h <<_ACEOF
7047#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7048_ACEOF
7049
7050
7051fi
7052
Matthias Kloseb9621712010-04-24 17:59:49 +00007053ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007054 #include <stdint.h>
7055 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007056"
7057if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007058
7059cat >>confdefs.h <<_ACEOF
7060#define HAVE_UINTPTR_T 1
7061_ACEOF
7062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007063# The cast to long int works around a bug in the HP C Compiler
7064# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7065# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7066# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7068$as_echo_n "checking size of uintptr_t... " >&6; }
7069if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7070 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007071else
Matthias Kloseb9621712010-04-24 17:59:49 +00007072 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 +00007073
Martin v. Löwis11437992002-04-12 09:54:03 +00007074else
Matthias Kloseb9621712010-04-24 17:59:49 +00007075 if test "$ac_cv_type_uintptr_t" = yes; then
7076 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7077$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7078{ as_fn_set_status 77
7079as_fn_error "cannot compute sizeof (uintptr_t)
7080See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007081 else
7082 ac_cv_sizeof_uintptr_t=0
7083 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007084fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007085
Martin v. Löwis11437992002-04-12 09:54:03 +00007086fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7088$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007089
7090
7091
Martin v. Löwis11437992002-04-12 09:54:03 +00007092cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007093#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007094_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007095
Michael W. Hudson54241132001-12-07 15:38:26 +00007096
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007097fi
7098
Thomas Wouters89f507f2006-12-13 04:49:30 +00007099
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007100# The cast to long int works around a bug in the HP C Compiler
7101# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7102# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7103# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7105$as_echo_n "checking size of off_t... " >&6; }
7106if test "${ac_cv_sizeof_off_t+set}" = set; then :
7107 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007108else
Matthias Kloseb9621712010-04-24 17:59:49 +00007109 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007110#ifdef HAVE_SYS_TYPES_H
7111#include <sys/types.h>
7112#endif
7113
Matthias Kloseb9621712010-04-24 17:59:49 +00007114"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007115
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007116else
Matthias Kloseb9621712010-04-24 17:59:49 +00007117 if test "$ac_cv_type_off_t" = yes; then
7118 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7119$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7120{ as_fn_set_status 77
7121as_fn_error "cannot compute sizeof (off_t)
7122See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007123 else
7124 ac_cv_sizeof_off_t=0
7125 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007127
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7130$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007131
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007132
7133
Martin v. Löwis11437992002-04-12 09:54:03 +00007134cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007135#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007136_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007137
Michael W. Hudson54241132001-12-07 15:38:26 +00007138
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007139
Matthias Kloseb9621712010-04-24 17:59:49 +00007140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7141$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007142if test "$have_long_long" = yes
7143then
7144if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007145 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007146
Matthias Kloseb9621712010-04-24 17:59:49 +00007147$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007148
Matthias Kloseb9621712010-04-24 17:59:49 +00007149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7150$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007151else
Matthias Kloseb9621712010-04-24 17:59:49 +00007152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7153$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007154fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007155else
Matthias Kloseb9621712010-04-24 17:59:49 +00007156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7157$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007158fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007159
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007160# The cast to long int works around a bug in the HP C Compiler
7161# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7162# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7163# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7165$as_echo_n "checking size of time_t... " >&6; }
7166if test "${ac_cv_sizeof_time_t+set}" = set; then :
7167 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007168else
Matthias Kloseb9621712010-04-24 17:59:49 +00007169 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007170#ifdef HAVE_SYS_TYPES_H
7171#include <sys/types.h>
7172#endif
7173#ifdef HAVE_TIME_H
7174#include <time.h>
7175#endif
7176
Matthias Kloseb9621712010-04-24 17:59:49 +00007177"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007178
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007179else
Matthias Kloseb9621712010-04-24 17:59:49 +00007180 if test "$ac_cv_type_time_t" = yes; then
7181 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7182$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7183{ as_fn_set_status 77
7184as_fn_error "cannot compute sizeof (time_t)
7185See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007186 else
7187 ac_cv_sizeof_time_t=0
7188 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007189fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007190
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7193$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007194
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007195
7196
Martin v. Löwis11437992002-04-12 09:54:03 +00007197cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007198#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007199_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007200
Michael W. Hudson54241132001-12-07 15:38:26 +00007201
7202
Trent Mick635f6fb2000-08-23 21:33:05 +00007203# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007204ac_save_cc="$CC"
7205if test "$ac_cv_kpthread" = "yes"
7206then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007207elif test "$ac_cv_kthread" = "yes"
7208then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007209elif test "$ac_cv_pthread" = "yes"
7210then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007211fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007212
Matthias Kloseb9621712010-04-24 17:59:49 +00007213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7214$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007215have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007217/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007218
7219 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007220int
7221main ()
7222{
Guido van Rossum12580492000-09-24 16:47:19 +00007223pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007224 ;
7225 return 0;
7226}
Matthias Kloseb159a552010-04-25 21:00:44 +00007227
Martin v. Löwis11437992002-04-12 09:54:03 +00007228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007229if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007230 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7234$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007235if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007236 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007237# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7238# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7239# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7241$as_echo_n "checking size of pthread_t... " >&6; }
7242if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7243 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007244else
Matthias Kloseb9621712010-04-24 17:59:49 +00007245 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007246#ifdef HAVE_PTHREAD_H
7247#include <pthread.h>
7248#endif
7249
Matthias Kloseb9621712010-04-24 17:59:49 +00007250"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007251
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007252else
Matthias Kloseb9621712010-04-24 17:59:49 +00007253 if test "$ac_cv_type_pthread_t" = yes; then
7254 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7255$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7256{ as_fn_set_status 77
7257as_fn_error "cannot compute sizeof (pthread_t)
7258See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259 else
7260 ac_cv_sizeof_pthread_t=0
7261 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007263
Trent Mick635f6fb2000-08-23 21:33:05 +00007264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7266$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007267
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007268
7269
Martin v. Löwis11437992002-04-12 09:54:03 +00007270cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007271#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007272_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007273
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007274
Trent Mick635f6fb2000-08-23 21:33:05 +00007275fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007276CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007277
Michael W. Hudson54241132001-12-07 15:38:26 +00007278
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007279case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007280 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007281 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7282 ;;
7283 Darwin/*)
7284 OTHER_LIBTOOL_OPT=""
7285 ;;
7286esac
7287
7288
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007289ARCH_RUN_32BIT=""
7290
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007291case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007292 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007293 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7294 if test "${enable_universalsdk}"; then
7295 :
7296 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007297 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007298 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007299 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007300 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007301 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007302 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007303 if test ${gcc_version} '<' 4.0
7304 then
7305 LIBTOOL_CRUFT="-lcc_dynamic"
7306 else
7307 LIBTOOL_CRUFT=""
7308 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007309 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007310 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007311else
Matthias Kloseb9621712010-04-24 17:59:49 +00007312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007313/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007314
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007315 #include <unistd.h>
7316 int main(int argc, char*argv[])
7317 {
7318 if (sizeof(long) == 4) {
7319 return 0;
7320 } else {
7321 return 1;
7322 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007323 }
7324
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007326if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007327 ac_osx_32bit=yes
7328else
Matthias Kloseb9621712010-04-24 17:59:49 +00007329 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007331rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7332 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007333fi
7334
7335
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007336 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007337 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007338 i386)
7339 MACOSX_DEFAULT_ARCH="i386"
7340 ;;
7341 ppc)
7342 MACOSX_DEFAULT_ARCH="ppc"
7343 ;;
7344 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007345 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007346 ;;
7347 esac
7348 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007349 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007350 i386)
7351 MACOSX_DEFAULT_ARCH="x86_64"
7352 ;;
7353 ppc)
7354 MACOSX_DEFAULT_ARCH="ppc64"
7355 ;;
7356 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007357 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007358 ;;
7359 esac
7360
7361 #ARCH_RUN_32BIT="true"
7362 fi
7363
7364 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007365 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007366 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007367esac
7368
Matthias Kloseb9621712010-04-24 17:59:49 +00007369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7370$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007371if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007372then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007373 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007374 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007375 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007376
Matthias Kloseb9621712010-04-24 17:59:49 +00007377$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007378
Matthias Kloseb9621712010-04-24 17:59:49 +00007379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7380$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007381 if test $enable_shared = "yes"
7382 then
Matthias Kloseb9621712010-04-24 17:59:49 +00007383 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 +00007384 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007385else
Matthias Kloseb9621712010-04-24 17:59:49 +00007386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7387$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007388fi
7389
Matthias Kloseb9621712010-04-24 17:59:49 +00007390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7391$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007392case $ac_sys_system/$ac_sys_release in
7393 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007394
Matthias Kloseb9621712010-04-24 17:59:49 +00007395$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007396
Matthias Kloseb9621712010-04-24 17:59:49 +00007397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7398$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007399 ;;
7400 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7402$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007403 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007404esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007405
Guido van Rossum0a516c91994-09-12 10:58:40 +00007406# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007407
Michael W. Hudson54241132001-12-07 15:38:26 +00007408
7409
7410
7411
Benjamin Peterson99f03762010-04-11 22:15:28 +00007412
Guido van Rossum0a516c91994-09-12 10:58:40 +00007413# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007414# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Kloseb9621712010-04-24 17:59:49 +00007415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7416$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007417if test -z "$SO"
7418then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007419 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +00007420 hp*|HP*)
7421 case `uname -m` in
7422 ia64) SO=.so;;
7423 *) SO=.sl;;
7424 esac
7425 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007426 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007427 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007428 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007429else
7430 # this might also be a termcap variable, see #610332
7431 echo
7432 echo '====================================================================='
7433 echo '+ +'
7434 echo '+ WARNING: You have set SO in your environment. +'
7435 echo '+ Do you really mean to change the extension for shared libraries? +'
7436 echo '+ Continuing in 10 seconds to let you to ponder. +'
7437 echo '+ +'
7438 echo '====================================================================='
7439 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007440fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7442$as_echo "$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00007443
Georg Brandlb1441c72009-01-03 22:33:39 +00007444
Thomas Wouters477c8d52006-05-27 19:21:47 +00007445cat >>confdefs.h <<_ACEOF
7446#define SHLIB_EXT "$SO"
7447_ACEOF
7448
Guido van Rossum0a516c91994-09-12 10:58:40 +00007449# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007450# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007451# (Shared libraries in this instance are shared modules to be loaded into
7452# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7454$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007455if test -z "$LDSHARED"
7456then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007457 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007458 AIX*)
7459 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007460 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007461 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007462 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007463 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007464 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007465 if test "$GCC" = "yes" ; then
7466 LDSHARED='$(CC) -shared'
7467 LDCXXSHARED='$(CXX) -shared'
7468 else
7469 LDSHARED='$(CC) -G'
7470 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007471 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007472 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007473 if test "$GCC" = "yes" ; then
7474 LDSHARED='$(CC) -shared'
7475 LDCXXSHARED='$(CXX) -shared'
7476 else
7477 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007478 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007479 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007480 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00007481 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007482 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007483 if test "$enable_framework" ; then
7484 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007485 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7486 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007487 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007488 else
7489 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007490 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007491 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007492 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007493 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00007494 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007495 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007496 if test "$enable_framework" ; then
7497 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007498 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7499 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007500 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007501 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007502 # No framework, use the Python app as bundle-loader
7503 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007504 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007505 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007506 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007507 Darwin/*)
7508 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7509 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007510
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007511 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007512 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007513 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007514 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007515 fi
Jack Jansen6b08a402004-06-03 12:41:45 +00007516 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007517 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007518 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007519 else
7520 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007521 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007522 if test "$enable_framework" ; then
7523 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007524 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7525 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007526 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007527 else
7528 # No framework, use the Python app as bundle-loader
7529 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7530 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007531 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007532 fi
7533 fi
7534 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007535 Linux*|GNU*|QNX*)
7536 LDSHARED='$(CC) -shared'
7537 LDCXXSHARED='$(CXX) -shared';;
7538 BSD/OS*/4*)
7539 LDSHARED="gcc -shared"
7540 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007541 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007542 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007543 then
Benjamin Petersonab0a7522010-03-14 15:18:25 +00007544 LDSHARED='$(CC) -shared ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007545 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007546 else
7547 LDSHARED="ld -Bshareable ${LDFLAGS}"
7548 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007549 OpenBSD*)
7550 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7551 then
7552 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007553 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007554 else
7555 case `uname -r` in
7556 [01].* | 2.[0-7] | 2.[0-7].*)
7557 LDSHARED="ld -Bshareable ${LDFLAGS}"
7558 ;;
7559 *)
7560 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007561 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007562 ;;
7563 esac
7564 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007565 NetBSD*|DragonFly*)
7566 LDSHARED="cc -shared ${LDFLAGS}"
7567 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007568 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007569 if test "$GCC" = "yes" ; then
7570 LDSHARED='$(CC) -shared'
7571 LDCXXSHARED='$(CXX) -shared'
7572 else
7573 LDSHARED='$(CC) -G'
7574 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007575 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007576 SCO_SV*)
7577 LDSHARED='$(CC) -Wl,-G,-Bexport'
7578 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7579 CYGWIN*)
7580 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7581 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007582 *) LDSHARED="ld";;
7583 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7586$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007587LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007588BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007589# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007590# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7592$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007593if test -z "$CCSHARED"
7594then
Guido van Rossum07397971997-04-29 21:49:50 +00007595 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007596 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007597 then CCSHARED="-fPIC";
7598 elif test `uname -p` = sparc;
7599 then CCSHARED="-xcode=pic32";
7600 else CCSHARED="-Kpic";
7601 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007602 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007603 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007604 else CCSHARED="+z";
7605 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007606 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007607 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007608 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007609 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007610 if test "$GCC" = "yes"
7611 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007612 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007613 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007614 SCO_SV*)
7615 if test "$GCC" = "yes"
7616 then CCSHARED="-fPIC"
7617 else CCSHARED="-Kpic -belf"
7618 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007619 IRIX*/6*) case $CC in
7620 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007621 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007622 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007623 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7626$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007627# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007628# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7630$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007631if test -z "$LINKFORSHARED"
7632then
Guido van Rossum07397971997-04-29 21:49:50 +00007633 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007634 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007635 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007636 LINKFORSHARED="-Wl,-E -Wl,+s";;
7637# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007638 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007639 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007640 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007641 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007642 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007643 if test "$enable_framework"
7644 then
Jack Jansenda49e192005-01-07 13:08:22 +00007645 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007646 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007647 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007648 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007649 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007650 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007651 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007652 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7653 then
7654 LINKFORSHARED="-Wl,--export-dynamic"
7655 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007656 SunOS/5*) case $CC in
7657 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007658 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007659 then
7660 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007661 fi;;
7662 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007663 CYGWIN*)
7664 if test $enable_shared = "no"
7665 then
7666 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7667 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007668 QNX*)
7669 # -Wl,-E causes the symbols to be added to the dynamic
7670 # symbol table so that they can be found when a module
7671 # is loaded. -N 2048K causes the stack size to be set
7672 # to 2048 kilobytes so that the stack doesn't overflow
7673 # when running test_compile.py.
7674 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007675 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7678$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007679
Michael W. Hudson54241132001-12-07 15:38:26 +00007680
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007681
Matthias Kloseb9621712010-04-24 17:59:49 +00007682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7683$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007684if test ! "$LIBRARY" = "$LDLIBRARY"
7685then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007686 case $ac_sys_system in
7687 CYGWIN*)
7688 # Cygwin needs CCSHARED when building extension DLLs
7689 # but not when building the interpreter DLL.
7690 CFLAGSFORSHARED='';;
7691 *)
7692 CFLAGSFORSHARED='$(CCSHARED)'
7693 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7696$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007697
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007698# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7699# library (with --enable-shared).
7700# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007701# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7702# if it is not required, since it creates a dependency of the shared library
7703# to LIBS. This, in turn, means that applications linking the shared libpython
7704# don't need to link LIBS explicitly. The default should be only changed
7705# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007706
Matthias Kloseb9621712010-04-24 17:59:49 +00007707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7708$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007709case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007710 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007711 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007712esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7714$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007715
7716
Guido van Rossum627b2d71993-12-24 10:39:16 +00007717# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7719$as_echo_n "checking for dlopen in -ldl... " >&6; }
7720if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7721 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007722else
Martin v. Löwis11437992002-04-12 09:54:03 +00007723 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007724LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007728/* Override any GCC internal prototype to avoid an error.
7729 Use char because int might match the return type of a GCC
7730 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007731#ifdef __cplusplus
7732extern "C"
7733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007734char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007735int
7736main ()
7737{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007738return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007739 ;
7740 return 0;
7741}
7742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007743if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007744 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007745else
Matthias Kloseb9621712010-04-24 17:59:49 +00007746 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007748rm -f core conftest.err conftest.$ac_objext \
7749 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007750LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7753$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7754if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007755 cat >>confdefs.h <<_ACEOF
7756#define HAVE_LIBDL 1
7757_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007758
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007759 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007760
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007761fi
7762 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7764$as_echo_n "checking for shl_load in -ldld... " >&6; }
7765if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7766 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007767else
Martin v. Löwis11437992002-04-12 09:54:03 +00007768 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007769LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007773/* Override any GCC internal prototype to avoid an error.
7774 Use char because int might match the return type of a GCC
7775 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007776#ifdef __cplusplus
7777extern "C"
7778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007779char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007780int
7781main ()
7782{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007783return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007784 ;
7785 return 0;
7786}
7787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007788if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007789 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007790else
Matthias Kloseb9621712010-04-24 17:59:49 +00007791 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007793rm -f core conftest.err conftest.$ac_objext \
7794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007795LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7798$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7799if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007800 cat >>confdefs.h <<_ACEOF
7801#define HAVE_LIBDLD 1
7802_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007803
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007804 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007805
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007806fi
7807 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007808
Georg Brandlb1441c72009-01-03 22:33:39 +00007809# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007810if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7812$as_echo_n "checking for library containing sem_init... " >&6; }
7813if test "${ac_cv_search_sem_init+set}" = set; then :
7814 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007815else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007816 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007819
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007820/* Override any GCC internal prototype to avoid an error.
7821 Use char because int might match the return type of a GCC
7822 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007823#ifdef __cplusplus
7824extern "C"
7825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007826char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007827int
7828main ()
7829{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007831 ;
7832 return 0;
7833}
7834_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835for ac_lib in '' pthread rt posix4; do
7836 if test -z "$ac_lib"; then
7837 ac_res="none required"
7838 else
7839 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007840 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007841 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007845rm -f core conftest.err conftest.$ac_objext \
7846 conftest$ac_exeext
7847 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007848 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850done
Matthias Kloseb9621712010-04-24 17:59:49 +00007851if test "${ac_cv_search_sem_init+set}" = set; then :
7852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007853else
7854 ac_cv_search_sem_init=no
7855fi
7856rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007857LIBS=$ac_func_search_save_LIBS
7858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7860$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007862if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007863 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007864
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007865fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007866 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007867 # posix4 on Solaris 2.6
7868 # pthread (first!) on Linux
7869fi
7870
Martin v. Löwis19d17342003-06-14 21:03:05 +00007871# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7873$as_echo_n "checking for textdomain in -lintl... " >&6; }
7874if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7875 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007876else
7877 ac_check_lib_save_LIBS=$LIBS
7878LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007880/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007882/* Override any GCC internal prototype to avoid an error.
7883 Use char because int might match the return type of a GCC
7884 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007885#ifdef __cplusplus
7886extern "C"
7887#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007888char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007889int
7890main ()
7891{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007893 ;
7894 return 0;
7895}
7896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007897if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007898 ac_cv_lib_intl_textdomain=yes
7899else
Matthias Kloseb9621712010-04-24 17:59:49 +00007900 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007902rm -f core conftest.err conftest.$ac_objext \
7903 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007904LIBS=$ac_check_lib_save_LIBS
7905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7907$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7908if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007909
Matthias Kloseb9621712010-04-24 17:59:49 +00007910$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007911
Brett Cannonc6d936e2009-06-07 20:09:53 +00007912 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007913fi
7914
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007915
7916# checks for system dependent C++ extensions support
7917case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007918 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7919$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007921/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007922
7923 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007924int
7925main ()
7926{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007927loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007928 ;
7929 return 0;
7930}
Matthias Kloseb159a552010-04-25 21:00:44 +00007931
Martin v. Löwis11437992002-04-12 09:54:03 +00007932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007933if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007934
Matthias Kloseb159a552010-04-25 21:00:44 +00007935
Matthias Kloseb9621712010-04-24 17:59:49 +00007936$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007937
Matthias Kloseb159a552010-04-25 21:00:44 +00007938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007939$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007940
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007941else
Matthias Kloseb159a552010-04-25 21:00:44 +00007942
7943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007944$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007945
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007947rm -f core conftest.err conftest.$ac_objext \
7948 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007949 *) ;;
7950esac
7951
Guido van Rossum70c7f481998-03-26 18:44:10 +00007952# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7954$as_echo_n "checking for t_open in -lnsl... " >&6; }
7955if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7956 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007957else
Martin v. Löwis11437992002-04-12 09:54:03 +00007958 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007959LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007962
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007963/* Override any GCC internal prototype to avoid an error.
7964 Use char because int might match the return type of a GCC
7965 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007966#ifdef __cplusplus
7967extern "C"
7968#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007969char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007970int
7971main ()
7972{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007974 ;
7975 return 0;
7976}
7977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007978if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007979 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007980else
Matthias Kloseb9621712010-04-24 17:59:49 +00007981 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007983rm -f core conftest.err conftest.$ac_objext \
7984 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007985LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007986fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7988$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
7989if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007990 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007991fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007992 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7994$as_echo_n "checking for socket in -lsocket... " >&6; }
7995if test "${ac_cv_lib_socket_socket+set}" = set; then :
7996 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007997else
Martin v. Löwis11437992002-04-12 09:54:03 +00007998 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007999LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008002
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008003/* Override any GCC internal prototype to avoid an error.
8004 Use char because int might match the return type of a GCC
8005 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008006#ifdef __cplusplus
8007extern "C"
8008#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008009char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008010int
8011main ()
8012{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008014 ;
8015 return 0;
8016}
8017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008018if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008019 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008020else
Matthias Kloseb9621712010-04-24 17:59:49 +00008021 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008022fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008023rm -f core conftest.err conftest.$ac_objext \
8024 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008025LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008026fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8028$as_echo "$ac_cv_lib_socket_socket" >&6; }
8029if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008030 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008031fi
8032 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008033
Matthias Kloseb9621712010-04-24 17:59:49 +00008034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8035$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008036
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008037# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008038if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8041$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008042LIBS="$withval $LIBS"
8043
8044else
Matthias Kloseb9621712010-04-24 17:59:49 +00008045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8046$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008047fi
8048
Guido van Rossum7f43da71994-08-01 12:15:30 +00008049
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008050if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008051 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8052set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8054$as_echo_n "checking for $ac_word... " >&6; }
8055if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8056 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008057else
8058 case $PKG_CONFIG in
8059 [\\/]* | ?:[\\/]*)
8060 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8061 ;;
8062 *)
8063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8064for as_dir in $PATH
8065do
8066 IFS=$as_save_IFS
8067 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008068 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008069 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8070 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008072 break 2
8073 fi
8074done
Matthias Kloseb9621712010-04-24 17:59:49 +00008075 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008076IFS=$as_save_IFS
8077
8078 ;;
8079esac
8080fi
8081PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8082if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8084$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008085else
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8087$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008088fi
8089
8090
8091fi
8092if test -z "$ac_cv_path_PKG_CONFIG"; then
8093 ac_pt_PKG_CONFIG=$PKG_CONFIG
8094 # Extract the first word of "pkg-config", so it can be a program name with args.
8095set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8097$as_echo_n "checking for $ac_word... " >&6; }
8098if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8099 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008100else
8101 case $ac_pt_PKG_CONFIG in
8102 [\\/]* | ?:[\\/]*)
8103 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8104 ;;
8105 *)
8106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8107for as_dir in $PATH
8108do
8109 IFS=$as_save_IFS
8110 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008111 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008112 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8113 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008115 break 2
8116 fi
8117done
Matthias Kloseb9621712010-04-24 17:59:49 +00008118 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008119IFS=$as_save_IFS
8120
8121 ;;
8122esac
8123fi
8124ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8125if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8127$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008128else
Matthias Kloseb9621712010-04-24 17:59:49 +00008129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8130$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008131fi
8132
8133 if test "x$ac_pt_PKG_CONFIG" = x; then
8134 PKG_CONFIG=""
8135 else
8136 case $cross_compiling:$ac_tool_warned in
8137yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008138{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8139$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008140ac_tool_warned=yes ;;
8141esac
8142 PKG_CONFIG=$ac_pt_PKG_CONFIG
8143 fi
8144else
8145 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8146fi
8147
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008148
8149# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8151$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008152
8153# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008154if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008155 withval=$with_system_expat;
8156fi
8157
8158
Matthias Kloseb9621712010-04-24 17:59:49 +00008159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8160$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008161
8162# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8164$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008165
8166# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008167if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008168 withval=$with_system_ffi;
8169fi
8170
8171
8172if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008173 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8174else
8175 LIBFFI_INCLUDEDIR=""
8176fi
8177
8178
Matthias Kloseb9621712010-04-24 17:59:49 +00008179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8180$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008181
Matthias Klose55708cc2009-04-30 08:06:49 +00008182# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8184$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008185
8186# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008187if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008188 withval=$with_dbmliborder;
8189if test x$with_dbmliborder = xyes
8190then
Matthias Kloseb9621712010-04-24 17:59:49 +00008191as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008192else
8193 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8194 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8195 then
Matthias Kloseb9621712010-04-24 17:59:49 +00008196 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008197 fi
8198 done
8199fi
8200fi
8201
Matthias Kloseb9621712010-04-24 17:59:49 +00008202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8203$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008204
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008205# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008206
8207
Matthias Kloseb9621712010-04-24 17:59:49 +00008208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8209$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008210
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008211# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008212if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008213 withval=$with_signal_module;
8214fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008215
8216
8217if test -z "$with_signal_module"
8218then with_signal_module="yes"
8219fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8221$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008222
8223if test "${with_signal_module}" = "yes"; then
8224 USE_SIGNAL_MODULE=""
8225 SIGNAL_OBJS=""
8226else
8227 USE_SIGNAL_MODULE="#"
8228 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8229fi
8230
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008231# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008232
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008233USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008234
Matthias Kloseb9621712010-04-24 17:59:49 +00008235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8236$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008237
Guido van Rossumec2f0731997-01-22 20:54:01 +00008238
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008240if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008241 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8243$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008244LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008245if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008246 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008247fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008248else
Matthias Kloseb9621712010-04-24 17:59:49 +00008249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8250$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008251fi
8252
Martin v. Löwis11437992002-04-12 09:54:03 +00008253
8254# Templates for things AC_DEFINEd more than once.
8255# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008256
8257
Martin v. Löwis11437992002-04-12 09:54:03 +00008258
8259
Matthias Kloseb9621712010-04-24 17:59:49 +00008260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8261$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008262
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008264if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008265 withval=$with_threads;
8266fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008267
8268
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008269# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008270
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008271# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008272if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008273 withval=$with_thread; with_threads=$with_thread
8274fi
8275
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008276
8277if test -z "$with_threads"
8278then with_threads="yes"
8279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8281$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008282
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008283
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008284if test "$with_threads" = "no"
8285then
8286 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008287elif test "$ac_cv_pthread_is_default" = yes
8288then
Matthias Kloseb9621712010-04-24 17:59:49 +00008289 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008290
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008291 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008292 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008293
8294 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008295 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008296elif test "$ac_cv_kpthread" = "yes"
8297then
8298 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008299 if test "$ac_cv_cxx_thread" = "yes"; then
8300 CXX="$CXX -Kpthread"
8301 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008302 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008303
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008304 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008305 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008306elif test "$ac_cv_kthread" = "yes"
8307then
8308 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008309 if test "$ac_cv_cxx_thread" = "yes"; then
8310 CXX="$CXX -Kthread"
8311 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008312 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008313
8314 posix_threads=yes
8315 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008316elif test "$ac_cv_pthread" = "yes"
8317then
8318 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008319 if test "$ac_cv_cxx_thread" = "yes"; then
8320 CXX="$CXX -pthread"
8321 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008322 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008323
8324 posix_threads=yes
8325 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008326else
8327 if test ! -z "$with_threads" -a -d "$with_threads"
8328 then LDFLAGS="$LDFLAGS -L$with_threads"
8329 fi
8330 if test ! -z "$withval" -a -d "$withval"
8331 then LDFLAGS="$LDFLAGS -L$withval"
8332 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008333
8334 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008335 # define _POSIX_THREADS in unistd.h. Some apparently don't
8336 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8338$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008340/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008341
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008342#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008343#ifdef _POSIX_THREADS
8344yes
8345#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008346
8347_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008348if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008349 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008350 unistd_defines_pthreads=yes
8351else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008352 unistd_defines_pthreads=no
8353fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008354rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008355
Matthias Kloseb9621712010-04-24 17:59:49 +00008356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8357$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008358
Matthias Kloseb9621712010-04-24 17:59:49 +00008359 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008360
Matthias Kloseb9621712010-04-24 17:59:49 +00008361 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8362if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8363 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008364
Matthias Kloseb9621712010-04-24 17:59:49 +00008365 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008366
Martin v. Löwis11437992002-04-12 09:54:03 +00008367
Matthias Kloseb9621712010-04-24 17:59:49 +00008368$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008369
8370 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008371 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008372else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008373
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8375if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8376 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008377
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008379
Martin v. Löwis11437992002-04-12 09:54:03 +00008380
Matthias Kloseb9621712010-04-24 17:59:49 +00008381$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008382
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008383 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008384else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008385
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008386 # Just looking for pthread_create in libpthread is not enough:
8387 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8388 # So we really have to include pthread.h, and then link.
8389 _libs=$LIBS
8390 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8392$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008394/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008395#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008396
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008397void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008398int
8399main ()
8400{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008401
8402pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008403 ;
8404 return 0;
8405}
8406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008407if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008408
Matthias Kloseb9621712010-04-24 17:59:49 +00008409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8410$as_echo "yes" >&6; }
8411 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008412
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008413 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008414 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008415else
Martin v. Löwis11437992002-04-12 09:54:03 +00008416
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008417 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008418 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8419if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8420 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008421
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008422 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008423 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008424else
Guido van Rossumad678af1998-10-02 14:42:15 +00008425
Matthias Kloseb9621712010-04-24 17:59:49 +00008426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8427$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8428if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8429 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008430else
Martin v. Löwis11437992002-04-12 09:54:03 +00008431 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008432LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008434/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008435
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008436/* Override any GCC internal prototype to avoid an error.
8437 Use char because int might match the return type of a GCC
8438 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008439#ifdef __cplusplus
8440extern "C"
8441#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008442char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008443int
8444main ()
8445{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008446return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008447 ;
8448 return 0;
8449}
8450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008451if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008452 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008453else
Matthias Kloseb9621712010-04-24 17:59:49 +00008454 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008456rm -f core conftest.err conftest.$ac_objext \
8457 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008458LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008459fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8461$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8462if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8463 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008464
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008465 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008466 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008467 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008468else
Greg Steinadf63d62000-07-05 10:38:09 +00008469
Matthias Kloseb9621712010-04-24 17:59:49 +00008470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8471$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8472if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8473 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008474else
Martin v. Löwis11437992002-04-12 09:54:03 +00008475 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008476LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008478/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008479
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008480/* Override any GCC internal prototype to avoid an error.
8481 Use char because int might match the return type of a GCC
8482 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008483#ifdef __cplusplus
8484extern "C"
8485#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008486char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008487int
8488main ()
8489{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008490return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008491 ;
8492 return 0;
8493}
8494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008495if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008496 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008497else
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008499fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008500rm -f core conftest.err conftest.$ac_objext \
8501 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008502LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008503fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8505$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8506if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8507 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008508
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008509 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008510 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008511 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008512else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008513
Matthias Kloseb9621712010-04-24 17:59:49 +00008514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8515$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8516if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8517 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008518else
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008520LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008523
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008524/* Override any GCC internal prototype to avoid an error.
8525 Use char because int might match the return type of a GCC
8526 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008527#ifdef __cplusplus
8528extern "C"
8529#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008530char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008531int
8532main ()
8533{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008534return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008535 ;
8536 return 0;
8537}
8538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008539if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008540 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008541else
Matthias Kloseb9621712010-04-24 17:59:49 +00008542 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008544rm -f core conftest.err conftest.$ac_objext \
8545 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008546LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8549$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8550if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8551 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008552
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008553 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008554 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008555 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008556else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008557
Matthias Kloseb9621712010-04-24 17:59:49 +00008558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8559$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8560if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8561 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008562else
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008564LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008566/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008567
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008568/* Override any GCC internal prototype to avoid an error.
8569 Use char because int might match the return type of a GCC
8570 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008571#ifdef __cplusplus
8572extern "C"
8573#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008574char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008575int
8576main ()
8577{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008578return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 ;
8580 return 0;
8581}
8582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008583if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008584 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008585else
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008588rm -f core conftest.err conftest.$ac_objext \
8589 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008590LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8593$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8594if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8595 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008596
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008597 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008598 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008599 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008600else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008601
Martin v. Löwis130fb172001-07-19 11:00:41 +00008602 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008603fi
8604
Guido van Rossum627b2d71993-12-24 10:39:16 +00008605
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008606fi
8607
Guido van Rossum0be3e491997-05-22 20:33:33 +00008608fi
8609
Guido van Rossum49545951997-12-02 19:28:29 +00008610fi
8611
Guido van Rossumb93a8621998-05-07 13:27:32 +00008612fi
8613
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008615rm -f core conftest.err conftest.$ac_objext \
8616 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617fi
8618
Martin v. Löwis11437992002-04-12 09:54:03 +00008619
8620fi
8621
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008622
Michael W. Hudson54241132001-12-07 15:38:26 +00008623
Matthias Kloseb9621712010-04-24 17:59:49 +00008624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8625$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8626if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8627 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008628else
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008630LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008632/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008634/* Override any GCC internal prototype to avoid an error.
8635 Use char because int might match the return type of a GCC
8636 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008637#ifdef __cplusplus
8638extern "C"
8639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008640char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008641int
8642main ()
8643{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008644return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008645 ;
8646 return 0;
8647}
8648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008649if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008650 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008651else
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008654rm -f core conftest.err conftest.$ac_objext \
8655 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008656LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8659$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8660if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8661 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008662
Martin v. Löwis130fb172001-07-19 11:00:41 +00008663 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008664 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008665 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008666fi
8667
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008668
Neal Norwitza978ab02002-11-02 16:58:05 +00008669 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8671$as_echo_n "checking for thr_create in -lthread... " >&6; }
8672if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8673 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008674else
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008676LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008680/* Override any GCC internal prototype to avoid an error.
8681 Use char because int might match the return type of a GCC
8682 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008683#ifdef __cplusplus
8684extern "C"
8685#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008686char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008687int
8688main ()
8689{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008690return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008691 ;
8692 return 0;
8693}
8694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008695if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008697else
Matthias Kloseb9621712010-04-24 17:59:49 +00008698 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008700rm -f core conftest.err conftest.$ac_objext \
8701 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008702LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8705$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8706if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8707 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008708
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008709 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008710 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008711 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008712fi
8713
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008714 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008715
Martin v. Löwis130fb172001-07-19 11:00:41 +00008716 if test "$USE_THREAD_MODULE" != "#"
8717 then
8718 # If the above checks didn't disable threads, (at least) OSF1
8719 # needs this '-threads' argument during linking.
8720 case $ac_sys_system in
8721 OSF1) LDLAST=-threads;;
8722 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008723 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008724fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008725
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008726if test "$posix_threads" = "yes"; then
8727 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008728
Matthias Kloseb9621712010-04-24 17:59:49 +00008729$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008730
8731 fi
8732
8733 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8734 case $ac_sys_system/$ac_sys_release in
8735 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008736$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008737
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008738 ;;
8739 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008740$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008741
8742 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008743 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008744$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008745
8746 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008747 esac
8748
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8750$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8751 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8752 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008753else
Matthias Kloseb9621712010-04-24 17:59:49 +00008754 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008755 ac_cv_pthread_system_supported=no
8756else
Matthias Kloseb9621712010-04-24 17:59:49 +00008757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008758/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008759#include <pthread.h>
8760 void *foo(void *parm) {
8761 return NULL;
8762 }
8763 main() {
8764 pthread_attr_t attr;
8765 pthread_t id;
8766 if (pthread_attr_init(&attr)) exit(-1);
8767 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8768 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8769 exit(0);
8770 }
8771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008772if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008773 ac_cv_pthread_system_supported=yes
8774else
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008779fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008781
Guido van Rossum627b2d71993-12-24 10:39:16 +00008782fi
8783
Matthias Kloseb9621712010-04-24 17:59:49 +00008784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8785$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008786 if test "$ac_cv_pthread_system_supported" = "yes"; then
8787
Matthias Kloseb9621712010-04-24 17:59:49 +00008788$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008789
8790 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 for ac_func in pthread_sigmask
8792do :
8793 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8794if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008795 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008796#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008797_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008798 case $ac_sys_system in
8799 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008800
Matthias Kloseb9621712010-04-24 17:59:49 +00008801$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008802
8803 ;;
8804 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008805fi
8806done
8807
8808fi
8809
8810
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008811# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008812
Matthias Kloseb9621712010-04-24 17:59:49 +00008813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8814$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008815# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008816if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008817 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008818 no)
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 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008823 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8824$as_echo "yes" >&6; }
8825 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008826
8827 ipv6=yes
8828 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008829 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008830else
Martin v. Löwis11437992002-04-12 09:54:03 +00008831
Matthias Kloseb9621712010-04-24 17:59:49 +00008832 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008833
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8835$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008836 ipv6=no
8837
8838else
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008840/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008841 /* AF_INET6 available check */
8842#include <sys/types.h>
8843#include <sys/socket.h>
8844main()
8845{
8846 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8847 exit(1);
8848 else
8849 exit(0);
8850}
8851
Martin v. Löwis11437992002-04-12 09:54:03 +00008852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008853if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008854
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8856$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008857 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008858
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008859else
Matthias Kloseb159a552010-04-25 21:00:44 +00008860
Matthias Kloseb9621712010-04-24 17:59:49 +00008861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8862$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008863 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008864
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8867 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008868fi
8869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008870
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008871if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8873$as_echo_n "checking if RFC2553 API is available... " >&6; }
8874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008875/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008876
8877 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008878#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008879int
8880main ()
8881{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008882struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008883 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 ;
8885 return 0;
8886}
Matthias Kloseb159a552010-04-25 21:00:44 +00008887
Martin v. Löwis11437992002-04-12 09:54:03 +00008888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008889if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008890
8891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008892$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008893 ipv6=yes
8894
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008895else
Matthias Kloseb159a552010-04-25 21:00:44 +00008896
8897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008898$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008899 ipv6=no
8900
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008903fi
8904
8905if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008906 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008907
8908fi
8909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008910fi
8911
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008912
8913ipv6type=unknown
8914ipv6lib=none
8915ipv6trylibc=no
8916
8917if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8919$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008920 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8921 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008922 case $i in
8923 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008925/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008926
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008927#include <netinet/in.h>
8928#ifdef IPV6_INRIA_VERSION
8929yes
8930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008931_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008932if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008934 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008935fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008936rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008937
8938 ;;
8939 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008941/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008942
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008943#include <netinet/in.h>
8944#ifdef __KAME__
8945yes
8946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008947_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008948if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008949 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008950 ipv6type=$i;
8951 ipv6lib=inet6
8952 ipv6libdir=/usr/local/v6/lib
8953 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008955rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956
8957 ;;
8958 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008960/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008961
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008962#include <features.h>
8963#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8964yes
8965#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008966_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008967if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008968 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008969 ipv6type=$i;
8970 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008971fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008972rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008973
8974 ;;
8975 linux-inet6)
8976 if test -d /usr/inet6; then
8977 ipv6type=$i
8978 ipv6lib=inet6
8979 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008980 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008981 fi
8982 ;;
8983 solaris)
8984 if test -f /etc/netconfig; then
8985 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
8986 ipv6type=$i
8987 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988 fi
8989 fi
8990 ;;
8991 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008993/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008994
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008995#include <sys/param.h>
8996#ifdef _TOSHIBA_INET6
8997yes
8998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008999_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009000if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009001 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009002 ipv6type=$i;
9003 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009004 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009005fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009006rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007
9008 ;;
9009 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009011/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009012
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009013#include </usr/local/v6/include/sys/v6config.h>
9014#ifdef __V6D__
9015yes
9016#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009017_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009019 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009020 ipv6type=$i;
9021 ipv6lib=v6;
9022 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009023 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009024fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009025rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009026
9027 ;;
9028 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009030/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009031
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009032#include <sys/param.h>
9033#ifdef _ZETA_MINAMI_INET6
9034yes
9035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009036_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009038 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009039 ipv6type=$i;
9040 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009041 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009042fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009043rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009044
9045 ;;
9046 esac
9047 if test "$ipv6type" != "unknown"; then
9048 break
9049 fi
9050 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9052$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009053fi
9054
9055if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9056 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9057 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9058 echo "using lib$ipv6lib"
9059 else
9060 if test $ipv6trylibc = "yes"; then
9061 echo "using libc"
9062 else
9063 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9064 echo "You need to fetch lib$ipv6lib.a from appropriate"
9065 echo 'ipv6 kit and compile beforehand.'
9066 exit 1
9067 fi
9068 fi
9069fi
9070
Matthias Kloseb9621712010-04-24 17:59:49 +00009071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9072$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009074/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009075
9076 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009077int
9078main ()
9079{
9080FSIORefNum fRef = 0
9081 ;
9082 return 0;
9083}
Matthias Kloseb159a552010-04-25 21:00:44 +00009084
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009086if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009087
Matthias Kloseb159a552010-04-25 21:00:44 +00009088
Matthias Kloseb9621712010-04-24 17:59:49 +00009089$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009090
Matthias Kloseb9621712010-04-24 17:59:49 +00009091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9092$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009093
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009094else
Matthias Kloseb159a552010-04-25 21:00:44 +00009095
Matthias Kloseb9621712010-04-24 17:59:49 +00009096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9097$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009098
9099fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9101
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009102# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9104$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009106# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009107if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009108 withval=$with_doc_strings;
9109fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009110
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009111
9112if test -z "$with_doc_strings"
9113then with_doc_strings="yes"
9114fi
9115if test "$with_doc_strings" != "no"
9116then
9117
Matthias Kloseb9621712010-04-24 17:59:49 +00009118$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009119
9120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9122$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009123
Neil Schemenauera35c6882001-02-27 04:45:05 +00009124# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9126$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009127
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009128# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009129if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009130 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009131if test "$withval" != no
9132then
9133
Matthias Kloseb9621712010-04-24 17:59:49 +00009134$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009135
Matthias Kloseb9621712010-04-24 17:59:49 +00009136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9137$as_echo "yes" >&6; }
9138else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9139$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009140fi
9141else
Matthias Kloseb9621712010-04-24 17:59:49 +00009142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9143$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009144fi
9145
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009146
9147# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9149$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009150
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009151# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009152if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009153 withval=$with_pymalloc;
9154fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009155
Neil Schemenauera35c6882001-02-27 04:45:05 +00009156
Neil Schemenauer16c22972002-03-22 15:34:49 +00009157if test -z "$with_pymalloc"
9158then with_pymalloc="yes"
9159fi
9160if test "$with_pymalloc" != "no"
9161then
Martin v. Löwis11437992002-04-12 09:54:03 +00009162
Matthias Kloseb9621712010-04-24 17:59:49 +00009163$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009164
9165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9167$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009168
Benjamin Peterson05159c42009-12-03 03:01:27 +00009169# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9171$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009172
9173# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009174if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009175 withval=$with_valgrind;
9176else
9177 with_valgrind=no
9178fi
9179
Matthias Kloseb9621712010-04-24 17:59:49 +00009180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9181$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009182if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009183 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9184if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009185
Matthias Kloseb9621712010-04-24 17:59:49 +00009186$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009187
9188else
Matthias Kloseb9621712010-04-24 17:59:49 +00009189 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009190
9191fi
9192
9193
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009194 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009195fi
9196
Barry Warsawef82cd72000-06-30 16:21:01 +00009197# Check for --with-wctype-functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9199$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009201# Check whether --with-wctype-functions was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009202if test "${with_wctype_functions+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009203 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009204if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009205then
9206
Matthias Kloseb9621712010-04-24 17:59:49 +00009207$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009208
Matthias Kloseb9621712010-04-24 17:59:49 +00009209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9210$as_echo "yes" >&6; }
9211else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9212$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009213fi
9214else
Matthias Kloseb9621712010-04-24 17:59:49 +00009215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9216$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009217fi
9218
Barry Warsawef82cd72000-06-30 16:21:01 +00009219
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009220# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009221
Guido van Rossum98935bf2001-09-05 19:13:16 +00009222DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009223
Guido van Rossume97ee181999-12-20 21:27:22 +00009224# the dlopen() function means we might want to use dynload_shlib.o. some
9225# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009226for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009227do :
9228 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9229if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009230 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009231#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009232_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009233
Guido van Rossume97ee181999-12-20 21:27:22 +00009234fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009235done
Guido van Rossume97ee181999-12-20 21:27:22 +00009236
Michael W. Hudson54241132001-12-07 15:38:26 +00009237
Guido van Rossume97ee181999-12-20 21:27:22 +00009238# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9239# loading of modules.
9240
Matthias Kloseb9621712010-04-24 17:59:49 +00009241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9242$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009243if test -z "$DYNLOADFILE"
9244then
9245 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009246 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9247 if test "$ac_cv_func_dlopen" = yes
9248 then DYNLOADFILE="dynload_shlib.o"
9249 else DYNLOADFILE="dynload_aix.o"
9250 fi
9251 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009252 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009253 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9254 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009255 *)
9256 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9257 # out any dynamic loading
9258 if test "$ac_cv_func_dlopen" = yes
9259 then DYNLOADFILE="dynload_shlib.o"
9260 else DYNLOADFILE="dynload_stub.o"
9261 fi
9262 ;;
9263 esac
9264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9266$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009267if test "$DYNLOADFILE" != "dynload_stub.o"
9268then
Martin v. Löwis11437992002-04-12 09:54:03 +00009269
Matthias Kloseb9621712010-04-24 17:59:49 +00009270$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009271
9272fi
9273
Neil Schemenauer4e425612001-06-19 15:44:15 +00009274# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9275
Michael W. Hudson54241132001-12-07 15:38:26 +00009276
Matthias Kloseb9621712010-04-24 17:59:49 +00009277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9278$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009279if test -z "$MACHDEP_OBJS"
9280then
Jack Jansene578a632001-08-15 01:27:14 +00009281 MACHDEP_OBJS=$extra_machdep_objs
9282else
9283 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9286$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009287
Guido van Rossum627b2d71993-12-24 10:39:16 +00009288# checks for library functions
Martin v. Löwis823725e2008-03-24 13:39:54 +00009289for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9290 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009291 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009292 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009293 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009294 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009295 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009296 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9297 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009298 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009299 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009300 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009301 truncate uname unsetenv utimes waitpid wait3 wait4 \
9302 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009303do :
9304 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9305ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9306eval as_val=\$$as_ac_var
9307 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009308 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009309#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009310_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009311
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009312fi
9313done
9314
Michael W. Hudson54241132001-12-07 15:38:26 +00009315
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009316# For some functions, having a definition is not sufficient, since
9317# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9319$as_echo_n "checking for chroot... " >&6; }
9320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009321/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009322#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009323int
9324main ()
9325{
9326void *x=chroot
9327 ;
9328 return 0;
9329}
9330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009331if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009332
Matthias Kloseb9621712010-04-24 17:59:49 +00009333$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009334
Matthias Kloseb159a552010-04-25 21:00:44 +00009335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009336$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009337else
Matthias Kloseb9621712010-04-24 17:59:49 +00009338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9339$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009340
9341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9344$as_echo_n "checking for link... " >&6; }
9345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009346/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009347#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009348int
9349main ()
9350{
9351void *x=link
9352 ;
9353 return 0;
9354}
9355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009356if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009357
Matthias Kloseb9621712010-04-24 17:59:49 +00009358$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009359
Matthias Kloseb159a552010-04-25 21:00:44 +00009360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009361$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009362else
Matthias Kloseb9621712010-04-24 17:59:49 +00009363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9364$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009365
9366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9369$as_echo_n "checking for symlink... " >&6; }
9370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009371/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009372#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009373int
9374main ()
9375{
9376void *x=symlink
9377 ;
9378 return 0;
9379}
9380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009381if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009382
Matthias Kloseb9621712010-04-24 17:59:49 +00009383$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009384
Matthias Kloseb159a552010-04-25 21:00:44 +00009385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009386$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009387else
Matthias Kloseb9621712010-04-24 17:59:49 +00009388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9389$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009390
9391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9394$as_echo_n "checking for fchdir... " >&6; }
9395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009396/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009397#include <unistd.h>
9398int
9399main ()
9400{
9401void *x=fchdir
9402 ;
9403 return 0;
9404}
9405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009406if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009407
Matthias Kloseb9621712010-04-24 17:59:49 +00009408$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009409
Matthias Kloseb159a552010-04-25 21:00:44 +00009410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009411$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009412else
Matthias Kloseb9621712010-04-24 17:59:49 +00009413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9414$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009415
9416fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9419$as_echo_n "checking for fsync... " >&6; }
9420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009421/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009422#include <unistd.h>
9423int
9424main ()
9425{
9426void *x=fsync
9427 ;
9428 return 0;
9429}
9430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009431if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009432
Matthias Kloseb9621712010-04-24 17:59:49 +00009433$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009434
Matthias Kloseb159a552010-04-25 21:00:44 +00009435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009436$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009437else
Matthias Kloseb9621712010-04-24 17:59:49 +00009438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9439$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009440
9441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9444$as_echo_n "checking for fdatasync... " >&6; }
9445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009446/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009447#include <unistd.h>
9448int
9449main ()
9450{
9451void *x=fdatasync
9452 ;
9453 return 0;
9454}
9455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009456if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009457
Matthias Kloseb9621712010-04-24 17:59:49 +00009458$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009459
Matthias Kloseb159a552010-04-25 21:00:44 +00009460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009461$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009462else
Matthias Kloseb9621712010-04-24 17:59:49 +00009463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9464$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009465
9466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9469$as_echo_n "checking for epoll... " >&6; }
9470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009471/* end confdefs.h. */
9472#include <sys/epoll.h>
9473int
9474main ()
9475{
9476void *x=epoll_create
9477 ;
9478 return 0;
9479}
9480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009481if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009482
Matthias Kloseb9621712010-04-24 17:59:49 +00009483$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009484
Matthias Kloseb159a552010-04-25 21:00:44 +00009485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009486$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009487else
Matthias Kloseb9621712010-04-24 17:59:49 +00009488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9489$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009490
9491fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9494$as_echo_n "checking for kqueue... " >&6; }
9495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009496/* end confdefs.h. */
9497
9498#include <sys/types.h>
9499#include <sys/event.h>
9500
9501int
9502main ()
9503{
9504int x=kqueue()
9505 ;
9506 return 0;
9507}
9508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009509if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009510
Matthias Kloseb9621712010-04-24 17:59:49 +00009511$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009512
Matthias Kloseb159a552010-04-25 21:00:44 +00009513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009514$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009515else
Matthias Kloseb9621712010-04-24 17:59:49 +00009516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9517$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009518
9519fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009521# On some systems (eg. FreeBSD 5), we would find a definition of the
9522# functions ctermid_r, setgroups in the library, but no prototype
9523# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9524# address to avoid compiler warnings and potential miscompilations
9525# because of the missing prototypes.
9526
Matthias Kloseb9621712010-04-24 17:59:49 +00009527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9528$as_echo_n "checking for ctermid_r... " >&6; }
9529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009530/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009531
Martin v. Löwisd5843682002-11-21 20:41:28 +00009532#include <stdio.h>
9533
Martin v. Löwisd5843682002-11-21 20:41:28 +00009534int
9535main ()
9536{
9537void* p = ctermid_r
9538 ;
9539 return 0;
9540}
9541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009542if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009543
Matthias Kloseb9621712010-04-24 17:59:49 +00009544$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009545
Matthias Kloseb159a552010-04-25 21:00:44 +00009546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009547$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009548else
Matthias Kloseb9621712010-04-24 17:59:49 +00009549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9550$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009551
9552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9554
Matthias Kloseb9621712010-04-24 17:59:49 +00009555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
9556$as_echo_n "checking for flock... " >&6; }
9557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009558/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009559
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009560#include <sys/file.h>
9561
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009562int
9563main ()
9564{
9565void* p = flock
9566 ;
9567 return 0;
9568}
9569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009570if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009571
Matthias Kloseb9621712010-04-24 17:59:49 +00009572$as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009573
Matthias Kloseb159a552010-04-25 21:00:44 +00009574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009575$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009576else
Matthias Kloseb9621712010-04-24 17:59:49 +00009577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9578$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009579
9580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9582
Matthias Kloseb9621712010-04-24 17:59:49 +00009583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9584$as_echo_n "checking for getpagesize... " >&6; }
9585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009586/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009587
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009588#include <unistd.h>
9589
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009590int
9591main ()
9592{
9593void* p = getpagesize
9594 ;
9595 return 0;
9596}
9597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009598if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009599
Matthias Kloseb9621712010-04-24 17:59:49 +00009600$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009601
Matthias Kloseb159a552010-04-25 21:00:44 +00009602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009603$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009604else
Matthias Kloseb9621712010-04-24 17:59:49 +00009605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9606$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009607
9608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009610
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009611for ac_prog in true
9612do
9613 # Extract the first word of "$ac_prog", so it can be a program name with args.
9614set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9616$as_echo_n "checking for $ac_word... " >&6; }
9617if test "${ac_cv_prog_TRUE+set}" = set; then :
9618 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009619else
9620 if test -n "$TRUE"; then
9621 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9622else
9623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9624for as_dir in $PATH
9625do
9626 IFS=$as_save_IFS
9627 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009628 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009629 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 +00009630 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009631 $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 +00009632 break 2
9633 fi
9634done
Matthias Kloseb9621712010-04-24 17:59:49 +00009635 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009636IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009637
9638fi
9639fi
9640TRUE=$ac_cv_prog_TRUE
9641if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9643$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009644else
Matthias Kloseb9621712010-04-24 17:59:49 +00009645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9646$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009647fi
9648
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009649
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009650 test -n "$TRUE" && break
9651done
9652test -n "$TRUE" || TRUE="/bin/true"
9653
9654
Matthias Kloseb9621712010-04-24 17:59:49 +00009655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9656$as_echo_n "checking for inet_aton in -lc... " >&6; }
9657if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9658 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009659else
9660 ac_check_lib_save_LIBS=$LIBS
9661LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009663/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009664
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009665/* Override any GCC internal prototype to avoid an error.
9666 Use char because int might match the return type of a GCC
9667 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009668#ifdef __cplusplus
9669extern "C"
9670#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009671char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009672int
9673main ()
9674{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009675return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009676 ;
9677 return 0;
9678}
9679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009680if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009681 ac_cv_lib_c_inet_aton=yes
9682else
Matthias Kloseb9621712010-04-24 17:59:49 +00009683 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009685rm -f core conftest.err conftest.$ac_objext \
9686 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009687LIBS=$ac_check_lib_save_LIBS
9688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9690$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9691if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009692 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009693else
Matthias Kloseb9621712010-04-24 17:59:49 +00009694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9695$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9696if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9697 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009698else
9699 ac_check_lib_save_LIBS=$LIBS
9700LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009702/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704/* Override any GCC internal prototype to avoid an error.
9705 Use char because int might match the return type of a GCC
9706 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009707#ifdef __cplusplus
9708extern "C"
9709#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009710char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009711int
9712main ()
9713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009714return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009715 ;
9716 return 0;
9717}
9718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009719if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009720 ac_cv_lib_resolv_inet_aton=yes
9721else
Matthias Kloseb9621712010-04-24 17:59:49 +00009722 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009724rm -f core conftest.err conftest.$ac_objext \
9725 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009726LIBS=$ac_check_lib_save_LIBS
9727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9729$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9730if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009731 cat >>confdefs.h <<_ACEOF
9732#define HAVE_LIBRESOLV 1
9733_ACEOF
9734
9735 LIBS="-lresolv $LIBS"
9736
9737fi
9738
9739
9740fi
9741
9742
Christian Heimesd0764e22007-12-04 15:00:33 +00009743# On Tru64, chflags seems to be present, but calling it will
9744# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9746$as_echo_n "checking for chflags... " >&6; }
9747if test "${ac_cv_have_chflags+set}" = set; then :
9748 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009749else
Matthias Kloseb9621712010-04-24 17:59:49 +00009750 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009751 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009752else
Matthias Kloseb9621712010-04-24 17:59:49 +00009753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009754/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009755[
Christian Heimesd0764e22007-12-04 15:00:33 +00009756#include <sys/stat.h>
9757#include <unistd.h>
9758int main(int argc, char*argv[])
9759{
9760 if(chflags(argv[0], 0) != 0)
9761 return 1;
9762 return 0;
9763}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009764]
Christian Heimesd0764e22007-12-04 15:00:33 +00009765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009766if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009767 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009768else
Matthias Kloseb9621712010-04-24 17:59:49 +00009769 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009771rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9772 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009773fi
9774
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009775
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9778$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009779if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009780 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9781if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009782 ac_cv_have_chflags="yes"
9783else
9784 ac_cv_have_chflags="no"
9785fi
9786
9787fi
9788if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009789
Matthias Kloseb9621712010-04-24 17:59:49 +00009790$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009791
9792fi
9793
Matthias Kloseb9621712010-04-24 17:59:49 +00009794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9795$as_echo_n "checking for lchflags... " >&6; }
9796if test "${ac_cv_have_lchflags+set}" = set; then :
9797 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009798else
Matthias Kloseb9621712010-04-24 17:59:49 +00009799 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009800 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009801else
Matthias Kloseb9621712010-04-24 17:59:49 +00009802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009803/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009804[
Christian Heimesd0764e22007-12-04 15:00:33 +00009805#include <sys/stat.h>
9806#include <unistd.h>
9807int main(int argc, char*argv[])
9808{
9809 if(lchflags(argv[0], 0) != 0)
9810 return 1;
9811 return 0;
9812}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009813]
Christian Heimesd0764e22007-12-04 15:00:33 +00009814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009815if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009816 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009817else
Matthias Kloseb9621712010-04-24 17:59:49 +00009818 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9821 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009822fi
9823
9824
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9827$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009828if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009829 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9830if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009831 ac_cv_have_lchflags="yes"
9832else
9833 ac_cv_have_lchflags="no"
9834fi
9835
9836fi
9837if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009838
Matthias Kloseb9621712010-04-24 17:59:49 +00009839$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009840
9841fi
9842
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009843case $ac_sys_system/$ac_sys_release in
9844Darwin/*)
9845 _CUR_CFLAGS="${CFLAGS}"
9846 _CUR_LDFLAGS="${LDFLAGS}"
9847 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9848 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9849 ;;
9850esac
9851
Matthias Kloseb9621712010-04-24 17:59:49 +00009852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9853$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9854if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9855 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009856else
9857 ac_check_lib_save_LIBS=$LIBS
9858LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009860/* end confdefs.h. */
9861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009862/* Override any GCC internal prototype to avoid an error.
9863 Use char because int might match the return type of a GCC
9864 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009865#ifdef __cplusplus
9866extern "C"
9867#endif
9868char inflateCopy ();
9869int
9870main ()
9871{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009872return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009873 ;
9874 return 0;
9875}
9876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009877if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009878 ac_cv_lib_z_inflateCopy=yes
9879else
Matthias Kloseb9621712010-04-24 17:59:49 +00009880 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009882rm -f core conftest.err conftest.$ac_objext \
9883 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009884LIBS=$ac_check_lib_save_LIBS
9885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9887$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9888if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009889
Matthias Kloseb9621712010-04-24 17:59:49 +00009890$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009891
9892fi
9893
9894
9895case $ac_sys_system/$ac_sys_release in
9896Darwin/*)
9897 CFLAGS="${_CUR_CFLAGS}"
9898 LDFLAGS="${_CUR_LDFLAGS}"
9899 ;;
9900esac
9901
Matthias Kloseb9621712010-04-24 17:59:49 +00009902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9903$as_echo_n "checking for hstrerror... " >&6; }
9904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009905/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009906
Martin v. Löwise9416172003-05-03 10:12:45 +00009907#include <netdb.h>
9908
Martin v. Löwise9416172003-05-03 10:12:45 +00009909int
9910main ()
9911{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009912void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009913 ;
9914 return 0;
9915}
9916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009917if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009918
Matthias Kloseb9621712010-04-24 17:59:49 +00009919$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009920
Matthias Kloseb159a552010-04-25 21:00:44 +00009921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009922$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009923else
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9925$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009926
9927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009928rm -f core conftest.err conftest.$ac_objext \
9929 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009930
Matthias Kloseb9621712010-04-24 17:59:49 +00009931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9932$as_echo_n "checking for inet_aton... " >&6; }
9933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009934/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009935
Martin v. Löwis86d66262006-02-17 08:40:11 +00009936#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009937#include <sys/socket.h>
9938#include <netinet/in.h>
9939#include <arpa/inet.h>
9940
Martin v. Löwise9416172003-05-03 10:12:45 +00009941int
9942main ()
9943{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009944void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009945 ;
9946 return 0;
9947}
9948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009949if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009950
Matthias Kloseb9621712010-04-24 17:59:49 +00009951$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009952
Matthias Kloseb159a552010-04-25 21:00:44 +00009953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009954$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009955else
Matthias Kloseb9621712010-04-24 17:59:49 +00009956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9957$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009958
9959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009960rm -f core conftest.err conftest.$ac_objext \
9961 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009962
Matthias Kloseb9621712010-04-24 17:59:49 +00009963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9964$as_echo_n "checking for inet_pton... " >&6; }
9965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009966/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009967
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009968#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009969#include <sys/socket.h>
9970#include <netinet/in.h>
9971#include <arpa/inet.h>
9972
Martin v. Löwise9416172003-05-03 10:12:45 +00009973int
9974main ()
9975{
9976void* p = inet_pton
9977 ;
9978 return 0;
9979}
9980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009981if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009982
Matthias Kloseb9621712010-04-24 17:59:49 +00009983$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009984
Matthias Kloseb159a552010-04-25 21:00:44 +00009985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009986$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009987else
Matthias Kloseb9621712010-04-24 17:59:49 +00009988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9989$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009990
9991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +00009993
Martin v. Löwisd6640d42003-07-06 09:29:52 +00009994# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +00009995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
9996$as_echo_n "checking for setgroups... " >&6; }
9997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009998/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009999
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010000#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010001#ifdef HAVE_GRP_H
10002#include <grp.h>
10003#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010004
Martin v. Löwisd5843682002-11-21 20:41:28 +000010005int
10006main ()
10007{
10008void* p = setgroups
10009 ;
10010 return 0;
10011}
10012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010013if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010014
Matthias Kloseb9621712010-04-24 17:59:49 +000010015$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010016
Matthias Kloseb159a552010-04-25 21:00:44 +000010017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010018$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010019else
Matthias Kloseb9621712010-04-24 17:59:49 +000010020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10021$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010022
10023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010025
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010026# check for openpty and forkpty
10027
10028for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010029do :
10030 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10031if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010032 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010033#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010034_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010035
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010036else
Matthias Kloseb9621712010-04-24 17:59:49 +000010037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10038$as_echo_n "checking for openpty in -lutil... " >&6; }
10039if test "${ac_cv_lib_util_openpty+set}" = set; then :
10040 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010041else
Martin v. Löwis11437992002-04-12 09:54:03 +000010042 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010043LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010045/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010046
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010047/* Override any GCC internal prototype to avoid an error.
10048 Use char because int might match the return type of a GCC
10049 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010050#ifdef __cplusplus
10051extern "C"
10052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010053char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010054int
10055main ()
10056{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010057return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010058 ;
10059 return 0;
10060}
10061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010062if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010063 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010064else
Matthias Kloseb9621712010-04-24 17:59:49 +000010065 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010067rm -f core conftest.err conftest.$ac_objext \
10068 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010069LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010070fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10072$as_echo "$ac_cv_lib_util_openpty" >&6; }
10073if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10074 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010075 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010076else
Matthias Kloseb9621712010-04-24 17:59:49 +000010077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10078$as_echo_n "checking for openpty in -lbsd... " >&6; }
10079if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10080 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010081else
10082 ac_check_lib_save_LIBS=$LIBS
10083LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010085/* end confdefs.h. */
10086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010087/* Override any GCC internal prototype to avoid an error.
10088 Use char because int might match the return type of a GCC
10089 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010090#ifdef __cplusplus
10091extern "C"
10092#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010093char openpty ();
10094int
10095main ()
10096{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010097return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010098 ;
10099 return 0;
10100}
10101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010102if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010103 ac_cv_lib_bsd_openpty=yes
10104else
Matthias Kloseb9621712010-04-24 17:59:49 +000010105 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010107rm -f core conftest.err conftest.$ac_objext \
10108 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010109LIBS=$ac_check_lib_save_LIBS
10110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10112$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10113if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10114 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010115 LIBS="$LIBS -lbsd"
10116fi
10117
10118
10119fi
10120
Fred Drake8cef4cf2000-06-28 16:40:38 +000010121
10122fi
10123done
10124
10125for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010126do :
10127 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10128if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010129 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010130#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010131_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010132
Fred Drake8cef4cf2000-06-28 16:40:38 +000010133else
Matthias Kloseb9621712010-04-24 17:59:49 +000010134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10135$as_echo_n "checking for forkpty in -lutil... " >&6; }
10136if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10137 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010138else
Martin v. Löwis11437992002-04-12 09:54:03 +000010139 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010140LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010143
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010144/* Override any GCC internal prototype to avoid an error.
10145 Use char because int might match the return type of a GCC
10146 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010147#ifdef __cplusplus
10148extern "C"
10149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010150char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010151int
10152main ()
10153{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010154return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010155 ;
10156 return 0;
10157}
10158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010159if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010161else
Matthias Kloseb9621712010-04-24 17:59:49 +000010162 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010164rm -f core conftest.err conftest.$ac_objext \
10165 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010166LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10169$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10170if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10171 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010172 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010173else
Matthias Kloseb9621712010-04-24 17:59:49 +000010174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10175$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10176if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10177 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010178else
10179 ac_check_lib_save_LIBS=$LIBS
10180LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010182/* end confdefs.h. */
10183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010184/* Override any GCC internal prototype to avoid an error.
10185 Use char because int might match the return type of a GCC
10186 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010187#ifdef __cplusplus
10188extern "C"
10189#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010190char forkpty ();
10191int
10192main ()
10193{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010194return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010195 ;
10196 return 0;
10197}
10198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010199if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010200 ac_cv_lib_bsd_forkpty=yes
10201else
Matthias Kloseb9621712010-04-24 17:59:49 +000010202 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010204rm -f core conftest.err conftest.$ac_objext \
10205 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010206LIBS=$ac_check_lib_save_LIBS
10207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10209$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10210if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10211 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010212 LIBS="$LIBS -lbsd"
10213fi
10214
10215
10216fi
10217
Fred Drake8cef4cf2000-06-28 16:40:38 +000010218
10219fi
10220done
10221
Jack Jansendd19cf82001-12-06 22:36:17 +000010222
Christian Heimesb186d002008-03-18 15:15:01 +000010223# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010224for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010225do :
10226 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10227if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010228 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010229#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010230_ACEOF
10231
10232fi
10233done
10234
10235
Michael W. Hudson54241132001-12-07 15:38:26 +000010236# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010237for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010238do :
10239 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10240ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10241eval as_val=\$$as_ac_var
10242 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010243 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010244#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010245_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010246
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010247fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010248done
10249
Michael W. Hudson54241132001-12-07 15:38:26 +000010250
Christian Heimesb186d002008-03-18 15:15:01 +000010251for ac_func in dup2 getcwd strdup
Matthias Kloseb9621712010-04-24 17:59:49 +000010252do :
10253 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10254ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10255eval as_val=\$$as_ac_var
10256 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010257 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010258#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010259_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010260
Martin v. Löwis1142de32002-03-29 16:28:31 +000010261else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010262 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010263 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010264 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
10265 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010266esac
10267
Martin v. Löwis1142de32002-03-29 16:28:31 +000010268fi
10269done
10270
10271
10272for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010273do :
10274 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10275if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010276 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010277#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010280/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010281#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010282int
10283main ()
10284{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010285getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010286 ;
10287 return 0;
10288}
10289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010290if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010291
Matthias Kloseb9621712010-04-24 17:59:49 +000010292$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010293
Guido van Rossum627b2d71993-12-24 10:39:16 +000010294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010296
Guido van Rossum627b2d71993-12-24 10:39:16 +000010297fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010298done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010299
Jack Jansen150753c2003-03-29 22:07:47 +000010300for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010301do :
10302 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10303if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010304 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010305#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010308/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010309#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010310int
10311main ()
10312{
10313setpgrp(0,0);
10314 ;
10315 return 0;
10316}
10317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010318if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010319
Matthias Kloseb9621712010-04-24 17:59:49 +000010320$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010321
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010324
10325fi
10326done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010327
Thomas Wouters3a584202000-08-05 23:28:51 +000010328for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010329do :
10330 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10331if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010332 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010333#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010336/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010337#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010338int
10339main ()
10340{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010341gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010342 ;
10343 return 0;
10344}
10345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010346if ac_fn_c_try_compile "$LINENO"; then :
10347
Guido van Rossum627b2d71993-12-24 10:39:16 +000010348else
Skip Montanaro6dead952003-09-25 14:50:04 +000010349
Matthias Kloseb9621712010-04-24 17:59:49 +000010350$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010351
Martin v. Löwis11437992002-04-12 09:54:03 +000010352
Guido van Rossum627b2d71993-12-24 10:39:16 +000010353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010355
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010356fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010357done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010358
Michael W. Hudson54241132001-12-07 15:38:26 +000010359
Matthias Kloseb9621712010-04-24 17:59:49 +000010360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10361$as_echo_n "checking for major... " >&6; }
10362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010363/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010364
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010365#if defined(MAJOR_IN_MKDEV)
10366#include <sys/mkdev.h>
10367#elif defined(MAJOR_IN_SYSMACROS)
10368#include <sys/sysmacros.h>
10369#else
10370#include <sys/types.h>
10371#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010372
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010373int
10374main ()
10375{
10376
10377 makedev(major(0),minor(0));
10378
10379 ;
10380 return 0;
10381}
10382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010383if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010384
10385
Matthias Kloseb9621712010-04-24 17:59:49 +000010386$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010387
Matthias Kloseb9621712010-04-24 17:59:49 +000010388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10389$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010390
10391else
Skip Montanaro6dead952003-09-25 14:50:04 +000010392
Matthias Kloseb9621712010-04-24 17:59:49 +000010393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10394$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010395
10396fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010397rm -f core conftest.err conftest.$ac_objext \
10398 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010399
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010400# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010401# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10403$as_echo_n "checking for getaddrinfo... " >&6; }
10404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010405/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010406
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010407#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010408#include <sys/socket.h>
10409#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010410#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010411
Martin v. Löwis11437992002-04-12 09:54:03 +000010412int
10413main ()
10414{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010415getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010416 ;
10417 return 0;
10418}
10419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010420if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010421 have_getaddrinfo=yes
10422else
Matthias Kloseb9621712010-04-24 17:59:49 +000010423 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010424fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010425rm -f core conftest.err conftest.$ac_objext \
10426 conftest$ac_exeext conftest.$ac_ext
10427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10428$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010429if test $have_getaddrinfo = yes
10430then
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10432$as_echo_n "checking getaddrinfo bug... " >&6; }
10433 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10434 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010435else
Matthias Kloseb9621712010-04-24 17:59:49 +000010436 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010437 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010438else
Matthias Kloseb9621712010-04-24 17:59:49 +000010439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010440/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010441
10442#include <sys/types.h>
10443#include <netdb.h>
10444#include <string.h>
10445#include <sys/socket.h>
10446#include <netinet/in.h>
10447
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010448int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010449{
10450 int passive, gaierr, inet4 = 0, inet6 = 0;
10451 struct addrinfo hints, *ai, *aitop;
10452 char straddr[INET6_ADDRSTRLEN], strport[16];
10453
10454 for (passive = 0; passive <= 1; passive++) {
10455 memset(&hints, 0, sizeof(hints));
10456 hints.ai_family = AF_UNSPEC;
10457 hints.ai_flags = passive ? AI_PASSIVE : 0;
10458 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010459 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010460 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10461 (void)gai_strerror(gaierr);
10462 goto bad;
10463 }
10464 for (ai = aitop; ai; ai = ai->ai_next) {
10465 if (ai->ai_addr == NULL ||
10466 ai->ai_addrlen == 0 ||
10467 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10468 straddr, sizeof(straddr), strport, sizeof(strport),
10469 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10470 goto bad;
10471 }
10472 switch (ai->ai_family) {
10473 case AF_INET:
10474 if (strcmp(strport, "54321") != 0) {
10475 goto bad;
10476 }
10477 if (passive) {
10478 if (strcmp(straddr, "0.0.0.0") != 0) {
10479 goto bad;
10480 }
10481 } else {
10482 if (strcmp(straddr, "127.0.0.1") != 0) {
10483 goto bad;
10484 }
10485 }
10486 inet4++;
10487 break;
10488 case AF_INET6:
10489 if (strcmp(strport, "54321") != 0) {
10490 goto bad;
10491 }
10492 if (passive) {
10493 if (strcmp(straddr, "::") != 0) {
10494 goto bad;
10495 }
10496 } else {
10497 if (strcmp(straddr, "::1") != 0) {
10498 goto bad;
10499 }
10500 }
10501 inet6++;
10502 break;
10503 case AF_UNSPEC:
10504 goto bad;
10505 break;
10506 default:
10507 /* another family support? */
10508 break;
10509 }
10510 }
10511 }
10512
10513 if (!(inet4 == 0 || inet4 == 2))
10514 goto bad;
10515 if (!(inet6 == 0 || inet6 == 2))
10516 goto bad;
10517
10518 if (aitop)
10519 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010520 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010521
10522 bad:
10523 if (aitop)
10524 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010525 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010526}
10527
Martin v. Löwis11437992002-04-12 09:54:03 +000010528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010529if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010530 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010531else
Matthias Kloseb9621712010-04-24 17:59:49 +000010532 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010534rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10535 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010537
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010538fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010539
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010541
Mark Dickinson2df5d282009-12-31 21:22:50 +000010542if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010543then
10544 if test $ipv6 = yes
10545 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010546 echo 'Fatal: You must get working getaddrinfo() function.'
10547 echo ' or you can specify "--disable-ipv6"'.
10548 exit 1
10549 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010550else
Martin v. Löwis11437992002-04-12 09:54:03 +000010551
Matthias Kloseb9621712010-04-24 17:59:49 +000010552$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010553
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010554fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010555for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010556do :
10557 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10558if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010559 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010560#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010561_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010562
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010563fi
10564done
10565
Michael W. Hudson54241132001-12-07 15:38:26 +000010566
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010567# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10569$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10570if test "${ac_cv_header_time+set}" = set; then :
10571 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010572else
Matthias Kloseb9621712010-04-24 17:59:49 +000010573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010574/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010575#include <sys/types.h>
10576#include <sys/time.h>
10577#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010578
Martin v. Löwis11437992002-04-12 09:54:03 +000010579int
10580main ()
10581{
10582if ((struct tm *) 0)
10583return 0;
10584 ;
10585 return 0;
10586}
10587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010588if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010589 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010590else
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10596$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010597if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010598
Matthias Kloseb9621712010-04-24 17:59:49 +000010599$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010600
10601fi
10602
Matthias Kloseb9621712010-04-24 17:59:49 +000010603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10604$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10605if test "${ac_cv_struct_tm+set}" = set; then :
10606 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010607else
Matthias Kloseb9621712010-04-24 17:59:49 +000010608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010609/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010610#include <sys/types.h>
10611#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010612
Martin v. Löwis11437992002-04-12 09:54:03 +000010613int
10614main ()
10615{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010616struct tm tm;
10617 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010618 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010619 ;
10620 return 0;
10621}
10622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010623if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010624 ac_cv_struct_tm=time.h
10625else
Matthias Kloseb9621712010-04-24 17:59:49 +000010626 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010629fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10631$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010632if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010633
Matthias Kloseb9621712010-04-24 17:59:49 +000010634$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010635
10636fi
10637
Matthias Kloseb9621712010-04-24 17:59:49 +000010638ac_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 +000010639#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010640
Matthias Kloseb9621712010-04-24 17:59:49 +000010641"
10642if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010643
10644cat >>confdefs.h <<_ACEOF
10645#define HAVE_STRUCT_TM_TM_ZONE 1
10646_ACEOF
10647
10648
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010649fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010650
Martin v. Löwis11437992002-04-12 09:54:03 +000010651if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10652
Matthias Kloseb9621712010-04-24 17:59:49 +000010653$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010654
10655else
Matthias Kloseb9621712010-04-24 17:59:49 +000010656 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10657"
10658if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10659 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010660else
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010662fi
10663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010664cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010665#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010666_ACEOF
10667
Matthias Kloseb9621712010-04-24 17:59:49 +000010668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10669$as_echo_n "checking for tzname... " >&6; }
10670if test "${ac_cv_var_tzname+set}" = set; then :
10671 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010672else
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010674/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010675#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010676#if !HAVE_DECL_TZNAME
10677extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010678#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010679
Martin v. Löwis11437992002-04-12 09:54:03 +000010680int
10681main ()
10682{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010683return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010684 ;
10685 return 0;
10686}
10687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010688if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010689 ac_cv_var_tzname=yes
10690else
Matthias Kloseb9621712010-04-24 17:59:49 +000010691 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010693rm -f core conftest.err conftest.$ac_objext \
10694 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10697$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010698 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010699
Matthias Kloseb9621712010-04-24 17:59:49 +000010700$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010701
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010702 fi
10703fi
10704
Matthias Kloseb9621712010-04-24 17:59:49 +000010705ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10706if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010707
10708cat >>confdefs.h <<_ACEOF
10709#define HAVE_STRUCT_STAT_ST_RDEV 1
10710_ACEOF
10711
10712
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010713fi
10714
Matthias Kloseb9621712010-04-24 17:59:49 +000010715ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10716if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010717
Martin v. Löwis11437992002-04-12 09:54:03 +000010718cat >>confdefs.h <<_ACEOF
10719#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10720_ACEOF
10721
10722
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010723fi
10724
Matthias Kloseb9621712010-04-24 17:59:49 +000010725ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10726if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010727
10728cat >>confdefs.h <<_ACEOF
10729#define HAVE_STRUCT_STAT_ST_FLAGS 1
10730_ACEOF
10731
10732
10733fi
10734
Matthias Kloseb9621712010-04-24 17:59:49 +000010735ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10736if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010737
10738cat >>confdefs.h <<_ACEOF
10739#define HAVE_STRUCT_STAT_ST_GEN 1
10740_ACEOF
10741
10742
10743fi
10744
Matthias Kloseb9621712010-04-24 17:59:49 +000010745ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10746if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010747
10748cat >>confdefs.h <<_ACEOF
10749#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10750_ACEOF
10751
10752
10753fi
10754
Matthias Kloseb9621712010-04-24 17:59:49 +000010755ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10756if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010757
Martin v. Löwis11437992002-04-12 09:54:03 +000010758cat >>confdefs.h <<_ACEOF
10759#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10760_ACEOF
10761
10762
Matthias Kloseb9621712010-04-24 17:59:49 +000010763$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010764
10765else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010766 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010767 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010768 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10769 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010770esac
10771
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010772fi
10773
Michael W. Hudson54241132001-12-07 15:38:26 +000010774
Martin v. Löwis11437992002-04-12 09:54:03 +000010775
Matthias Kloseb9621712010-04-24 17:59:49 +000010776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10777$as_echo_n "checking for time.h that defines altzone... " >&6; }
10778if test "${ac_cv_header_time_altzone+set}" = set; then :
10779 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010780else
Matthias Kloseb159a552010-04-25 21:00:44 +000010781
Matthias Kloseb9621712010-04-24 17:59:49 +000010782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010783/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010784#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010785int
10786main ()
10787{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010788return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010789 ;
10790 return 0;
10791}
10792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010793if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010794 ac_cv_header_time_altzone=yes
10795else
Matthias Kloseb9621712010-04-24 17:59:49 +000010796 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010799
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010800fi
10801
Matthias Kloseb9621712010-04-24 17:59:49 +000010802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10803$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010804if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010805
Matthias Kloseb9621712010-04-24 17:59:49 +000010806$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010807
10808fi
10809
Guido van Rossumda88dad1995-01-26 00:46:29 +000010810was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10812$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010814/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010815
10816#include <sys/types.h>
10817#include <sys/select.h>
10818#include <sys/time.h>
10819
Martin v. Löwis11437992002-04-12 09:54:03 +000010820int
10821main ()
10822{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010823;
Martin v. Löwis11437992002-04-12 09:54:03 +000010824 ;
10825 return 0;
10826}
10827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010828if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010829
10830
Matthias Kloseb9621712010-04-24 17:59:49 +000010831$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010832
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010833 was_it_defined=yes
10834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10838$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010839
Matthias Kloseb9621712010-04-24 17:59:49 +000010840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10841$as_echo_n "checking for addrinfo... " >&6; }
10842if test "${ac_cv_struct_addrinfo+set}" = set; then :
10843 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010844else
Matthias Kloseb9621712010-04-24 17:59:49 +000010845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010846/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010847#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010848int
10849main ()
10850{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010851struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010852 ;
10853 return 0;
10854}
10855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010856if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010857 ac_cv_struct_addrinfo=yes
10858else
Matthias Kloseb9621712010-04-24 17:59:49 +000010859 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10862fi
10863
Matthias Kloseb9621712010-04-24 17:59:49 +000010864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10865$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010866if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010867
Matthias Kloseb9621712010-04-24 17:59:49 +000010868$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010869
10870fi
10871
Matthias Kloseb9621712010-04-24 17:59:49 +000010872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10873$as_echo_n "checking for sockaddr_storage... " >&6; }
10874if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10875 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010876else
Matthias Kloseb9621712010-04-24 17:59:49 +000010877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010878/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010879
10880# include <sys/types.h>
10881# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010882int
10883main ()
10884{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010885struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010886 ;
10887 return 0;
10888}
10889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010890if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010891 ac_cv_struct_sockaddr_storage=yes
10892else
Matthias Kloseb9621712010-04-24 17:59:49 +000010893 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10896fi
10897
Matthias Kloseb9621712010-04-24 17:59:49 +000010898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10899$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010900if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010901
Matthias Kloseb9621712010-04-24 17:59:49 +000010902$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010903
10904fi
10905
Guido van Rossum627b2d71993-12-24 10:39:16 +000010906# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010907
Matthias Kloseb9621712010-04-24 17:59:49 +000010908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10909$as_echo_n "checking whether char is unsigned... " >&6; }
10910if test "${ac_cv_c_char_unsigned+set}" = set; then :
10911 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010912else
Matthias Kloseb9621712010-04-24 17:59:49 +000010913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010915$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010916int
10917main ()
10918{
10919static int test_array [1 - 2 * !(((char) -1) < 0)];
10920test_array [0] = 0
10921
10922 ;
10923 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010924}
Martin v. Löwis11437992002-04-12 09:54:03 +000010925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010926if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010927 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010928else
Matthias Kloseb9621712010-04-24 17:59:49 +000010929 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10934$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010935if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010936 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010937
10938fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010939
Matthias Kloseb9621712010-04-24 17:59:49 +000010940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10941$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10942if test "${ac_cv_c_const+set}" = set; then :
10943 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010944else
Matthias Kloseb9621712010-04-24 17:59:49 +000010945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010946/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010947
Martin v. Löwis11437992002-04-12 09:54:03 +000010948int
10949main ()
10950{
10951/* FIXME: Include the comments suggested by Paul. */
10952#ifndef __cplusplus
10953 /* Ultrix mips cc rejects this. */
10954 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010955 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000010956 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010957 char const *const *pcpcc;
10958 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010959 /* NEC SVR4.0.2 mips cc rejects this. */
10960 struct point {int x, y;};
10961 static struct point const zero = {0,0};
10962 /* AIX XL C 1.02.0.0 rejects this.
10963 It does not let you subtract one const X* pointer from another in
10964 an arm of an if-expression whose if-part is not a constant
10965 expression */
10966 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010967 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010968 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969 ++pcpcc;
10970 ppc = (char**) pcpcc;
10971 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010972 { /* SCO 3.2v4 cc rejects this. */
10973 char *t;
10974 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010975
Martin v. Löwis11437992002-04-12 09:54:03 +000010976 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010977 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010978 }
10979 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
10980 int x[] = {25, 17};
10981 const int *foo = &x[0];
10982 ++foo;
10983 }
10984 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10985 typedef const int *iptr;
10986 iptr p = 0;
10987 ++p;
10988 }
10989 { /* AIX XL C 1.02.0.0 rejects this saying
10990 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10991 struct s { int j; const int *ap[3]; };
10992 struct s *b; b->j = 5;
10993 }
10994 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10995 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010996 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010997 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010998 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000010999#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011000
Martin v. Löwis11437992002-04-12 09:54:03 +000011001 ;
11002 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011003}
Martin v. Löwis11437992002-04-12 09:54:03 +000011004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011005if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011006 ac_cv_c_const=yes
11007else
Matthias Kloseb9621712010-04-24 17:59:49 +000011008 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011011fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11013$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011014if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011015
Matthias Kloseb9621712010-04-24 17:59:49 +000011016$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011017
11018fi
11019
Michael W. Hudson54241132001-12-07 15:38:26 +000011020
Guido van Rossumda88dad1995-01-26 00:46:29 +000011021works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11023$as_echo_n "checking for working volatile... " >&6; }
11024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011025/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011026
Martin v. Löwis11437992002-04-12 09:54:03 +000011027int
11028main ()
11029{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011030volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011031 ;
11032 return 0;
11033}
11034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011035if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011036 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011037else
Skip Montanaro6dead952003-09-25 14:50:04 +000011038
Matthias Kloseb9621712010-04-24 17:59:49 +000011039$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011040
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011041
Guido van Rossum627b2d71993-12-24 10:39:16 +000011042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11045$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011046
Guido van Rossumda88dad1995-01-26 00:46:29 +000011047works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11049$as_echo_n "checking for working signed char... " >&6; }
11050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011051/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011052
Martin v. Löwis11437992002-04-12 09:54:03 +000011053int
11054main ()
11055{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011056signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 ;
11058 return 0;
11059}
11060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011061if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011062 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011063else
Skip Montanaro6dead952003-09-25 14:50:04 +000011064
Matthias Kloseb9621712010-04-24 17:59:49 +000011065$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011066
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011067
Guido van Rossum7f43da71994-08-01 12:15:30 +000011068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11071$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011072
Guido van Rossumda88dad1995-01-26 00:46:29 +000011073have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11075$as_echo_n "checking for prototypes... " >&6; }
11076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011077/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011078int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011079int
11080main ()
11081{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011082return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011083 ;
11084 return 0;
11085}
11086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011087if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011088
Matthias Kloseb9621712010-04-24 17:59:49 +000011089$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011090
Matthias Kloseb159a552010-04-25 21:00:44 +000011091 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11095$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011096
Guido van Rossumda88dad1995-01-26 00:46:29 +000011097works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11099$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011101/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011102
11103#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011104int foo(int x, ...) {
11105 va_list va;
11106 va_start(va, x);
11107 va_arg(va, int);
11108 va_arg(va, char *);
11109 va_arg(va, double);
11110 return 0;
11111}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011112
Martin v. Löwis11437992002-04-12 09:54:03 +000011113int
11114main ()
11115{
Guido van Rossum90eea071996-08-30 20:58:57 +000011116return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011117 ;
11118 return 0;
11119}
11120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011121if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011122
11123
Matthias Kloseb9621712010-04-24 17:59:49 +000011124$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011125
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011126 works=yes
11127
Guido van Rossum627b2d71993-12-24 10:39:16 +000011128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11131$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011132
Martin v. Löwisd6320502004-08-12 13:45:08 +000011133# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11135$as_echo_n "checking for socketpair... " >&6; }
11136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011137/* end confdefs.h. */
11138
11139#include <sys/types.h>
11140#include <sys/socket.h>
11141
11142int
11143main ()
11144{
11145void *x=socketpair
11146 ;
11147 return 0;
11148}
11149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011150if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011151
Matthias Kloseb9621712010-04-24 17:59:49 +000011152$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011153
Matthias Kloseb159a552010-04-25 21:00:44 +000011154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011155$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011156else
Matthias Kloseb9621712010-04-24 17:59:49 +000011157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11158$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011159
11160fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011162
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011163# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11165$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011167/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011168#include <sys/types.h>
11169#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011170int
11171main ()
11172{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011173struct sockaddr x;
11174x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011175 ;
11176 return 0;
11177}
11178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011179if ac_fn_c_try_compile "$LINENO"; then :
11180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11181$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011182
Matthias Kloseb9621712010-04-24 17:59:49 +000011183$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011184
11185else
Matthias Kloseb9621712010-04-24 17:59:49 +000011186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11187$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011188
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011191
Guido van Rossumda88dad1995-01-26 00:46:29 +000011192va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11194$as_echo_n "checking whether va_list is an array... " >&6; }
11195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011196/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011197
11198#ifdef HAVE_STDARG_PROTOTYPES
11199#include <stdarg.h>
11200#else
11201#include <varargs.h>
11202#endif
11203
Martin v. Löwis11437992002-04-12 09:54:03 +000011204int
11205main ()
11206{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011207va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011208 ;
11209 return 0;
11210}
11211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011212if ac_fn_c_try_compile "$LINENO"; then :
11213
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011214else
Skip Montanaro6dead952003-09-25 14:50:04 +000011215
Martin v. Löwis11437992002-04-12 09:54:03 +000011216
Matthias Kloseb9621712010-04-24 17:59:49 +000011217$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011218
Guido van Rossumda88dad1995-01-26 00:46:29 +000011219 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011220
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11224$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011225
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011226# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011227
11228
Matthias Kloseb9621712010-04-24 17:59:49 +000011229ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11230if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011231
Matthias Kloseb9621712010-04-24 17:59:49 +000011232 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011233
Matthias Kloseb9621712010-04-24 17:59:49 +000011234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11235$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011236 OLD_CFLAGS=$CFLAGS
11237 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011239/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011240
11241# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011242
Martin v. Löwis11437992002-04-12 09:54:03 +000011243int
11244main ()
11245{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011246
11247 char *name;
11248 struct hostent *he, *res;
11249 char buffer[2048];
11250 int buflen = 2048;
11251 int h_errnop;
11252
11253 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011254
11255 ;
11256 return 0;
11257}
11258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011259if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011260
Matthias Kloseb9621712010-04-24 17:59:49 +000011261 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011262
Martin v. Löwis11437992002-04-12 09:54:03 +000011263
Matthias Kloseb9621712010-04-24 17:59:49 +000011264$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011265
Matthias Kloseb9621712010-04-24 17:59:49 +000011266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11267$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011268
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011269else
Skip Montanaro6dead952003-09-25 14:50:04 +000011270
Matthias Kloseb9621712010-04-24 17:59:49 +000011271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11272$as_echo "no" >&6; }
11273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11274$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011276/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011277
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011278# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011279
Martin v. Löwis11437992002-04-12 09:54:03 +000011280int
11281main ()
11282{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011283
11284 char *name;
11285 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011286 char buffer[2048];
11287 int buflen = 2048;
11288 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011289
Matthias Kloseb159a552010-04-25 21:00:44 +000011290 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011291
11292 ;
11293 return 0;
11294}
11295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011297
Matthias Kloseb9621712010-04-24 17:59:49 +000011298 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011299
Martin v. Löwis11437992002-04-12 09:54:03 +000011300
Matthias Kloseb159a552010-04-25 21:00:44 +000011301$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011302
Matthias Kloseb9621712010-04-24 17:59:49 +000011303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11304$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011305
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011306else
Skip Montanaro6dead952003-09-25 14:50:04 +000011307
Matthias Kloseb9621712010-04-24 17:59:49 +000011308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11309$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11311$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11313/* end confdefs.h. */
11314
11315# include <netdb.h>
11316
11317int
11318main ()
11319{
11320
11321 char *name;
11322 struct hostent *he;
11323 struct hostent_data data;
11324
11325 (void) gethostbyname_r(name, he, &data);
11326
11327 ;
11328 return 0;
11329}
11330_ACEOF
11331if ac_fn_c_try_compile "$LINENO"; then :
11332
11333 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11334
11335
11336$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11337
11338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11339$as_echo "yes" >&6; }
11340
11341else
11342
11343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11344$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011345
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011348
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011351
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011354 CFLAGS=$OLD_CFLAGS
11355
11356else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011357
Matthias Kloseb9621712010-04-24 17:59:49 +000011358 for ac_func in gethostbyname
11359do :
11360 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11361if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011362 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011363#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011364_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011365
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011366fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011367done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011368
Michael W. Hudson54241132001-12-07 15:38:26 +000011369
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011370fi
11371
Michael W. Hudson54241132001-12-07 15:38:26 +000011372
11373
11374
11375
11376
11377
Guido van Rossum627b2d71993-12-24 10:39:16 +000011378# checks for system services
11379# (none yet)
11380
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011381# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011382ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11383if test "x$ac_cv_func___fpu_control" = x""yes; then :
11384
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011385else
Matthias Kloseb9621712010-04-24 17:59:49 +000011386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11387$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11388if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11389 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011390else
Martin v. Löwis11437992002-04-12 09:54:03 +000011391 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011392LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011394/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011396/* Override any GCC internal prototype to avoid an error.
11397 Use char because int might match the return type of a GCC
11398 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011399#ifdef __cplusplus
11400extern "C"
11401#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011402char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011403int
11404main ()
11405{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011406return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011407 ;
11408 return 0;
11409}
11410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011411if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011412 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011413else
Matthias Kloseb9621712010-04-24 17:59:49 +000011414 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011415fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011416rm -f core conftest.err conftest.$ac_objext \
11417 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011418LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011419fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11421$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11422if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011423 cat >>confdefs.h <<_ACEOF
11424#define HAVE_LIBIEEE 1
11425_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011426
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011427 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011428
Guido van Rossum627b2d71993-12-24 10:39:16 +000011429fi
11430
Michael W. Hudson54241132001-12-07 15:38:26 +000011431
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011432fi
11433
Michael W. Hudson54241132001-12-07 15:38:26 +000011434
Guido van Rossum7f253911997-05-09 02:42:48 +000011435# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11437$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011439# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011440if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011441 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011442if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011443then
11444
Matthias Kloseb9621712010-04-24 17:59:49 +000011445$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011446
Matthias Kloseb9621712010-04-24 17:59:49 +000011447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11448$as_echo "yes" >&6; }
11449else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11450$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011451fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011452else
Matthias Kloseb9621712010-04-24 17:59:49 +000011453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11454$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011455fi
11456
Guido van Rossum7f253911997-05-09 02:42:48 +000011457
Guido van Rossum7f43da71994-08-01 12:15:30 +000011458# check for --with-libm=...
11459
Guido van Rossum563e7081996-09-10 18:20:48 +000011460case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011461Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011462*) LIBM=-lm
11463esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11465$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011467# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011468if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011469 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011470if test "$withval" = no
11471then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11473$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011474elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011475then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11477$as_echo "set LIBM=\"$withval\"" >&6; }
11478else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011479fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011480else
Matthias Kloseb9621712010-04-24 17:59:49 +000011481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11482$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011483fi
11484
Guido van Rossum7f43da71994-08-01 12:15:30 +000011485
11486# check for --with-libc=...
11487
Matthias Kloseb9621712010-04-24 17:59:49 +000011488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11489$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011490
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011491# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011492if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011493 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011494if test "$withval" = no
11495then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11497$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011498elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011499then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11501$as_echo "set LIBC=\"$withval\"" >&6; }
11502else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011503fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011504else
Matthias Kloseb9621712010-04-24 17:59:49 +000011505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11506$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507fi
11508
Guido van Rossum7f43da71994-08-01 12:15:30 +000011509
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011510# **************************************************
11511# * Check for various properties of floating point *
11512# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011513
Matthias Kloseb9621712010-04-24 17:59:49 +000011514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11515$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11516if test "${ac_cv_little_endian_double+set}" = set; then :
11517 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011518else
11519
Matthias Kloseb9621712010-04-24 17:59:49 +000011520if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011521 ac_cv_little_endian_double=no
11522else
Matthias Kloseb9621712010-04-24 17:59:49 +000011523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011524/* end confdefs.h. */
11525
11526#include <string.h>
11527int main() {
11528 double x = 9006104071832581.0;
11529 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11530 return 0;
11531 else
11532 return 1;
11533}
11534
11535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011536if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011537 ac_cv_little_endian_double=yes
11538else
Matthias Kloseb9621712010-04-24 17:59:49 +000011539 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011540fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011541rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11542 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011543fi
11544
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011545fi
11546
Matthias Kloseb9621712010-04-24 17:59:49 +000011547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11548$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011549if test "$ac_cv_little_endian_double" = yes
11550then
11551
Matthias Kloseb9621712010-04-24 17:59:49 +000011552$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011553
11554fi
11555
Matthias Kloseb9621712010-04-24 17:59:49 +000011556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11557$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11558if test "${ac_cv_big_endian_double+set}" = set; then :
11559 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011560else
11561
Matthias Kloseb9621712010-04-24 17:59:49 +000011562if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011563 ac_cv_big_endian_double=no
11564else
Matthias Kloseb9621712010-04-24 17:59:49 +000011565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011566/* end confdefs.h. */
11567
11568#include <string.h>
11569int main() {
11570 double x = 9006104071832581.0;
11571 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11572 return 0;
11573 else
11574 return 1;
11575}
11576
11577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011578if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011579 ac_cv_big_endian_double=yes
11580else
Matthias Kloseb9621712010-04-24 17:59:49 +000011581 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011583rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11584 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011585fi
11586
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011587fi
11588
Matthias Kloseb9621712010-04-24 17:59:49 +000011589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11590$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011591if test "$ac_cv_big_endian_double" = yes
11592then
11593
Matthias Kloseb9621712010-04-24 17:59:49 +000011594$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011595
11596fi
11597
11598# Some ARM platforms use a mixed-endian representation for doubles.
11599# While Python doesn't currently have full support for these platforms
11600# (see e.g., issue 1762561), we can at least make sure that float <-> string
11601# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11603$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11604if test "${ac_cv_mixed_endian_double+set}" = set; then :
11605 $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_mixed_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, "\x01\xff\x3f\x43\x05\x04\x03\x02", 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_mixed_endian_double=yes
11626else
Matthias Kloseb9621712010-04-24 17:59:49 +000011627 ac_cv_mixed_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_mixed_endian_double" >&5
11636$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011637if test "$ac_cv_mixed_endian_double" = yes
11638then
11639
Matthias Kloseb9621712010-04-24 17:59:49 +000011640$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011641
11642fi
11643
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011644# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011645# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011646# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011647# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011648# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011649# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011650
11651# This inline assembler syntax may also work for suncc and icc,
11652# so we try it on all platforms.
11653
Matthias Kloseb9621712010-04-24 17:59:49 +000011654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11655$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011657/* end confdefs.h. */
11658
11659int
11660main ()
11661{
11662
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011663 unsigned short cw;
11664 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11665 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011666
11667 ;
11668 return 0;
11669}
11670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011671if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011672 have_gcc_asm_for_x87=yes
11673else
Matthias Kloseb9621712010-04-24 17:59:49 +000011674 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011675fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11678$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011679if test "$have_gcc_asm_for_x87" = yes
11680then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011681
Matthias Kloseb9621712010-04-24 17:59:49 +000011682$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011683
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011684fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011685
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011686# Detect whether system arithmetic is subject to x87-style double
11687# rounding issues. The result of this test has little meaning on non
11688# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11689# mode is round-to-nearest and double rounding issues are present, and
11690# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11692$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011693# $BASECFLAGS may affect the result
11694ac_save_cc="$CC"
11695CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011696if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011697 ac_cv_x87_double_rounding=no
11698else
Matthias Kloseb9621712010-04-24 17:59:49 +000011699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011700/* end confdefs.h. */
11701
11702#include <stdlib.h>
11703#include <math.h>
11704int main() {
11705 volatile double x, y, z;
11706 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11707 x = 0.99999999999999989; /* 1-2**-53 */
11708 y = 1./x;
11709 if (y != 1.)
11710 exit(0);
11711 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11712 x = 1e16;
11713 y = 2.99999;
11714 z = x + y;
11715 if (z != 1e16+4.)
11716 exit(0);
11717 /* both tests show evidence of double rounding */
11718 exit(1);
11719}
11720
11721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011722if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011723 ac_cv_x87_double_rounding=no
11724else
Matthias Kloseb9621712010-04-24 17:59:49 +000011725 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011726fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11728 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011729fi
11730
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011731CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11733$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011734if test "$ac_cv_x87_double_rounding" = yes
11735then
11736
Matthias Kloseb9621712010-04-24 17:59:49 +000011737$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011738
11739fi
11740
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011741# ************************************
11742# * Check for mathematical functions *
11743# ************************************
11744
11745LIBS_SAVE=$LIBS
11746LIBS="$LIBS $LIBM"
11747
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011748# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11749# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11751$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11752if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11753 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011754else
11755
Matthias Kloseb9621712010-04-24 17:59:49 +000011756if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011757 ac_cv_tanh_preserves_zero_sign=no
11758else
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011760/* end confdefs.h. */
11761
11762#include <math.h>
11763#include <stdlib.h>
11764int main() {
11765 /* return 0 if either negative zeros don't exist
11766 on this platform or if negative zeros exist
11767 and tanh(-0.) == -0. */
11768 if (atan2(0., -1.) == atan2(-0., -1.) ||
11769 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11770 else exit(1);
11771}
11772
11773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011774if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011775 ac_cv_tanh_preserves_zero_sign=yes
11776else
Matthias Kloseb9621712010-04-24 17:59:49 +000011777 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011778fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11780 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011781fi
11782
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011783fi
11784
Matthias Kloseb9621712010-04-24 17:59:49 +000011785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11786$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011787if test "$ac_cv_tanh_preserves_zero_sign" = yes
11788then
11789
Matthias Kloseb9621712010-04-24 17:59:49 +000011790$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011791
11792fi
11793
Mark Dickinson9c113362009-09-05 10:36:23 +000011794for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011795do :
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"
11798eval as_val=\$$as_ac_var
11799 if test "x$as_val" = x""yes; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011800 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011801#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011802_ACEOF
11803
11804fi
11805done
11806
Mark Dickinson9c113362009-09-05 10:36:23 +000011807for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011808do :
11809 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11810ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11811eval as_val=\$$as_ac_var
11812 if test "x$as_val" = x""yes; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011813 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011814#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011815_ACEOF
11816
11817fi
11818done
11819
Matthias Kloseb9621712010-04-24 17:59:49 +000011820ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11821"
11822if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11823 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011824else
Matthias Kloseb9621712010-04-24 17:59:49 +000011825 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011826fi
11827
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011828cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011829#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011831ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11832"
11833if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11834 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011835else
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011837fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011838
11839cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011840#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011842ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11843"
11844if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11845 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011846else
Matthias Kloseb9621712010-04-24 17:59:49 +000011847 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011848fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011849
11850cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011851#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011852_ACEOF
11853
11854
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011855LIBS=$LIBS_SAVE
11856
Mark Dickinsona614f042009-11-28 12:48:43 +000011857# For multiprocessing module, check that sem_open
11858# actually works. For FreeBSD versions <= 7.2,
11859# the kernel module that provides POSIX semaphores
11860# isn't loaded by default, so an attempt to call
11861# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11863$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11864if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11865 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011866else
Matthias Kloseb9621712010-04-24 17:59:49 +000011867 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011868 ac_cv_posix_semaphores_enabled=yes
11869else
Matthias Kloseb9621712010-04-24 17:59:49 +000011870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011871/* end confdefs.h. */
11872
11873#include <unistd.h>
11874#include <fcntl.h>
11875#include <stdio.h>
11876#include <semaphore.h>
11877#include <sys/stat.h>
11878
11879int main(void) {
11880 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11881 if (a == SEM_FAILED) {
11882 perror("sem_open");
11883 return 1;
11884 }
11885 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011886 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011887 return 0;
11888}
11889
11890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011891if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011892 ac_cv_posix_semaphores_enabled=yes
11893else
Matthias Kloseb9621712010-04-24 17:59:49 +000011894 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11897 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011898fi
11899
11900
Mark Dickinsona614f042009-11-28 12:48:43 +000011901fi
11902
Matthias Kloseb9621712010-04-24 17:59:49 +000011903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11904$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011905if test $ac_cv_posix_semaphores_enabled = no
11906then
11907
Matthias Kloseb9621712010-04-24 17:59:49 +000011908$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011909
11910fi
11911
Mark Dickinson10683072009-04-18 21:18:19 +000011912# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11914$as_echo_n "checking for broken sem_getvalue... " >&6; }
11915if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11916 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011917else
Matthias Kloseb9621712010-04-24 17:59:49 +000011918 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011919 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000011920else
Matthias Kloseb9621712010-04-24 17:59:49 +000011921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011922/* end confdefs.h. */
11923
11924#include <unistd.h>
11925#include <fcntl.h>
11926#include <stdio.h>
11927#include <semaphore.h>
11928#include <sys/stat.h>
11929
11930int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000011931 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000011932 int count;
11933 int res;
11934 if(a==SEM_FAILED){
11935 perror("sem_open");
11936 return 1;
11937
11938 }
11939 res = sem_getvalue(a, &count);
11940 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011941 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000011942 return res==-1 ? 1 : 0;
11943}
11944
Mark Dickinson10683072009-04-18 21:18:19 +000011945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011946if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011947 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000011948else
Matthias Kloseb9621712010-04-24 17:59:49 +000011949 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011951rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11952 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011953fi
11954
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011955
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011956fi
11957
Matthias Kloseb9621712010-04-24 17:59:49 +000011958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
11959$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011960if test $ac_cv_broken_sem_getvalue = yes
11961then
11962
Matthias Kloseb9621712010-04-24 17:59:49 +000011963$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011964
11965fi
11966
Mark Dickinsonbd792642009-03-18 20:06:12 +000011967# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000011968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
11969$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011970# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011971if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000011972 enableval=$enable_big_digits; case $enable_big_digits in
11973yes)
11974 enable_big_digits=30 ;;
11975no)
11976 enable_big_digits=15 ;;
1197715|30)
11978 ;;
11979*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011980 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 +000011981esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
11983$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011984
11985cat >>confdefs.h <<_ACEOF
11986#define PYLONG_BITS_IN_DIGIT $enable_big_digits
11987_ACEOF
11988
11989
11990else
Matthias Kloseb9621712010-04-24 17:59:49 +000011991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
11992$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011993fi
11994
11995
Guido van Rossumef2255b2000-03-10 22:30:29 +000011996# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011997ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
11998if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011999
12000
Matthias Kloseb9621712010-04-24 17:59:49 +000012001$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012002
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012003 wchar_h="yes"
12004
Guido van Rossumef2255b2000-03-10 22:30:29 +000012005else
Martin v. Löwis11437992002-04-12 09:54:03 +000012006 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012007
12008fi
12009
Michael W. Hudson54241132001-12-07 15:38:26 +000012010
Martin v. Löwis11437992002-04-12 09:54:03 +000012011
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012012# determine wchar_t size
12013if test "$wchar_h" = yes
12014then
Matthias Kloseb9621712010-04-24 17:59:49 +000012015 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012016# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12017# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12018# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12020$as_echo_n "checking size of wchar_t... " >&6; }
12021if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12022 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012023else
Matthias Kloseb9621712010-04-24 17:59:49 +000012024 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12025"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012026
Martin v. Löwis11437992002-04-12 09:54:03 +000012027else
Matthias Kloseb9621712010-04-24 17:59:49 +000012028 if test "$ac_cv_type_wchar_t" = yes; then
12029 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12030$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12031{ as_fn_set_status 77
12032as_fn_error "cannot compute sizeof (wchar_t)
12033See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012034 else
12035 ac_cv_sizeof_wchar_t=0
12036 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012037fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012038
Martin v. Löwis11437992002-04-12 09:54:03 +000012039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12041$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012042
12043
12044
Martin v. Löwis11437992002-04-12 09:54:03 +000012045cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012046#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012047_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012048
Michael W. Hudson54241132001-12-07 15:38:26 +000012049
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012050fi
12051
Matthias Kloseb9621712010-04-24 17:59:49 +000012052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12053$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012054have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012056/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012057
12058#include <tcl.h>
12059#if TCL_UTF_MAX != 6
12060# error "NOT UCS4_TCL"
12061#endif
12062int
12063main ()
12064{
12065
12066 ;
12067 return 0;
12068}
12069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012070if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012071
12072
Matthias Kloseb9621712010-04-24 17:59:49 +000012073$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012074
12075 have_ucs4_tcl=yes
12076
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12080$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012081
Skip Montanaro6dead952003-09-25 14:50:04 +000012082# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012083if test "$wchar_h" = yes
12084then
12085 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12087$as_echo_n "checking whether wchar_t is signed... " >&6; }
12088 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12089 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012090else
12091
Matthias Kloseb9621712010-04-24 17:59:49 +000012092 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012093 ac_cv_wchar_t_signed=yes
12094else
Matthias Kloseb9621712010-04-24 17:59:49 +000012095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012096/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012097
12098 #include <wchar.h>
12099 int main()
12100 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012101 /* Success: exit code 0 */
12102 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012103 }
12104
12105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012106if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012107 ac_cv_wchar_t_signed=yes
12108else
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012111rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12112 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012113fi
12114
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012115fi
12116
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12118$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012119fi
12120
Matthias Kloseb9621712010-04-24 17:59:49 +000012121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12122$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012123
12124# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012125if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012126 withval=$with_wide_unicode;
12127if test "$withval" != no
12128then unicode_size="4"
12129else unicode_size="2"
12130fi
12131
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012132else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012133
Georg Brandl52d168a2008-01-07 18:10:24 +000012134case "$have_ucs4_tcl" in
12135 yes) unicode_size="4" ;;
12136 *) unicode_size="2" ;;
12137esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012138
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012139fi
12140
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012141
12142
Georg Brandl52d168a2008-01-07 18:10:24 +000012143case "$unicode_size" in
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 4) $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012145 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012147 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012148esac
12149
Michael W. Hudson54241132001-12-07 15:38:26 +000012150
Martin v. Löwis11437992002-04-12 09:54:03 +000012151
Georg Brandl52d168a2008-01-07 18:10:24 +000012152# wchar_t is only usable if it maps to an unsigned type
12153if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012154 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012155then
12156 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012157
Matthias Kloseb9621712010-04-24 17:59:49 +000012158$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012159
Matthias Kloseb9621712010-04-24 17:59:49 +000012160 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012161
Georg Brandl52d168a2008-01-07 18:10:24 +000012162elif test "$ac_cv_sizeof_short" = "$unicode_size"
12163then
12164 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012165 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012166
Georg Brandl52d168a2008-01-07 18:10:24 +000012167elif test "$ac_cv_sizeof_long" = "$unicode_size"
12168then
12169 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012171
Georg Brandl52d168a2008-01-07 18:10:24 +000012172else
12173 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012174fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12176$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012177
12178# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12180$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12181if test "${ac_cv_c_bigendian+set}" = set; then :
12182 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012183else
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 ac_cv_c_bigendian=unknown
12185 # See if we're dealing with a universal compiler.
12186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12187/* end confdefs.h. */
12188#ifndef __APPLE_CC__
12189 not a universal capable compiler
12190 #endif
12191 typedef int dummy;
12192
Skip Montanaro6dead952003-09-25 14:50:04 +000012193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012194if ac_fn_c_try_compile "$LINENO"; then :
12195
12196 # Check for potential -arch flags. It is not universal unless
12197 # there are at least two -arch flags with different values.
12198 ac_arch=
12199 ac_prev=
12200 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12201 if test -n "$ac_prev"; then
12202 case $ac_word in
12203 i?86 | x86_64 | ppc | ppc64)
12204 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12205 ac_arch=$ac_word
12206 else
12207 ac_cv_c_bigendian=universal
12208 break
12209 fi
12210 ;;
12211 esac
12212 ac_prev=
12213 elif test "x$ac_word" = "x-arch"; then
12214 ac_prev=arch
12215 fi
12216 done
12217fi
12218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12219 if test $ac_cv_c_bigendian = unknown; then
12220 # See if sys/param.h defines the BYTE_ORDER macro.
12221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012222/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012223#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012224 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012225
Martin v. Löwis11437992002-04-12 09:54:03 +000012226int
12227main ()
12228{
Matthias Kloseb9621712010-04-24 17:59:49 +000012229#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12230 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12231 && LITTLE_ENDIAN)
12232 bogus endian macros
12233 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012234
12235 ;
12236 return 0;
12237}
12238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012239if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012240 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012242/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012243#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012244 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012245
Martin v. Löwis11437992002-04-12 09:54:03 +000012246int
12247main ()
12248{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012249#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 not big endian
12251 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012252
12253 ;
12254 return 0;
12255}
12256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012257if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012258 ac_cv_c_bigendian=yes
12259else
Matthias Kloseb9621712010-04-24 17:59:49 +000012260 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012263fi
12264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12265 fi
12266 if test $ac_cv_c_bigendian = unknown; then
12267 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012269/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012270#include <limits.h>
12271
Martin v. Löwis11437992002-04-12 09:54:03 +000012272int
12273main ()
12274{
Matthias Kloseb9621712010-04-24 17:59:49 +000012275#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12276 bogus endian macros
12277 #endif
12278
Martin v. Löwis11437992002-04-12 09:54:03 +000012279 ;
12280 return 0;
12281}
12282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012283if ac_fn_c_try_compile "$LINENO"; then :
12284 # It does; now see whether it defined to _BIG_ENDIAN or not.
12285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12286/* end confdefs.h. */
12287#include <limits.h>
12288
12289int
12290main ()
12291{
12292#ifndef _BIG_ENDIAN
12293 not big endian
12294 #endif
12295
12296 ;
12297 return 0;
12298}
12299_ACEOF
12300if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012301 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012302else
Matthias Kloseb9621712010-04-24 17:59:49 +000012303 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012304fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12306fi
12307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12308 fi
12309 if test $ac_cv_c_bigendian = unknown; then
12310 # Compile a test program.
12311 if test "$cross_compiling" = yes; then :
12312 # Try to guess by grepping values from an object file.
12313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12314/* end confdefs.h. */
12315short int ascii_mm[] =
12316 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12317 short int ascii_ii[] =
12318 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12319 int use_ascii (int i) {
12320 return ascii_mm[i] + ascii_ii[i];
12321 }
12322 short int ebcdic_ii[] =
12323 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12324 short int ebcdic_mm[] =
12325 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12326 int use_ebcdic (int i) {
12327 return ebcdic_mm[i] + ebcdic_ii[i];
12328 }
12329 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012330
Matthias Kloseb9621712010-04-24 17:59:49 +000012331int
12332main ()
12333{
12334return use_ascii (foo) == use_ebcdic (foo);
12335 ;
12336 return 0;
12337}
12338_ACEOF
12339if ac_fn_c_try_compile "$LINENO"; then :
12340 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12341 ac_cv_c_bigendian=yes
12342 fi
12343 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12344 if test "$ac_cv_c_bigendian" = unknown; then
12345 ac_cv_c_bigendian=no
12346 else
12347 # finding both strings is unlikely to happen, but who knows?
12348 ac_cv_c_bigendian=unknown
12349 fi
12350 fi
12351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012353else
Matthias Kloseb9621712010-04-24 17:59:49 +000012354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012355/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012356$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012357int
12358main ()
12359{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012360
Matthias Kloseb9621712010-04-24 17:59:49 +000012361 /* Are we little or big endian? From Harbison&Steele. */
12362 union
12363 {
12364 long int l;
12365 char c[sizeof (long int)];
12366 } u;
12367 u.l = 1;
12368 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369
12370 ;
12371 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012372}
Martin v. Löwis11437992002-04-12 09:54:03 +000012373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012374if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012375 ac_cv_c_bigendian=no
12376else
Matthias Kloseb9621712010-04-24 17:59:49 +000012377 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012379rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12380 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012382
Matthias Kloseb9621712010-04-24 17:59:49 +000012383 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12386$as_echo "$ac_cv_c_bigendian" >&6; }
12387 case $ac_cv_c_bigendian in #(
12388 yes)
12389 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12390;; #(
12391 no)
12392 ;; #(
12393 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012394
Matthias Kloseb9621712010-04-24 17:59:49 +000012395$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012396
Matthias Kloseb9621712010-04-24 17:59:49 +000012397 ;; #(
12398 *)
12399 as_fn_error "unknown endianness
12400 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12401 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012402
Michael W. Hudson54241132001-12-07 15:38:26 +000012403
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012404# Check whether right shifting a negative integer extends the sign bit
12405# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12407$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12408if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12409 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012410else
Martin v. Löwis11437992002-04-12 09:54:03 +000012411
Matthias Kloseb9621712010-04-24 17:59:49 +000012412if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012413 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012414else
Matthias Kloseb9621712010-04-24 17:59:49 +000012415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012416/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012417
12418int main()
12419{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012420 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012421}
12422
Martin v. Löwis11437992002-04-12 09:54:03 +000012423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012424if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012425 ac_cv_rshift_extends_sign=yes
12426else
Matthias Kloseb9621712010-04-24 17:59:49 +000012427 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012429rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12430 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012431fi
12432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012433fi
12434
Matthias Kloseb9621712010-04-24 17:59:49 +000012435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12436$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012437if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012438then
Martin v. Löwis11437992002-04-12 09:54:03 +000012439
Matthias Kloseb9621712010-04-24 17:59:49 +000012440$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012441
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012442fi
12443
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012444# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12446$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12447if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12448 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012449else
Martin v. Löwis11437992002-04-12 09:54:03 +000012450
Matthias Kloseb9621712010-04-24 17:59:49 +000012451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012452/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012453#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012454int
12455main ()
12456{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012457
12458 FILE *f = fopen("/dev/null", "r");
12459 flockfile(f);
12460 getc_unlocked(f);
12461 funlockfile(f);
12462
Martin v. Löwis11437992002-04-12 09:54:03 +000012463 ;
12464 return 0;
12465}
12466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012467if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012468 ac_cv_have_getc_unlocked=yes
12469else
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 ac_cv_have_getc_unlocked=no
12471fi
12472rm -f core conftest.err conftest.$ac_objext \
12473 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012475
Matthias Kloseb9621712010-04-24 17:59:49 +000012476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12477$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012478if test "$ac_cv_have_getc_unlocked" = yes
12479then
Martin v. Löwis11437992002-04-12 09:54:03 +000012480
Matthias Kloseb9621712010-04-24 17:59:49 +000012481$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012482
12483fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012484
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012485# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012486# save the value of LIBS so we don't actually link Python with readline
12487LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012488
Gregory P. Smith18820942008-09-07 06:24:49 +000012489# On some systems we need to link readline to a termcap compatible
12490# library. NOTE: Keep the precedence of listed libraries synchronised
12491# with setup.py.
12492py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12494$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012495for py_libtermcap in "" ncursesw ncurses curses termcap; do
12496 if test -z "$py_libtermcap"; then
12497 READLINE_LIBS="-lreadline"
12498 else
12499 READLINE_LIBS="-lreadline -l$py_libtermcap"
12500 fi
12501 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012503/* end confdefs.h. */
12504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012505/* Override any GCC internal prototype to avoid an error.
12506 Use char because int might match the return type of a GCC
12507 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012508#ifdef __cplusplus
12509extern "C"
12510#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012511char readline ();
12512int
12513main ()
12514{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012515return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012516 ;
12517 return 0;
12518}
12519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012520if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012521 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012523rm -f core conftest.err conftest.$ac_objext \
12524 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012525 if test $py_cv_lib_readline = yes; then
12526 break
12527 fi
12528done
12529# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12530#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012531if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12533$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012534else
Matthias Kloseb9621712010-04-24 17:59:49 +000012535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12536$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012537
Matthias Kloseb9621712010-04-24 17:59:49 +000012538$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012539
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012540fi
12541
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012542# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12544$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12545if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12546 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012547else
12548 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012549LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012551/* end confdefs.h. */
12552
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012553/* Override any GCC internal prototype to avoid an error.
12554 Use char because int might match the return type of a GCC
12555 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012556#ifdef __cplusplus
12557extern "C"
12558#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012559char rl_callback_handler_install ();
12560int
12561main ()
12562{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012563return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012564 ;
12565 return 0;
12566}
12567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012568if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012569 ac_cv_lib_readline_rl_callback_handler_install=yes
12570else
Matthias Kloseb9621712010-04-24 17:59:49 +000012571 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012572fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012573rm -f core conftest.err conftest.$ac_objext \
12574 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012575LIBS=$ac_check_lib_save_LIBS
12576fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12578$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12579if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012580
Matthias Kloseb9621712010-04-24 17:59:49 +000012581$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012582
12583fi
12584
12585
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012586# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012588/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012589#include <readline/readline.h>
12590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012591if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012592 have_readline=yes
12593else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012594 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012595
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012596fi
12597rm -f conftest.err conftest.$ac_ext
12598if test $have_readline = yes
12599then
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012601/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012602#include <readline/readline.h>
12603
12604_ACEOF
12605if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012606 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012607
Matthias Kloseb9621712010-04-24 17:59:49 +000012608$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012609
12610fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012611rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012612
Matthias Kloseb9621712010-04-24 17:59:49 +000012613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012614/* end confdefs.h. */
12615#include <readline/readline.h>
12616
12617_ACEOF
12618if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012619 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012620
Matthias Kloseb9621712010-04-24 17:59:49 +000012621$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012622
12623fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012624rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012625
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012626fi
12627
Martin v. Löwis0daad592001-09-30 21:09:59 +000012628# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12630$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12631if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12632 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012633else
Martin v. Löwis11437992002-04-12 09:54:03 +000012634 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012635LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012638
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012639/* Override any GCC internal prototype to avoid an error.
12640 Use char because int might match the return type of a GCC
12641 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012642#ifdef __cplusplus
12643extern "C"
12644#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012645char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012646int
12647main ()
12648{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012649return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012650 ;
12651 return 0;
12652}
12653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012654if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012655 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012656else
Matthias Kloseb9621712010-04-24 17:59:49 +000012657 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012658fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012659rm -f core conftest.err conftest.$ac_objext \
12660 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012661LIBS=$ac_check_lib_save_LIBS
12662fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12664$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12665if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012666
Matthias Kloseb9621712010-04-24 17:59:49 +000012667$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012668
Martin v. Löwis0daad592001-09-30 21:09:59 +000012669fi
12670
Michael W. Hudson54241132001-12-07 15:38:26 +000012671
Thomas Wouters89d996e2007-09-08 17:39:28 +000012672# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12674$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12675if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12676 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012677else
12678 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012679LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012681/* end confdefs.h. */
12682
12683/* Override any GCC internal prototype to avoid an error.
12684 Use char because int might match the return type of a GCC
12685 builtin and then its argument prototype would still apply. */
12686#ifdef __cplusplus
12687extern "C"
12688#endif
12689char rl_completion_display_matches_hook ();
12690int
12691main ()
12692{
12693return rl_completion_display_matches_hook ();
12694 ;
12695 return 0;
12696}
12697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012698if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012699 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12700else
Matthias Kloseb9621712010-04-24 17:59:49 +000012701 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012702fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012703rm -f core conftest.err conftest.$ac_objext \
12704 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012705LIBS=$ac_check_lib_save_LIBS
12706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12708$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12709if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012710
Matthias Kloseb9621712010-04-24 17:59:49 +000012711$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012712
12713fi
12714
12715
Martin v. Löwis0daad592001-09-30 21:09:59 +000012716# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12718$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12719if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12720 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012721else
Martin v. Löwis11437992002-04-12 09:54:03 +000012722 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012723LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012726
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012727/* Override any GCC internal prototype to avoid an error.
12728 Use char because int might match the return type of a GCC
12729 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012730#ifdef __cplusplus
12731extern "C"
12732#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012733char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012734int
12735main ()
12736{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012738 ;
12739 return 0;
12740}
12741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012742if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012743 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012744else
Matthias Kloseb9621712010-04-24 17:59:49 +000012745 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012747rm -f core conftest.err conftest.$ac_objext \
12748 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012749LIBS=$ac_check_lib_save_LIBS
12750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12752$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12753if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012754
Matthias Kloseb9621712010-04-24 17:59:49 +000012755$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012756
Guido van Rossum353ae582001-07-10 16:45:32 +000012757fi
12758
Jack Jansendd19cf82001-12-06 22:36:17 +000012759
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012760# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012762/* end confdefs.h. */
12763#include <readline/readline.h>
12764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012765if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012766 have_readline=yes
12767else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012768 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012769
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012770fi
12771rm -f conftest.err conftest.$ac_ext
12772if test $have_readline = yes
12773then
Matthias Kloseb9621712010-04-24 17:59:49 +000012774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012775/* end confdefs.h. */
12776#include <readline/readline.h>
12777
12778_ACEOF
12779if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012780 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012781
Matthias Kloseb9621712010-04-24 17:59:49 +000012782$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012783
12784fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012785rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012786
12787fi
12788
Martin v. Löwis82bca632006-02-10 20:49:30 +000012789# End of readline checks: restore LIBS
12790LIBS=$LIBS_no_readline
12791
Matthias Kloseb9621712010-04-24 17:59:49 +000012792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12793$as_echo_n "checking for broken nice()... " >&6; }
12794if test "${ac_cv_broken_nice+set}" = set; then :
12795 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012796else
Martin v. Löwis11437992002-04-12 09:54:03 +000012797
Matthias Kloseb9621712010-04-24 17:59:49 +000012798if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012799 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012800else
Matthias Kloseb9621712010-04-24 17:59:49 +000012801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012802/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012803
12804int main()
12805{
12806 int val1 = nice(1);
12807 if (val1 != -1 && val1 == nice(2))
12808 exit(0);
12809 exit(1);
12810}
12811
Martin v. Löwis11437992002-04-12 09:54:03 +000012812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012813if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012814 ac_cv_broken_nice=yes
12815else
Matthias Kloseb9621712010-04-24 17:59:49 +000012816 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12819 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012820fi
12821
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012822fi
12823
Matthias Kloseb9621712010-04-24 17:59:49 +000012824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12825$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012826if test "$ac_cv_broken_nice" = yes
12827then
Martin v. Löwis11437992002-04-12 09:54:03 +000012828
Matthias Kloseb9621712010-04-24 17:59:49 +000012829$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012830
12831fi
12832
Matthias Kloseb9621712010-04-24 17:59:49 +000012833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12834$as_echo_n "checking for broken poll()... " >&6; }
12835if test "${ac_cv_broken_poll+set}" = set; then :
12836 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012837else
Matthias Kloseb9621712010-04-24 17:59:49 +000012838 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012839 ac_cv_broken_poll=no
12840else
Matthias Kloseb9621712010-04-24 17:59:49 +000012841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012842/* end confdefs.h. */
12843
12844#include <poll.h>
12845
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012846int main()
12847{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012848 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012849 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012850
12851 close (42);
12852
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012853 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012854 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012855 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012856 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012857 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012858 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012859 return 1;
12860}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012861
12862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012863if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012864 ac_cv_broken_poll=yes
12865else
Matthias Kloseb9621712010-04-24 17:59:49 +000012866 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012867fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012868rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12869 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012871
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012872fi
12873
Matthias Kloseb9621712010-04-24 17:59:49 +000012874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
12875$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012876if test "$ac_cv_broken_poll" = yes
12877then
12878
Matthias Kloseb9621712010-04-24 17:59:49 +000012879$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012880
12881fi
12882
Brett Cannon43802422005-02-10 20:48:03 +000012883# 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 +000012884# (which is not required by ISO C or UNIX spec) and/or if we support
12885# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000012886ac_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 +000012887#include <$ac_cv_struct_tm>
12888
Matthias Kloseb9621712010-04-24 17:59:49 +000012889"
12890if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000012891
12892cat >>confdefs.h <<_ACEOF
12893#define HAVE_STRUCT_TM_TM_ZONE 1
12894_ACEOF
12895
12896
12897fi
12898
12899if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12900
Matthias Kloseb9621712010-04-24 17:59:49 +000012901$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012902
12903else
Matthias Kloseb9621712010-04-24 17:59:49 +000012904 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12905"
12906if test "x$ac_cv_have_decl_tzname" = x""yes; then :
12907 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012908else
Matthias Kloseb9621712010-04-24 17:59:49 +000012909 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012910fi
12911
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012912cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012913#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012914_ACEOF
12915
Matthias Kloseb9621712010-04-24 17:59:49 +000012916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12917$as_echo_n "checking for tzname... " >&6; }
12918if test "${ac_cv_var_tzname+set}" = set; then :
12919 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012920else
Matthias Kloseb9621712010-04-24 17:59:49 +000012921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012922/* end confdefs.h. */
12923#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924#if !HAVE_DECL_TZNAME
12925extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000012926#endif
12927
12928int
12929main ()
12930{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012931return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000012932 ;
12933 return 0;
12934}
12935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012936if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000012937 ac_cv_var_tzname=yes
12938else
Matthias Kloseb9621712010-04-24 17:59:49 +000012939 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000012940fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012941rm -f core conftest.err conftest.$ac_objext \
12942 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012943fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12945$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000012946 if test $ac_cv_var_tzname = yes; then
12947
Matthias Kloseb9621712010-04-24 17:59:49 +000012948$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012949
12950 fi
12951fi
12952
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012953
Martin v. Löwis1d459062005-03-14 21:23:33 +000012954# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000012955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
12956$as_echo_n "checking for working tzset()... " >&6; }
12957if test "${ac_cv_working_tzset+set}" = set; then :
12958 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012959else
12960
Matthias Kloseb9621712010-04-24 17:59:49 +000012961if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012962 ac_cv_working_tzset=no
12963else
Matthias Kloseb9621712010-04-24 17:59:49 +000012964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012965/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012966
12967#include <stdlib.h>
12968#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000012969#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000012970
12971#if HAVE_TZNAME
12972extern char *tzname[];
12973#endif
12974
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012975int main()
12976{
Brett Cannon18367812003-09-19 00:59:16 +000012977 /* Note that we need to ensure that not only does tzset(3)
12978 do 'something' with localtime, but it works as documented
12979 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000012980 This includes making sure that tzname is set properly if
12981 tm->tm_zone does not exist since it is the alternative way
12982 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000012983
12984 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000012985 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000012986 */
12987
Martin v. Löwis1d459062005-03-14 21:23:33 +000012988 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000012989 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
12990
Neal Norwitz7f2588c2003-04-11 15:35:53 +000012991 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012992 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000012993 if (localtime(&groundhogday)->tm_hour != 0)
12994 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012995#if HAVE_TZNAME
12996 /* For UTC, tzname[1] is sometimes "", sometimes " " */
12997 if (strcmp(tzname[0], "UTC") ||
12998 (tzname[1][0] != 0 && tzname[1][0] != ' '))
12999 exit(1);
13000#endif
Brett Cannon18367812003-09-19 00:59:16 +000013001
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013002 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013003 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013004 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013005 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013006#if HAVE_TZNAME
13007 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13008 exit(1);
13009#endif
Brett Cannon18367812003-09-19 00:59:16 +000013010
13011 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13012 tzset();
13013 if (localtime(&groundhogday)->tm_hour != 11)
13014 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013015#if HAVE_TZNAME
13016 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13017 exit(1);
13018#endif
13019
13020#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013021 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13022 exit(1);
13023 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13024 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013025#endif
Brett Cannon18367812003-09-19 00:59:16 +000013026
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013027 exit(0);
13028}
13029
13030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013031if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013032 ac_cv_working_tzset=yes
13033else
Matthias Kloseb9621712010-04-24 17:59:49 +000013034 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13037 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013038fi
13039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013040fi
13041
Matthias Kloseb9621712010-04-24 17:59:49 +000013042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13043$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013044if test "$ac_cv_working_tzset" = yes
13045then
13046
Matthias Kloseb9621712010-04-24 17:59:49 +000013047$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013048
13049fi
13050
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013051# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13053$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13054if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13055 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013056else
Matthias Kloseb9621712010-04-24 17:59:49 +000013057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013058/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013059#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013060int
13061main ()
13062{
13063
13064struct stat st;
13065st.st_mtim.tv_nsec = 1;
13066
13067 ;
13068 return 0;
13069}
13070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013071if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013072 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013073else
Matthias Kloseb9621712010-04-24 17:59:49 +000013074 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13077fi
13078
Matthias Kloseb9621712010-04-24 17:59:49 +000013079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13080$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013081if test "$ac_cv_stat_tv_nsec" = yes
13082then
13083
Matthias Kloseb9621712010-04-24 17:59:49 +000013084$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013085
13086fi
13087
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013088# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13090$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13091if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13092 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013093else
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013095/* end confdefs.h. */
13096#include <sys/stat.h>
13097int
13098main ()
13099{
13100
13101struct stat st;
13102st.st_mtimespec.tv_nsec = 1;
13103
13104 ;
13105 return 0;
13106}
13107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013108if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013109 ac_cv_stat_tv_nsec2=yes
13110else
Matthias Kloseb9621712010-04-24 17:59:49 +000013111 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13114fi
13115
Matthias Kloseb9621712010-04-24 17:59:49 +000013116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13117$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013118if test "$ac_cv_stat_tv_nsec2" = yes
13119then
13120
Matthias Kloseb9621712010-04-24 17:59:49 +000013121$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013122
13123fi
13124
Jack Jansen666b1e72001-10-31 12:11:48 +000013125# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13127$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13128if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13129 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013130else
Matthias Kloseb9621712010-04-24 17:59:49 +000013131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013132/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013133#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013134int
13135main ()
13136{
Jack Jansen666b1e72001-10-31 12:11:48 +000013137
13138 int rtn;
13139 rtn = mvwdelch(0,0,0);
13140
Martin v. Löwis11437992002-04-12 09:54:03 +000013141 ;
13142 return 0;
13143}
13144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013145if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013146 ac_cv_mvwdelch_is_expression=yes
13147else
Matthias Kloseb9621712010-04-24 17:59:49 +000013148 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13151fi
13152
Matthias Kloseb9621712010-04-24 17:59:49 +000013153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13154$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013155
13156if test "$ac_cv_mvwdelch_is_expression" = yes
13157then
Martin v. Löwis11437992002-04-12 09:54:03 +000013158
Matthias Kloseb9621712010-04-24 17:59:49 +000013159$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013160
13161fi
13162
Matthias Kloseb9621712010-04-24 17:59:49 +000013163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13164$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13165if test "${ac_cv_window_has_flags+set}" = set; then :
13166 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013167else
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013169/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013170#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013171int
13172main ()
13173{
Jack Jansen666b1e72001-10-31 12:11:48 +000013174
13175 WINDOW *w;
13176 w->_flags = 0;
13177
Martin v. Löwis11437992002-04-12 09:54:03 +000013178 ;
13179 return 0;
13180}
13181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013182if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013183 ac_cv_window_has_flags=yes
13184else
Matthias Kloseb9621712010-04-24 17:59:49 +000013185 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13188fi
13189
Matthias Kloseb9621712010-04-24 17:59:49 +000013190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13191$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013192
Jack Jansen666b1e72001-10-31 12:11:48 +000013193
13194if test "$ac_cv_window_has_flags" = yes
13195then
Martin v. Löwis11437992002-04-12 09:54:03 +000013196
Matthias Kloseb9621712010-04-24 17:59:49 +000013197$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013198
13199fi
13200
Matthias Kloseb9621712010-04-24 17:59:49 +000013201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13202$as_echo_n "checking for is_term_resized... " >&6; }
13203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013204/* end confdefs.h. */
13205#include <curses.h>
13206int
13207main ()
13208{
13209void *x=is_term_resized
13210 ;
13211 return 0;
13212}
13213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013214if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013215
Matthias Kloseb9621712010-04-24 17:59:49 +000013216$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013217
Matthias Kloseb159a552010-04-25 21:00:44 +000013218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013219$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013220else
Matthias Kloseb9621712010-04-24 17:59:49 +000013221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13222$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013223
13224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13226
Matthias Kloseb9621712010-04-24 17:59:49 +000013227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13228$as_echo_n "checking for resize_term... " >&6; }
13229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013230/* end confdefs.h. */
13231#include <curses.h>
13232int
13233main ()
13234{
13235void *x=resize_term
13236 ;
13237 return 0;
13238}
13239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013240if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013241
Matthias Kloseb9621712010-04-24 17:59:49 +000013242$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013243
Matthias Kloseb159a552010-04-25 21:00:44 +000013244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013245$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013246else
Matthias Kloseb9621712010-04-24 17:59:49 +000013247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13248$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013249
13250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13254$as_echo_n "checking for resizeterm... " >&6; }
13255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013256/* end confdefs.h. */
13257#include <curses.h>
13258int
13259main ()
13260{
13261void *x=resizeterm
13262 ;
13263 return 0;
13264}
13265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013266if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013267
Matthias Kloseb9621712010-04-24 17:59:49 +000013268$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013269
Matthias Kloseb159a552010-04-25 21:00:44 +000013270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013271$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013272else
Matthias Kloseb9621712010-04-24 17:59:49 +000013273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13274$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013275
13276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13278
Matthias Kloseb9621712010-04-24 17:59:49 +000013279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13280$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013281
13282if test -r /dev/ptmx
13283then
Matthias Kloseb9621712010-04-24 17:59:49 +000013284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13285$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013286
Matthias Kloseb9621712010-04-24 17:59:49 +000013287$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013288
Thomas Wouters89f507f2006-12-13 04:49:30 +000013289else
Matthias Kloseb9621712010-04-24 17:59:49 +000013290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13291$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013292fi
13293
Matthias Kloseb9621712010-04-24 17:59:49 +000013294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13295$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013296
13297if test -r /dev/ptc
13298then
Matthias Kloseb9621712010-04-24 17:59:49 +000013299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13300$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013301
Matthias Kloseb9621712010-04-24 17:59:49 +000013302$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013303
Thomas Wouters89f507f2006-12-13 04:49:30 +000013304else
Matthias Kloseb9621712010-04-24 17:59:49 +000013305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13306$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013307fi
13308
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013309if test "$have_long_long" = yes
13310then
Matthias Kloseb9621712010-04-24 17:59:49 +000013311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13312$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13313 if test "${ac_cv_have_long_long_format+set}" = set; then :
13314 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013315else
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013317 ac_cv_have_long_long_format=no
13318else
Matthias Kloseb9621712010-04-24 17:59:49 +000013319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013320/* end confdefs.h. */
13321
13322 #include <stdio.h>
13323 #include <stddef.h>
13324 #include <string.h>
13325
13326 #ifdef HAVE_SYS_TYPES_H
13327 #include <sys/types.h>
13328 #endif
13329
13330 int main()
13331 {
13332 char buffer[256];
13333
13334 if (sprintf(buffer, "%lld", (long long)123) < 0)
13335 return 1;
13336 if (strcmp(buffer, "123"))
13337 return 1;
13338
13339 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13340 return 1;
13341 if (strcmp(buffer, "-123"))
13342 return 1;
13343
13344 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13345 return 1;
13346 if (strcmp(buffer, "123"))
13347 return 1;
13348
13349 return 0;
13350 }
13351
13352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013353if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013354 ac_cv_have_long_long_format=yes
13355else
Matthias Kloseb9621712010-04-24 17:59:49 +000013356 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013358rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13359 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013360fi
13361
13362
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013363fi
13364
Matthias Kloseb9621712010-04-24 17:59:49 +000013365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13366$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013367fi
13368
Mark Dickinson89d7d412009-12-31 20:50:59 +000013369if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013370then
13371
Matthias Kloseb9621712010-04-24 17:59:49 +000013372$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013373
13374fi
13375
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013376if test $ac_sys_system = Darwin
13377then
13378 LIBS="$LIBS -framework CoreFoundation"
13379fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13382$as_echo_n "checking for %zd printf() format support... " >&6; }
13383if test "${ac_cv_have_size_t_format+set}" = set; then :
13384 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013385else
Matthias Kloseb9621712010-04-24 17:59:49 +000013386 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013387 ac_cv_have_size_t_format="cross -- assuming yes"
13388
Thomas Wouters477c8d52006-05-27 19:21:47 +000013389else
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013391/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013392
Thomas Wouters477c8d52006-05-27 19:21:47 +000013393#include <stdio.h>
13394#include <stddef.h>
13395#include <string.h>
13396
Christian Heimes2c181612007-12-17 20:04:13 +000013397#ifdef HAVE_SYS_TYPES_H
13398#include <sys/types.h>
13399#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013400
13401#ifdef HAVE_SSIZE_T
13402typedef ssize_t Py_ssize_t;
13403#elif SIZEOF_VOID_P == SIZEOF_LONG
13404typedef long Py_ssize_t;
13405#else
13406typedef int Py_ssize_t;
13407#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013408
Christian Heimes2c181612007-12-17 20:04:13 +000013409int main()
13410{
13411 char buffer[256];
13412
Thomas Wouters477c8d52006-05-27 19:21:47 +000013413 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13414 return 1;
13415
Thomas Wouters89f507f2006-12-13 04:49:30 +000013416 if (strcmp(buffer, "123"))
13417 return 1;
13418
13419 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13420 return 1;
13421
13422 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013423 return 1;
13424
13425 return 0;
13426}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013427
Thomas Wouters477c8d52006-05-27 19:21:47 +000013428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013429if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013430 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013431else
Matthias Kloseb9621712010-04-24 17:59:49 +000013432 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013433fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013434rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13435 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013436fi
13437
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013438fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13440$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013441if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013442
Matthias Kloseb9621712010-04-24 17:59:49 +000013443$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013444
13445fi
13446
Matthias Kloseb9621712010-04-24 17:59:49 +000013447ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013448#ifdef HAVE_SYS_TYPES_H
13449#include <sys/types.h>
13450#endif
13451#ifdef HAVE_SYS_SOCKET_H
13452#include <sys/socket.h>
13453#endif
13454
Matthias Kloseb9621712010-04-24 17:59:49 +000013455"
13456if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013457
Martin v. Löwis11437992002-04-12 09:54:03 +000013458else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013461
13462fi
13463
Michael W. Hudson54241132001-12-07 15:38:26 +000013464
Matthias Kloseb9621712010-04-24 17:59:49 +000013465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13466$as_echo_n "checking for broken mbstowcs... " >&6; }
13467if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13468 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013469else
Matthias Kloseb9621712010-04-24 17:59:49 +000013470 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013471 ac_cv_broken_mbstowcs=no
13472else
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013474/* end confdefs.h. */
13475
13476#include<stdlib.h>
13477int main() {
13478 size_t len = -1;
13479 const char *str = "text";
13480 len = mbstowcs(NULL, str, 0);
13481 return (len != 4);
13482}
13483
13484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013485if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013486 ac_cv_broken_mbstowcs=no
13487else
Matthias Kloseb9621712010-04-24 17:59:49 +000013488 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13491 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013492fi
13493
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013494fi
13495
Matthias Kloseb9621712010-04-24 17:59:49 +000013496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13497$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013498if test "$ac_cv_broken_mbstowcs" = yes
13499then
13500
Matthias Kloseb9621712010-04-24 17:59:49 +000013501$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013502
13503fi
13504
Antoine Pitroub52ec782009-01-25 16:34:23 +000013505# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13507$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013508
13509# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013510if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013511 withval=$with_computed_gotos;
13512if test "$withval" != no
13513then
13514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013516
Matthias Kloseb9621712010-04-24 17:59:49 +000013517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13518$as_echo "yes" >&6; }
13519else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13520$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013521fi
13522else
Matthias Kloseb9621712010-04-24 17:59:49 +000013523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13524$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013525fi
13526
13527
13528
Michael W. Hudson54241132001-12-07 15:38:26 +000013529
Jesus Cea6a792292010-05-03 21:18:48 +000013530case $ac_sys_system in
13531 OSF*) as_fn_error "OSF* systems are deprecated unless somebody volunteers. Check http://bugs.python.org/issue8606" "$LINENO" 5 ;;
13532esac
13533
13534
13535
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013536
13537
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013538for h in `(cd $srcdir;echo Python/thread_*.h)`
13539do
13540 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13541done
13542
Michael W. Hudson54241132001-12-07 15:38:26 +000013543
Neal Norwitzd24499d2005-12-18 21:36:39 +000013544SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13546$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013547for dir in $SRCDIRS; do
13548 if test ! -d $dir; then
13549 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013550 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013551done
Matthias Kloseb9621712010-04-24 17:59:49 +000013552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13553$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013554
Guido van Rossum627b2d71993-12-24 10:39:16 +000013555# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013556ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013557
Martin v. Löwis11437992002-04-12 09:54:03 +000013558cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013559# This file is a shell script that caches the results of configure
13560# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013561# scripts and configure runs, see configure's option --config-cache.
13562# It is not useful on other systems. If it contains results you don't
13563# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013564#
Martin v. Löwis11437992002-04-12 09:54:03 +000013565# config.status only pays attention to the cache file if you give it
13566# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013567#
Skip Montanaro6dead952003-09-25 14:50:04 +000013568# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013569# loading this file, other *unset* `ac_cv_foo' will be assigned the
13570# following values.
13571
13572_ACEOF
13573
Guido van Rossumf78abae1997-01-21 22:02:36 +000013574# The following way of writing the cache mishandles newlines in values,
13575# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013576# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013577# Ultrix sh set writes to stderr and can't be redirected directly,
13578# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013579(
13580 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13581 eval ac_val=\$$ac_var
13582 case $ac_val in #(
13583 *${as_nl}*)
13584 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13586$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013587 esac
13588 case $ac_var in #(
13589 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013590 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13591 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013592 esac ;;
13593 esac
13594 done
13595
Martin v. Löwis11437992002-04-12 09:54:03 +000013596 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013597 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13598 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013599 # `set' does not quote correctly, so add quotes: double-quote
13600 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013601 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013602 "s/'/'\\\\''/g;
13603 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013604 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013605 *)
13606 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013607 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013608 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013609 esac |
13610 sort
13611) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013612 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013613 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013614 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013615 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013616 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13617 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013618 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13619 :end' >>confcache
13620if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13621 if test -w "$cache_file"; then
13622 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013623 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13624$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013625 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013626 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13628$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013629 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013630fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013631rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013632
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013633test "x$prefix" = xNONE && prefix=$ac_default_prefix
13634# Let make expand exec_prefix.
13635test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013636
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013637DEFS=-DHAVE_CONFIG_H
13638
Skip Montanaro6dead952003-09-25 14:50:04 +000013639ac_libobjs=
13640ac_ltlibobjs=
13641for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13642 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013643 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013644 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013645 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13646 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013647 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13648 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013649done
13650LIBOBJS=$ac_libobjs
13651
13652LTLIBOBJS=$ac_ltlibobjs
13653
13654
Martin v. Löwis11437992002-04-12 09:54:03 +000013655
Matthias Kloseb9621712010-04-24 17:59:49 +000013656
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013657: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013658ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013659ac_clean_files_save=$ac_clean_files
13660ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013661{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13662$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13663as_write_fail=0
13664cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013665#! $SHELL
13666# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013667# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013668# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013669# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013670
Martin v. Löwis11437992002-04-12 09:54:03 +000013671debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013672ac_cs_recheck=false
13673ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013674
Matthias Kloseb9621712010-04-24 17:59:49 +000013675SHELL=\${CONFIG_SHELL-$SHELL}
13676export SHELL
13677_ASEOF
13678cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13679## -------------------- ##
13680## M4sh Initialization. ##
13681## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013682
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013683# Be more Bourne compatible
13684DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013685if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013686 emulate sh
13687 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013688 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013689 # is contrary to our usage. Disable this feature.
13690 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013691 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013692else
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 case `(set -o) 2>/dev/null` in #(
13694 *posix*) :
13695 set -o posix ;; #(
13696 *) :
13697 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013698esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013699fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013700
13701
Matthias Kloseb9621712010-04-24 17:59:49 +000013702as_nl='
13703'
13704export as_nl
13705# Printing a long string crashes Solaris 7 /usr/bin/printf.
13706as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13707as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13708as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13709# Prefer a ksh shell builtin over an external printf program on Solaris,
13710# but without wasting forks for bash or zsh.
13711if test -z "$BASH_VERSION$ZSH_VERSION" \
13712 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13713 as_echo='print -r --'
13714 as_echo_n='print -rn --'
13715elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13716 as_echo='printf %s\n'
13717 as_echo_n='printf %s'
13718else
13719 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13720 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13721 as_echo_n='/usr/ucb/echo -n'
13722 else
13723 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13724 as_echo_n_body='eval
13725 arg=$1;
13726 case $arg in #(
13727 *"$as_nl"*)
13728 expr "X$arg" : "X\\(.*\\)$as_nl";
13729 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13730 esac;
13731 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13732 '
13733 export as_echo_n_body
13734 as_echo_n='sh -c $as_echo_n_body as_echo'
13735 fi
13736 export as_echo_body
13737 as_echo='sh -c $as_echo_body as_echo'
13738fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013739
13740# The user is always right.
13741if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013742 PATH_SEPARATOR=:
13743 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13744 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13745 PATH_SEPARATOR=';'
13746 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013747fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013749
13750# IFS
13751# We need space, tab and new line, in precisely that order. Quoting is
13752# there to prevent editors from complaining about space-tab.
13753# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13754# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013755IFS=" "" $as_nl"
13756
13757# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013758case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013759 *[\\/]* ) as_myself=$0 ;;
13760 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013761for as_dir in $PATH
13762do
13763 IFS=$as_save_IFS
13764 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013765 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13766 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013767IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013769 ;;
13770esac
13771# We did not find ourselves, most probably we were run as `sh COMMAND'
13772# in which case we are not to be found in the path.
13773if test "x$as_myself" = x; then
13774 as_myself=$0
13775fi
13776if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13778 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013779fi
13780
Matthias Kloseb9621712010-04-24 17:59:49 +000013781# Unset variables that we do not need and which cause bugs (e.g. in
13782# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13783# suppresses any "Segmentation fault" message there. '((' could
13784# trigger a bug in pdksh 5.2.14.
13785for as_var in BASH_ENV ENV MAIL MAILPATH
13786do eval test x\${$as_var+set} = xset \
13787 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013788done
13789PS1='$ '
13790PS2='> '
13791PS4='+ '
13792
13793# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013794LC_ALL=C
13795export LC_ALL
13796LANGUAGE=C
13797export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798
Matthias Kloseb9621712010-04-24 17:59:49 +000013799# CDPATH.
13800(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13801
13802
13803# as_fn_error ERROR [LINENO LOG_FD]
13804# ---------------------------------
13805# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13806# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13807# script with status $?, using 1 if that was 0.
13808as_fn_error ()
13809{
13810 as_status=$?; test $as_status -eq 0 && as_status=1
13811 if test "$3"; then
13812 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13813 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
13814 fi
13815 $as_echo "$as_me: error: $1" >&2
13816 as_fn_exit $as_status
13817} # as_fn_error
13818
13819
13820# as_fn_set_status STATUS
13821# -----------------------
13822# Set $? to STATUS, without forking.
13823as_fn_set_status ()
13824{
13825 return $1
13826} # as_fn_set_status
13827
13828# as_fn_exit STATUS
13829# -----------------
13830# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13831as_fn_exit ()
13832{
13833 set +e
13834 as_fn_set_status $1
13835 exit $1
13836} # as_fn_exit
13837
13838# as_fn_unset VAR
13839# ---------------
13840# Portably unset VAR.
13841as_fn_unset ()
13842{
13843 { eval $1=; unset $1;}
13844}
13845as_unset=as_fn_unset
13846# as_fn_append VAR VALUE
13847# ----------------------
13848# Append the text in VALUE to the end of the definition contained in VAR. Take
13849# advantage of any shell optimizations that allow amortized linear growth over
13850# repeated appends, instead of the typical quadratic growth present in naive
13851# implementations.
13852if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13853 eval 'as_fn_append ()
13854 {
13855 eval $1+=\$2
13856 }'
13857else
13858 as_fn_append ()
13859 {
13860 eval $1=\$$1\$2
13861 }
13862fi # as_fn_append
13863
13864# as_fn_arith ARG...
13865# ------------------
13866# Perform arithmetic evaluation on the ARGs, and store the result in the
13867# global $as_val. Take advantage of shells that can avoid forks. The arguments
13868# must be portable across $(()) and expr.
13869if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13870 eval 'as_fn_arith ()
13871 {
13872 as_val=$(( $* ))
13873 }'
13874else
13875 as_fn_arith ()
13876 {
13877 as_val=`expr "$@" || test $? -eq 1`
13878 }
13879fi # as_fn_arith
13880
13881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013882if expr a : '\(a\)' >/dev/null 2>&1 &&
13883 test "X`expr 00001 : '.*\(...\)'`" = X001; then
13884 as_expr=expr
13885else
13886 as_expr=false
13887fi
13888
13889if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13890 as_basename=basename
13891else
13892 as_basename=false
13893fi
13894
Matthias Kloseb9621712010-04-24 17:59:49 +000013895if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13896 as_dirname=dirname
13897else
13898 as_dirname=false
13899fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013901as_me=`$as_basename -- "$0" ||
13902$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13903 X"$0" : 'X\(//\)$' \| \
13904 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000013905$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013906 sed '/^.*\/\([^/][^/]*\)\/*$/{
13907 s//\1/
13908 q
13909 }
13910 /^X\/\(\/\/\)$/{
13911 s//\1/
13912 q
13913 }
13914 /^X\/\(\/\).*/{
13915 s//\1/
13916 q
13917 }
13918 s/.*/./; q'`
13919
Matthias Kloseb9621712010-04-24 17:59:49 +000013920# Avoid depending upon Character Ranges.
13921as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13922as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13923as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13924as_cr_digits='0123456789'
13925as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013926
13927ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000013928case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013929-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000013930 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013931 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000013932 xy) ECHO_C='\c';;
13933 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13934 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013935 esac;;
13936*)
13937 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000013938esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013939
Martin v. Löwis11437992002-04-12 09:54:03 +000013940rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013941if test -d conf$$.dir; then
13942 rm -f conf$$.dir/conf$$.file
13943else
13944 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000013945 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013947if (echo >conf$$.file) 2>/dev/null; then
13948 if ln -s conf$$.file conf$$ 2>/dev/null; then
13949 as_ln_s='ln -s'
13950 # ... but there are two gotchas:
13951 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13952 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13953 # In both cases, we have to default to `cp -p'.
13954 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13955 as_ln_s='cp -p'
13956 elif ln conf$$.file conf$$ 2>/dev/null; then
13957 as_ln_s=ln
13958 else
Martin v. Löwis11437992002-04-12 09:54:03 +000013959 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013961else
13962 as_ln_s='cp -p'
13963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013964rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13965rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000013966
Matthias Kloseb9621712010-04-24 17:59:49 +000013967
13968# as_fn_mkdir_p
13969# -------------
13970# Create "$as_dir" as a directory, including parents if necessary.
13971as_fn_mkdir_p ()
13972{
13973
13974 case $as_dir in #(
13975 -*) as_dir=./$as_dir;;
13976 esac
13977 test -d "$as_dir" || eval $as_mkdir_p || {
13978 as_dirs=
13979 while :; do
13980 case $as_dir in #(
13981 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13982 *) as_qdir=$as_dir;;
13983 esac
13984 as_dirs="'$as_qdir' $as_dirs"
13985 as_dir=`$as_dirname -- "$as_dir" ||
13986$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13987 X"$as_dir" : 'X\(//\)[^/]' \| \
13988 X"$as_dir" : 'X\(//\)$' \| \
13989 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13990$as_echo X"$as_dir" |
13991 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13992 s//\1/
13993 q
13994 }
13995 /^X\(\/\/\)[^/].*/{
13996 s//\1/
13997 q
13998 }
13999 /^X\(\/\/\)$/{
14000 s//\1/
14001 q
14002 }
14003 /^X\(\/\).*/{
14004 s//\1/
14005 q
14006 }
14007 s/.*/./; q'`
14008 test -d "$as_dir" && break
14009 done
14010 test -z "$as_dirs" || eval "mkdir $as_dirs"
14011 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
14012
14013
14014} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014015if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014016 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014017else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014018 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014019 as_mkdir_p=false
14020fi
14021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014022if test -x / >/dev/null 2>&1; then
14023 as_test_x='test -x'
14024else
14025 if ls -dL / >/dev/null 2>&1; then
14026 as_ls_L_option=L
14027 else
14028 as_ls_L_option=
14029 fi
14030 as_test_x='
14031 eval sh -c '\''
14032 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014033 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014034 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014035 case $1 in #(
14036 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014037 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014038 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014039 ???[sx]*):;;*)false;;esac;fi
14040 '\'' sh
14041 '
14042fi
14043as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014044
14045# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014046as_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 +000014047
14048# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014049as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014050
14051
Martin v. Löwis11437992002-04-12 09:54:03 +000014052exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014053## ----------------------------------- ##
14054## Main body of $CONFIG_STATUS script. ##
14055## ----------------------------------- ##
14056_ASEOF
14057test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014058
Matthias Kloseb9621712010-04-24 17:59:49 +000014059cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14060# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014061# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014062# values after options handling.
14063ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014064This file was extended by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +000014065generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014066
14067 CONFIG_FILES = $CONFIG_FILES
14068 CONFIG_HEADERS = $CONFIG_HEADERS
14069 CONFIG_LINKS = $CONFIG_LINKS
14070 CONFIG_COMMANDS = $CONFIG_COMMANDS
14071 $ $0 $@
14072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014073on `(hostname || uname -n) 2>/dev/null | sed 1q`
14074"
14075
Martin v. Löwis11437992002-04-12 09:54:03 +000014076_ACEOF
14077
Matthias Kloseb9621712010-04-24 17:59:49 +000014078case $ac_config_files in *"
14079"*) set x $ac_config_files; shift; ac_config_files=$*;;
14080esac
14081
14082case $ac_config_headers in *"
14083"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14084esac
14085
14086
14087cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014088# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000014089config_files="$ac_config_files"
14090config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014092_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014093
Matthias Kloseb9621712010-04-24 17:59:49 +000014094cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014095ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014096\`$as_me' instantiates files and other configuration actions
14097from templates according to the current configuration. Unless the files
14098and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014099
Matthias Kloseb9621712010-04-24 17:59:49 +000014100Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014101
14102 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014103 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014104 --config print configuration, then exit
14105 -q, --quiet, --silent
14106 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014107 -d, --debug don't remove temporary files
14108 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014109 --file=FILE[:TEMPLATE]
14110 instantiate the configuration file FILE
14111 --header=FILE[:TEMPLATE]
14112 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014113
14114Configuration files:
14115$config_files
14116
14117Configuration headers:
14118$config_headers
14119
Matthias Kloseb9621712010-04-24 17:59:49 +000014120Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014121
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014123cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14124ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014125ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014126python config.status 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014127configured by $0, generated by GNU Autoconf 2.65,
14128 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014129
Matthias Kloseb9621712010-04-24 17:59:49 +000014130Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014131This config.status script is free software; the Free Software Foundation
14132gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014133
14134ac_pwd='$ac_pwd'
14135srcdir='$srcdir'
14136INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014137test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014138_ACEOF
14139
Matthias Kloseb9621712010-04-24 17:59:49 +000014140cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14141# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014142ac_need_defaults=:
14143while test $# != 0
14144do
14145 case $1 in
14146 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014147 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14148 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014149 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014150 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014151 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014152 ac_option=$1
14153 ac_optarg=$2
14154 ac_shift=shift
14155 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014156 esac
14157
Skip Montanaro6dead952003-09-25 14:50:04 +000014158 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014159 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014160 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14161 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014162 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014163 $as_echo "$ac_cs_version"; exit ;;
14164 --config | --confi | --conf | --con | --co | --c )
14165 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014166 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014167 debug=: ;;
14168 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014169 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 case $ac_optarg in
14171 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14172 esac
14173 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014174 ac_need_defaults=false;;
14175 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014176 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014177 case $ac_optarg in
14178 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14179 esac
14180 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014181 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014182 --he | --h)
14183 # Conflict between --help and --header
Matthias Kloseb9621712010-04-24 17:59:49 +000014184 as_fn_error "ambiguous option: \`$1'
14185Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014186 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014188 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14189 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14190 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014191
14192 # This is an error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014193 -*) as_fn_error "unrecognized option: \`$1'
14194Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014195
Matthias Kloseb9621712010-04-24 17:59:49 +000014196 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014197 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014198
14199 esac
14200 shift
14201done
14202
Skip Montanaro6dead952003-09-25 14:50:04 +000014203ac_configure_extra_args=
14204
14205if $ac_cs_silent; then
14206 exec 6>/dev/null
14207 ac_configure_extra_args="$ac_configure_extra_args --silent"
14208fi
14209
14210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014211cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014212if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014213 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14214 shift
14215 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14216 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014217 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014218 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014219fi
14220
Martin v. Löwis11437992002-04-12 09:54:03 +000014221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014222cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014223exec 5>>config.log
14224{
14225 echo
14226 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14227## Running $as_me. ##
14228_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014229 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014230} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014233cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014234_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014235
Matthias Kloseb9621712010-04-24 17:59:49 +000014236cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014237
14238# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014239for ac_config_target in $ac_config_targets
14240do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241 case $ac_config_target in
14242 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14243 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14244 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014245 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14246 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014247 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14248 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014249 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014250
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014252 esac
14253done
14254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014255
Martin v. Löwis11437992002-04-12 09:54:03 +000014256# If the user did not use the arguments to specify the items to instantiate,
14257# then the envvar interface is used. Set only those that are not.
14258# We use the long form for the default assignment because of an extremely
14259# bizarre bug on SunOS 4.1.3.
14260if $ac_need_defaults; then
14261 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14262 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14263fi
14264
Skip Montanaro6dead952003-09-25 14:50:04 +000014265# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014266# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014267# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014268# Hook for its removal unless debugging.
14269# Note that there is a small window in which the directory will not be cleaned:
14270# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014271$debug ||
14272{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014273 tmp=
14274 trap 'exit_status=$?
14275 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14276' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014277 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014278}
Martin v. Löwis11437992002-04-12 09:54:03 +000014279# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014280
Martin v. Löwis11437992002-04-12 09:54:03 +000014281{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014282 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014283 test -n "$tmp" && test -d "$tmp"
14284} ||
14285{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014286 tmp=./conf$$-$RANDOM
14287 (umask 077 && mkdir "$tmp")
Matthias Kloseb9621712010-04-24 17:59:49 +000014288} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014289
Matthias Kloseb9621712010-04-24 17:59:49 +000014290# Set up the scripts for CONFIG_FILES section.
14291# No need to generate them if there are no CONFIG_FILES.
14292# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014293if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014294
Matthias Kloseb9621712010-04-24 17:59:49 +000014295
14296ac_cr=`echo X | tr X '\015'`
14297# On cygwin, bash can eat \r inside `` if the user requested igncr.
14298# But we know of no other shell where ac_cr would be empty at this
14299# point, so we can use a bashism as a fallback.
14300if test "x$ac_cr" = x; then
14301 eval ac_cr=\$\'\\r\'
14302fi
14303ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14304if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14305 ac_cs_awk_cr='\r'
14306else
14307 ac_cs_awk_cr=$ac_cr
14308fi
14309
14310echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014311_ACEOF
14312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014313
Matthias Kloseb9621712010-04-24 17:59:49 +000014314{
14315 echo "cat >conf$$subs.awk <<_ACEOF" &&
14316 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14317 echo "_ACEOF"
14318} >conf$$subs.sh ||
14319 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14320ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014321ac_delim='%!_!# '
14322for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 . ./conf$$subs.sh ||
14324 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014325
Matthias Kloseb9621712010-04-24 17:59:49 +000014326 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14327 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014328 break
14329 elif $ac_last_try; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014330 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014331 else
14332 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014333 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334done
Matthias Kloseb9621712010-04-24 17:59:49 +000014335rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014336
Matthias Kloseb9621712010-04-24 17:59:49 +000014337cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14338cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014340sed -n '
14341h
14342s/^/S["/; s/!.*/"]=/
14343p
14344g
14345s/^[^!]*!//
14346:repl
14347t repl
14348s/'"$ac_delim"'$//
14349t delim
14350:nl
14351h
14352s/\(.\{148\}\)..*/\1/
14353t more1
14354s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14355p
14356n
14357b repl
14358:more1
14359s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14360p
14361g
14362s/.\{148\}//
14363t nl
14364:delim
14365h
14366s/\(.\{148\}\)..*/\1/
14367t more2
14368s/["\\]/\\&/g; s/^/"/; s/$/"/
14369p
14370b
14371:more2
14372s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14373p
14374g
14375s/.\{148\}//
14376t delim
14377' <conf$$subs.awk | sed '
14378/^[^""]/{
14379 N
14380 s/\n//
14381}
14382' >>$CONFIG_STATUS || ac_write_fail=1
14383rm -f conf$$subs.awk
14384cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14385_ACAWK
14386cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14387 for (key in S) S_is_set[key] = 1
14388 FS = ""
14389
14390}
14391{
14392 line = $ 0
14393 nfields = split(line, field, "@")
14394 substed = 0
14395 len = length(field[1])
14396 for (i = 2; i < nfields; i++) {
14397 key = field[i]
14398 keylen = length(key)
14399 if (S_is_set[key]) {
14400 value = S[key]
14401 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14402 len += length(value) + length(field[++i])
14403 substed = 1
14404 } else
14405 len += 1 + keylen
14406 }
14407
14408 print line
14409}
14410
14411_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014413cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14414if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14415 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14416else
14417 cat
14418fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14419 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014420_ACEOF
14421
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014422# VPATH may cause trouble with some makes, so we remove $(srcdir),
14423# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14424# trailing colons and then remove the whole line if VPATH becomes empty
14425# (actually we leave an empty line to preserve line numbers).
14426if test "x$srcdir" = x.; then
14427 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14428s/:*\$(srcdir):*/:/
14429s/:*\${srcdir}:*/:/
14430s/:*@srcdir@:*/:/
14431s/^\([^=]*=[ ]*\):*/\1/
14432s/:*$//
14433s/^[^=]*=[ ]*$//
14434}'
14435fi
14436
Matthias Kloseb9621712010-04-24 17:59:49 +000014437cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014438fi # test -n "$CONFIG_FILES"
14439
Matthias Kloseb9621712010-04-24 17:59:49 +000014440# Set up the scripts for CONFIG_HEADERS section.
14441# No need to generate them if there are no CONFIG_HEADERS.
14442# This happens for instance with `./config.status Makefile'.
14443if test -n "$CONFIG_HEADERS"; then
14444cat >"$tmp/defines.awk" <<\_ACAWK ||
14445BEGIN {
14446_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014447
Matthias Kloseb9621712010-04-24 17:59:49 +000014448# Transform confdefs.h into an awk script `defines.awk', embedded as
14449# here-document in config.status, that substitutes the proper values into
14450# config.h.in to produce config.h.
14451
14452# Create a delimiter string that does not exist in confdefs.h, to ease
14453# handling of long lines.
14454ac_delim='%!_!# '
14455for ac_last_try in false false :; do
14456 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14457 if test -z "$ac_t"; then
14458 break
14459 elif $ac_last_try; then
14460 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14461 else
14462 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14463 fi
14464done
14465
14466# For the awk script, D is an array of macro values keyed by name,
14467# likewise P contains macro parameters if any. Preserve backslash
14468# newline sequences.
14469
14470ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14471sed -n '
14472s/.\{148\}/&'"$ac_delim"'/g
14473t rset
14474:rset
14475s/^[ ]*#[ ]*define[ ][ ]*/ /
14476t def
14477d
14478:def
14479s/\\$//
14480t bsnl
14481s/["\\]/\\&/g
14482s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14483D["\1"]=" \3"/p
14484s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14485d
14486:bsnl
14487s/["\\]/\\&/g
14488s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14489D["\1"]=" \3\\\\\\n"\\/p
14490t cont
14491s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14492t cont
14493d
14494:cont
14495n
14496s/.\{148\}/&'"$ac_delim"'/g
14497t clear
14498:clear
14499s/\\$//
14500t bsnlc
14501s/["\\]/\\&/g; s/^/"/; s/$/"/p
14502d
14503:bsnlc
14504s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14505b cont
14506' <confdefs.h | sed '
14507s/'"$ac_delim"'/"\\\
14508"/g' >>$CONFIG_STATUS || ac_write_fail=1
14509
14510cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14511 for (key in D) D_is_set[key] = 1
14512 FS = ""
14513}
14514/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14515 line = \$ 0
14516 split(line, arg, " ")
14517 if (arg[1] == "#") {
14518 defundef = arg[2]
14519 mac1 = arg[3]
14520 } else {
14521 defundef = substr(arg[1], 2)
14522 mac1 = arg[2]
14523 }
14524 split(mac1, mac2, "(") #)
14525 macro = mac2[1]
14526 prefix = substr(line, 1, index(line, defundef) - 1)
14527 if (D_is_set[macro]) {
14528 # Preserve the white space surrounding the "#".
14529 print prefix "define", macro P[macro] D[macro]
14530 next
14531 } else {
14532 # Replace #undef with comments. This is necessary, for example,
14533 # in the case of _POSIX_SOURCE, which is predefined and required
14534 # on some systems where configure will not decide to define it.
14535 if (defundef == "undef") {
14536 print "/*", prefix defundef, macro, "*/"
14537 next
14538 }
14539 }
14540}
14541{ print }
14542_ACAWK
14543_ACEOF
14544cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14545 as_fn_error "could not setup config headers machinery" "$LINENO" 5
14546fi # test -n "$CONFIG_HEADERS"
14547
14548
14549eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14550shift
14551for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014552do
14553 case $ac_tag in
14554 :[FHLC]) ac_mode=$ac_tag; continue;;
14555 esac
14556 case $ac_mode$ac_tag in
14557 :[FHL]*:*);;
Matthias Kloseb9621712010-04-24 17:59:49 +000014558 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559 :[FH]-) ac_tag=-:-;;
14560 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14561 esac
14562 ac_save_IFS=$IFS
14563 IFS=:
14564 set x $ac_tag
14565 IFS=$ac_save_IFS
14566 shift
14567 ac_file=$1
14568 shift
14569
14570 case $ac_mode in
14571 :L) ac_source=$1;;
14572 :[FH])
14573 ac_file_inputs=
14574 for ac_f
14575 do
14576 case $ac_f in
14577 -) ac_f="$tmp/stdin";;
14578 *) # Look for the file first in the build tree, then in the source tree
14579 # (if the path is not absolute). The absolute path cannot be DOS-style,
14580 # because $ac_f cannot contain `:'.
14581 test -f "$ac_f" ||
14582 case $ac_f in
14583 [\\/$]*) false;;
14584 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14585 esac ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014587 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014588 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14589 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590 done
14591
14592 # Let's still pretend it is `configure' which instantiates (i.e., don't
14593 # use $as_me), people would be surprised to read:
14594 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014595 configure_input='Generated from '`
14596 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14597 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014598 if test x"$ac_file" != x-; then
14599 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014600 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14601$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014602 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014603 # Neutralize special characters interpreted by sed in replacement strings.
14604 case $configure_input in #(
14605 *\&* | *\|* | *\\* )
14606 ac_sed_conf_input=`$as_echo "$configure_input" |
14607 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14608 *) ac_sed_conf_input=$configure_input;;
14609 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014610
14611 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014612 *:-:* | *:-) cat >"$tmp/stdin" \
14613 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014614 esac
14615 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014616 esac
14617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014618 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014619$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014620 X"$ac_file" : 'X\(//\)[^/]' \| \
14621 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014622 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014623$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014624 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14625 s//\1/
14626 q
14627 }
14628 /^X\(\/\/\)[^/].*/{
14629 s//\1/
14630 q
14631 }
14632 /^X\(\/\/\)$/{
14633 s//\1/
14634 q
14635 }
14636 /^X\(\/\).*/{
14637 s//\1/
14638 q
14639 }
14640 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014641 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014642 ac_builddir=.
14643
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014644case "$ac_dir" in
14645.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14646*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014647 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014648 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014649 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014650 case $ac_top_builddir_sub in
14651 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14652 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14653 esac ;;
14654esac
14655ac_abs_top_builddir=$ac_pwd
14656ac_abs_builddir=$ac_pwd$ac_dir_suffix
14657# for backward compatibility:
14658ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014659
14660case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014661 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014662 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014663 ac_top_srcdir=$ac_top_builddir_sub
14664 ac_abs_top_srcdir=$ac_pwd ;;
14665 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014666 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014667 ac_top_srcdir=$srcdir
14668 ac_abs_top_srcdir=$srcdir ;;
14669 *) # Relative name.
14670 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14671 ac_top_srcdir=$ac_top_build_prefix$srcdir
14672 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014673esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014674ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014675
Martin v. Löwis11437992002-04-12 09:54:03 +000014676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014677 case $ac_mode in
14678 :F)
14679 #
14680 # CONFIG_FILE
14681 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014682
14683 case $INSTALL in
14684 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014685 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014686 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014687_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014688
Matthias Kloseb9621712010-04-24 17:59:49 +000014689cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014690# If the template does not know about datarootdir, expand it.
14691# FIXME: This hack should be removed a few years after 2.60.
14692ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014693ac_sed_dataroot='
14694/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014695 p
14696 q
14697}
14698/@datadir@/p
14699/@docdir@/p
14700/@infodir@/p
14701/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014702/@mandir@/p'
14703case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014704*datarootdir*) ac_datarootdir_seen=yes;;
14705*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014706 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14707$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014709cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014710 ac_datarootdir_hack='
14711 s&@datadir@&$datadir&g
14712 s&@docdir@&$docdir&g
14713 s&@infodir@&$infodir&g
14714 s&@localedir@&$localedir&g
14715 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014716 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014717esac
14718_ACEOF
14719
14720# Neutralize VPATH when `$srcdir' = `.'.
14721# Shell code in configure.ac might set extrasub.
14722# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014723cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14724ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014725$extrasub
14726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014727cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014728:t
14729/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014730s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014731s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014732s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014733s&@srcdir@&$ac_srcdir&;t t
14734s&@abs_srcdir@&$ac_abs_srcdir&;t t
14735s&@top_srcdir@&$ac_top_srcdir&;t t
14736s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14737s&@builddir@&$ac_builddir&;t t
14738s&@abs_builddir@&$ac_abs_builddir&;t t
14739s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14740s&@INSTALL@&$ac_INSTALL&;t t
14741$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014742"
14743eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
14744 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014745
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014746test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14747 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14748 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014750which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014751$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014752which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014754 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014755 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014756 -) cat "$tmp/out" && rm -f "$tmp/out";;
14757 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14758 esac \
14759 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014760 ;;
14761 :H)
14762 #
14763 # CONFIG_HEADER
14764 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014765 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014766 {
14767 $as_echo "/* $configure_input */" \
14768 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14769 } >"$tmp/config.h" \
14770 || as_fn_error "could not create $ac_file" "$LINENO" 5
14771 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14772 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14773$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014774 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014775 rm -f "$ac_file"
14776 mv "$tmp/config.h" "$ac_file" \
14777 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014778 fi
14779 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014780 $as_echo "/* $configure_input */" \
14781 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
14782 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014783 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014784 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014785
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014786
14787 esac
14788
14789done # for ac_tag
14790
Guido van Rossum627b2d71993-12-24 10:39:16 +000014791
Matthias Kloseb9621712010-04-24 17:59:49 +000014792as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014793_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014794ac_clean_files=$ac_clean_files_save
14795
Matthias Kloseb9621712010-04-24 17:59:49 +000014796test $ac_write_fail = 0 ||
14797 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14798
Martin v. Löwis11437992002-04-12 09:54:03 +000014799
14800# configure is writing to config.log, and then calls config.status.
14801# config.status does its own redirection, appending to config.log.
14802# Unfortunately, on DOS this fails, as config.log is still kept open
14803# by configure, so config.status won't be able to write to it; its
14804# output is simply discarded. So we exec the FD to /dev/null,
14805# effectively closing config.log, so it can be properly (re)opened and
14806# appended to by config.status. When coming back to configure, we
14807# need to make the FD available again.
14808if test "$no_create" != yes; then
14809 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014810 ac_config_status_args=
14811 test "$silent" = yes &&
14812 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000014813 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000014814 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000014815 exec 5>>config.log
14816 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14817 # would make configure fail if this is the last instruction.
Matthias Kloseb9621712010-04-24 17:59:49 +000014818 $ac_cs_success || as_fn_exit $?
14819fi
14820if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14822$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014823fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014824
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014825
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014826echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014827if test ! -f Modules/Setup
14828then
14829 cp $srcdir/Modules/Setup.dist Modules/Setup
14830fi
14831
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014832echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014833if test ! -f Modules/Setup.local
14834then
14835 echo "# Edit this file for local setup changes" >Modules/Setup.local
14836fi
14837
14838echo "creating Makefile"
14839$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
14840 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000014841 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014842mv config.c Modules