blob: c2553fe622b832ca4dae2ee5fd8aa5c98bf02c6e [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Kloseaf30c5d2010-04-25 18:43:42 +00002# From configure.in Revision: 80474 .
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
667FRAMEWORKUNIXTOOLSPREFIX
668FRAMEWORKALTINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKINSTALLLAST
671FRAMEWORKINSTALLFIRST
672PYTHONFRAMEWORKINSTALLDIR
673PYTHONFRAMEWORKPREFIX
674PYTHONFRAMEWORKDIR
675PYTHONFRAMEWORKIDENTIFIER
676PYTHONFRAMEWORK
677LIPO_32BIT_FLAGS
678ARCH_RUN_32BIT
679UNIVERSALSDK
680CONFIG_ARGS
681SOVERSION
682VERSION
683target_alias
684host_alias
685build_alias
686LIBS
687ECHO_T
688ECHO_N
689ECHO_C
690DEFS
691mandir
692localedir
693libdir
694psdir
695pdfdir
696dvidir
697htmldir
698infodir
699docdir
700oldincludedir
701includedir
702localstatedir
703sharedstatedir
704sysconfdir
705datadir
706datarootdir
707libexecdir
708sbindir
709bindir
710program_transform_name
711prefix
712exec_prefix
713PACKAGE_URL
714PACKAGE_BUGREPORT
715PACKAGE_STRING
716PACKAGE_VERSION
717PACKAGE_TARNAME
718PACKAGE_NAME
719PATH_SEPARATOR
720SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000721ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000722ac_user_opts='
723enable_option_checking
724enable_universalsdk
725with_universal_archs
726with_framework_name
727enable_framework
728with_gcc
729with_cxx_main
730with_suffix
731enable_shared
732enable_profiling
733with_pydebug
734with_libs
735with_system_expat
736with_system_ffi
737with_dbmliborder
738with_signal_module
739with_dec_threads
740with_threads
741with_thread
742enable_ipv6
743with_doc_strings
744with_tsc
745with_pymalloc
746with_valgrind
747with_wctype_functions
748with_fpectl
749with_libm
750with_libc
751enable_big_digits
752with_wide_unicode
753with_computed_gotos
754'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000755 ac_precious_vars='build_alias
756host_alias
757target_alias
758CC
759CFLAGS
760LDFLAGS
761LIBS
762CPPFLAGS
763CPP'
764
Guido van Rossum627b2d71993-12-24 10:39:16 +0000765
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000767ac_init_help=
768ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000769ac_unrecognized_opts=
770ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000771# The variables have the same names as the options, with
772# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000773cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000774exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000775no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000776no_recursion=
777prefix=NONE
778program_prefix=NONE
779program_suffix=NONE
780program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000781silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000782site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000783srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000785x_includes=NONE
786x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000787
788# Installation directory options.
789# These are left unexpanded so users can "make install exec_prefix=/foo"
790# and all the variables that are supposed to be based on exec_prefix
791# by default will actually change.
792# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000793# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000794bindir='${exec_prefix}/bin'
795sbindir='${exec_prefix}/sbin'
796libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000797datarootdir='${prefix}/share'
798datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000799sysconfdir='${prefix}/etc'
800sharedstatedir='${prefix}/com'
801localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000802includedir='${prefix}/include'
803oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000804docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
805infodir='${datarootdir}/info'
806htmldir='${docdir}'
807dvidir='${docdir}'
808pdfdir='${docdir}'
809psdir='${docdir}'
810libdir='${exec_prefix}/lib'
811localedir='${datarootdir}/locale'
812mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000813
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000817do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818 # If the previous option needs an argument, assign it.
819 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000820 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821 ac_prev=
822 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000823 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000825 case $ac_option in
826 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
827 *) ac_optarg=yes ;;
828 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 # Accept the important Cygnus configure options, so we can diagnose typos.
831
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000832 case $ac_dashdash$ac_option in
833 --)
834 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000836 -bindir | --bindir | --bindi | --bind | --bin | --bi)
837 ac_prev=bindir ;;
838 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000839 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000840
841 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000842 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000843 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000844 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000846 -cache-file | --cache-file | --cache-fil | --cache-fi \
847 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
848 ac_prev=cache_file ;;
849 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
850 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 cache_file=$ac_optarg ;;
852
853 --config-cache | -C)
854 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000856 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000857 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000859 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000860
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
862 | --dataroo | --dataro | --datar)
863 ac_prev=datarootdir ;;
864 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
865 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
866 datarootdir=$ac_optarg ;;
867
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000869 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000871 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
872 as_fn_error "invalid feature name: $ac_useropt"
873 ac_useropt_orig=$ac_useropt
874 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
875 case $ac_user_opts in
876 *"
877"enable_$ac_useropt"
878"*) ;;
879 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
880 ac_unrecognized_sep=', ';;
881 esac
882 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883
884 -docdir | --docdir | --docdi | --doc | --do)
885 ac_prev=docdir ;;
886 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
887 docdir=$ac_optarg ;;
888
889 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
890 ac_prev=dvidir ;;
891 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
892 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
894 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000895 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000896 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000897 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
898 as_fn_error "invalid feature name: $ac_useropt"
899 ac_useropt_orig=$ac_useropt
900 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
901 case $ac_user_opts in
902 *"
903"enable_$ac_useropt"
904"*) ;;
905 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
906 ac_unrecognized_sep=', ';;
907 esac
908 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
911 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
912 | --exec | --exe | --ex)
913 ac_prev=exec_prefix ;;
914 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
915 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
916 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918
919 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000920 # Obsolete; use --with-gas.
921 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 -help | --help | --hel | --he | -h)
924 ac_init_help=long ;;
925 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
926 ac_init_help=recursive ;;
927 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
928 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
930 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
936 ac_prev=htmldir ;;
937 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
938 | --ht=*)
939 htmldir=$ac_optarg ;;
940
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 -includedir | --includedir | --includedi | --included | --include \
942 | --includ | --inclu | --incl | --inc)
943 ac_prev=includedir ;;
944 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
945 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947
948 -infodir | --infodir | --infodi | --infod | --info | --inf)
949 ac_prev=infodir ;;
950 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952
953 -libdir | --libdir | --libdi | --libd)
954 ac_prev=libdir ;;
955 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
958 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
959 | --libexe | --libex | --libe)
960 ac_prev=libexecdir ;;
961 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
962 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000963 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000965 -localedir | --localedir | --localedi | --localed | --locale)
966 ac_prev=localedir ;;
967 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
968 localedir=$ac_optarg ;;
969
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000971 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972 ac_prev=localstatedir ;;
973 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000974 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976
977 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
978 ac_prev=mandir ;;
979 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000983 # Obsolete; use --without-fp.
984 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985
986 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988 no_create=yes ;;
989
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000990 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
991 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
992 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
995 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
996 | --oldin | --oldi | --old | --ol | --o)
997 ac_prev=oldincludedir ;;
998 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
999 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1000 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001002
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1004 ac_prev=prefix ;;
1005 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
1008 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1009 | --program-pre | --program-pr | --program-p)
1010 ac_prev=program_prefix ;;
1011 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1012 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
1015 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1016 | --program-suf | --program-su | --program-s)
1017 ac_prev=program_suffix ;;
1018 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1019 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
1022 -program-transform-name | --program-transform-name \
1023 | --program-transform-nam | --program-transform-na \
1024 | --program-transform-n | --program-transform- \
1025 | --program-transform | --program-transfor \
1026 | --program-transfo | --program-transf \
1027 | --program-trans | --program-tran \
1028 | --progr-tra | --program-tr | --program-t)
1029 ac_prev=program_transform_name ;;
1030 -program-transform-name=* | --program-transform-name=* \
1031 | --program-transform-nam=* | --program-transform-na=* \
1032 | --program-transform-n=* | --program-transform-=* \
1033 | --program-transform=* | --program-transfor=* \
1034 | --program-transfo=* | --program-transf=* \
1035 | --program-trans=* | --program-tran=* \
1036 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001039 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1040 ac_prev=pdfdir ;;
1041 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1042 pdfdir=$ac_optarg ;;
1043
1044 -psdir | --psdir | --psdi | --psd | --ps)
1045 ac_prev=psdir ;;
1046 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1047 psdir=$ac_optarg ;;
1048
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1050 | -silent | --silent | --silen | --sile | --sil)
1051 silent=yes ;;
1052
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1054 ac_prev=sbindir ;;
1055 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1056 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
1059 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1060 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1061 | --sharedst | --shareds | --shared | --share | --shar \
1062 | --sha | --sh)
1063 ac_prev=sharedstatedir ;;
1064 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1065 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1066 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1067 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 -site | --site | --sit)
1071 ac_prev=site ;;
1072 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1076 ac_prev=srcdir ;;
1077 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1081 | --syscon | --sysco | --sysc | --sys | --sy)
1082 ac_prev=sysconfdir ;;
1083 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1084 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001086
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1093 verbose=yes ;;
1094
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 -version | --version | --versio | --versi | --vers | -V)
1096 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001099 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001100 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001101 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1102 as_fn_error "invalid package name: $ac_useropt"
1103 ac_useropt_orig=$ac_useropt
1104 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1105 case $ac_user_opts in
1106 *"
1107"with_$ac_useropt"
1108"*) ;;
1109 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1110 ac_unrecognized_sep=', ';;
1111 esac
1112 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001115 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001116 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001117 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1118 as_fn_error "invalid package name: $ac_useropt"
1119 ac_useropt_orig=$ac_useropt
1120 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1121 case $ac_user_opts in
1122 *"
1123"with_$ac_useropt"
1124"*) ;;
1125 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1126 ac_unrecognized_sep=', ';;
1127 esac
1128 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001130 --x)
1131 # Obsolete; use --with-x.
1132 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133
1134 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1135 | --x-incl | --x-inc | --x-in | --x-i)
1136 ac_prev=x_includes ;;
1137 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1138 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140
1141 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1142 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1143 ac_prev=x_libraries ;;
1144 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1145 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
Matthias Kloseb9621712010-04-24 17:59:49 +00001148 -*) as_fn_error "unrecognized option: \`$ac_option'
1149Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150 ;;
1151
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 *=*)
1153 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1154 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001155 case $ac_envvar in #(
1156 '' | [0-9]* | *[!_$as_cr_alnum]* )
1157 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1158 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001159 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 export $ac_envvar ;;
1161
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001164 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001166 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168 ;;
1169
1170 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001171done
1172
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176fi
1177
Matthias Kloseb9621712010-04-24 17:59:49 +00001178if test -n "$ac_unrecognized_opts"; then
1179 case $enable_option_checking in
1180 no) ;;
1181 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1182 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1183 esac
1184fi
1185
1186# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001187for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1188 datadir sysconfdir sharedstatedir localstatedir includedir \
1189 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1190 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001192 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 # Remove trailing slashes.
1194 case $ac_val in
1195 */ )
1196 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1197 eval $ac_var=\$ac_val;;
1198 esac
1199 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001201 [\\/$]* | ?:[\\/]* ) continue;;
1202 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001205done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001206
Martin v. Löwis11437992002-04-12 09:54:03 +00001207# There might be people who depend on the old broken behavior: `$host'
1208# used to hold the argument of --host etc.
1209# FIXME: To remove some day.
1210build=$build_alias
1211host=$host_alias
1212target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213
Martin v. Löwis11437992002-04-12 09:54:03 +00001214# FIXME: To remove some day.
1215if test "x$host_alias" != x; then
1216 if test "x$build_alias" = x; then
1217 cross_compiling=maybe
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 $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 +00001219 If a cross compiler is detected then cross compile mode will be used." >&2
1220 elif test "x$build_alias" != "x$host_alias"; then
1221 cross_compiling=yes
1222 fi
1223fi
1224
1225ac_tool_prefix=
1226test -n "$host_alias" && ac_tool_prefix=$host_alias-
1227
1228test "$silent" = yes && exec 6>/dev/null
1229
Guido van Rossum627b2d71993-12-24 10:39:16 +00001230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001231ac_pwd=`pwd` && test -n "$ac_pwd" &&
1232ac_ls_di=`ls -di .` &&
1233ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Matthias Kloseb9621712010-04-24 17:59:49 +00001234 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001235test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Matthias Kloseb9621712010-04-24 17:59:49 +00001236 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001237
1238
Guido van Rossum627b2d71993-12-24 10:39:16 +00001239# Find the source files, if location was not specified.
1240if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001242 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001243 ac_confdir=`$as_dirname -- "$as_myself" ||
1244$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1245 X"$as_myself" : 'X\(//\)[^/]' \| \
1246 X"$as_myself" : 'X\(//\)$' \| \
1247 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1248$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001249 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1250 s//\1/
1251 q
1252 }
1253 /^X\(\/\/\)[^/].*/{
1254 s//\1/
1255 q
1256 }
1257 /^X\(\/\/\)$/{
1258 s//\1/
1259 q
1260 }
1261 /^X\(\/\).*/{
1262 s//\1/
1263 q
1264 }
1265 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001268 srcdir=..
1269 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001270else
1271 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001273if test ! -r "$srcdir/$ac_unique_file"; then
1274 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Matthias Kloseb9621712010-04-24 17:59:49 +00001275 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1278ac_abs_confdir=`(
Matthias Kloseb9621712010-04-24 17:59:49 +00001279 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001280 pwd)`
1281# When building in place, set srcdir=.
1282if test "$ac_abs_confdir" = "$ac_pwd"; then
1283 srcdir=.
1284fi
1285# Remove unnecessary trailing slashes from srcdir.
1286# Double slashes in file names in object file debugging info
1287# mess up M-x gdb in Emacs.
1288case $srcdir in
1289*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1290esac
1291for ac_var in $ac_precious_vars; do
1292 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1293 eval ac_env_${ac_var}_value=\$${ac_var}
1294 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1295 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1296done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001297
Martin v. Löwis11437992002-04-12 09:54:03 +00001298#
1299# Report the --help message.
1300#
1301if test "$ac_init_help" = "long"; then
1302 # Omit some internal or obsolete options to make the list less imposing.
1303 # This message is too long to be a string in the A/UX 3.1 sh.
1304 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001305\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001306
1307Usage: $0 [OPTION]... [VAR=VALUE]...
1308
1309To assign environment variables (e.g., CC, CFLAGS...), specify them as
1310VAR=VALUE. See below for descriptions of some of the useful variables.
1311
1312Defaults for the options are specified in brackets.
1313
1314Configuration:
1315 -h, --help display this help and exit
1316 --help=short display options specific to this package
1317 --help=recursive display the short help of all the included packages
1318 -V, --version display version information and exit
1319 -q, --quiet, --silent do not print \`checking...' messages
1320 --cache-file=FILE cache test results in FILE [disabled]
1321 -C, --config-cache alias for \`--cache-file=config.cache'
1322 -n, --no-create do not create output files
1323 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1324
Martin v. Löwis11437992002-04-12 09:54:03 +00001325Installation directories:
1326 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001327 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001328 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001329 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001330
1331By default, \`make install' will install all the files in
1332\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1333an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1334for instance \`--prefix=\$HOME'.
1335
1336For better control, use the options below.
1337
1338Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001339 --bindir=DIR user executables [EPREFIX/bin]
1340 --sbindir=DIR system admin executables [EPREFIX/sbin]
1341 --libexecdir=DIR program executables [EPREFIX/libexec]
1342 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1343 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1344 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1345 --libdir=DIR object code libraries [EPREFIX/lib]
1346 --includedir=DIR C header files [PREFIX/include]
1347 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1348 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1349 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1350 --infodir=DIR info documentation [DATAROOTDIR/info]
1351 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1352 --mandir=DIR man documentation [DATAROOTDIR/man]
1353 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1354 --htmldir=DIR html documentation [DOCDIR]
1355 --dvidir=DIR dvi documentation [DOCDIR]
1356 --pdfdir=DIR pdf documentation [DOCDIR]
1357 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001358_ACEOF
1359
1360 cat <<\_ACEOF
1361_ACEOF
1362fi
1363
1364if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001365 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001366 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001367 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001368 cat <<\_ACEOF
1369
1370Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001371 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001372 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1373 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001374 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001375 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001376 --enable-framework[=INSTALLDIR]
1377 Build (MacOSX|Darwin) framework
1378 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001379 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001380 --enable-ipv6 Enable ipv6 (with ipv4) support
1381 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001382 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001383 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001384
1385Optional Packages:
1386 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1387 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001388 --with-universal-archs=ARCH
1389 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001390 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001391 --with-framework-name=FRAMEWORK
1392 specify an alternate name of the framework built
1393 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001394 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001395 --with-cxx-main=<compiler>
1396 compile main() and link python executable with C++
1397 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001398 --with-suffix=.exe set executable suffix
1399 --with-pydebug build with Py_DEBUG defined
1400 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001401 --with-system-expat build pyexpat module using an installed expat
1402 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001403 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001404 --with-dbmliborder=db1:db2:...
1405 order to check db backends for dbm. Valid value is a
1406 colon separated string with the backend names
1407 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001408 --with-signal-module disable/enable signal module
1409 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1410 --with(out)-threads[=DIRECTORY]
1411 disable/enable thread support
1412 --with(out)-thread[=DIRECTORY]
1413 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001414 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001415 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001416 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001417 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with-fpectl enable SIGFPE catching
1420 --with-libm=STRING math library
1421 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001422 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001423 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1424 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
1426Some influential environment variables:
1427 CC C compiler command
1428 CFLAGS C compiler flags
1429 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1430 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001431 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001432 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001433 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 CPP C preprocessor
1435
1436Use these variables to override the choices made by `configure' or to help
1437it to find libraries and programs with nonstandard names/locations.
1438
Georg Brandle2e15612009-05-20 18:25:10 +00001439Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001440_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001441ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001442fi
1443
1444if test "$ac_init_help" = "recursive"; then
1445 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001446 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001447 test -d "$ac_dir" ||
1448 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1449 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001450 ac_builddir=.
1451
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001452case "$ac_dir" in
1453.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1454*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001455 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001456 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001457 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001458 case $ac_top_builddir_sub in
1459 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1460 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1461 esac ;;
1462esac
1463ac_abs_top_builddir=$ac_pwd
1464ac_abs_builddir=$ac_pwd$ac_dir_suffix
1465# for backward compatibility:
1466ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001467
1468case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001469 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001471 ac_top_srcdir=$ac_top_builddir_sub
1472 ac_abs_top_srcdir=$ac_pwd ;;
1473 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001475 ac_top_srcdir=$srcdir
1476 ac_abs_top_srcdir=$srcdir ;;
1477 *) # Relative name.
1478 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1479 ac_top_srcdir=$ac_top_build_prefix$srcdir
1480 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001481esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001482ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001484 cd "$ac_dir" || { ac_status=$?; continue; }
1485 # Check for guested configure.
1486 if test -f "$ac_srcdir/configure.gnu"; then
1487 echo &&
1488 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1489 elif test -f "$ac_srcdir/configure"; then
1490 echo &&
1491 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001493 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494 fi || ac_status=$?
1495 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001496 done
1497fi
1498
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001500if $ac_init_version; then
1501 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001502python configure 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +00001503generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001504
Matthias Kloseb9621712010-04-24 17:59:49 +00001505Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001506This configure script is free software; the Free Software Foundation
1507gives unlimited permission to copy, distribute and modify it.
1508_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001509 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001511
1512## ------------------------ ##
1513## Autoconf initialization. ##
1514## ------------------------ ##
1515
1516# ac_fn_c_try_compile LINENO
1517# --------------------------
1518# Try to compile conftest.$ac_ext, and return whether this succeeded.
1519ac_fn_c_try_compile ()
1520{
1521 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1522 rm -f conftest.$ac_objext
1523 if { { ac_try="$ac_compile"
1524case "(($ac_try" in
1525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1526 *) ac_try_echo=$ac_try;;
1527esac
1528eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1529$as_echo "$ac_try_echo"; } >&5
1530 (eval "$ac_compile") 2>conftest.err
1531 ac_status=$?
1532 if test -s conftest.err; then
1533 grep -v '^ *+' conftest.err >conftest.er1
1534 cat conftest.er1 >&5
1535 mv -f conftest.er1 conftest.err
1536 fi
1537 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1538 test $ac_status = 0; } && {
1539 test -z "$ac_c_werror_flag" ||
1540 test ! -s conftest.err
1541 } && test -s conftest.$ac_objext; then :
1542 ac_retval=0
1543else
1544 $as_echo "$as_me: failed program was:" >&5
1545sed 's/^/| /' conftest.$ac_ext >&5
1546
1547 ac_retval=1
1548fi
1549 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1550 as_fn_set_status $ac_retval
1551
1552} # ac_fn_c_try_compile
1553
1554# ac_fn_c_try_cpp LINENO
1555# ----------------------
1556# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1557ac_fn_c_try_cpp ()
1558{
1559 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1560 if { { ac_try="$ac_cpp conftest.$ac_ext"
1561case "(($ac_try" in
1562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1563 *) ac_try_echo=$ac_try;;
1564esac
1565eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1566$as_echo "$ac_try_echo"; } >&5
1567 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1568 ac_status=$?
1569 if test -s conftest.err; then
1570 grep -v '^ *+' conftest.err >conftest.er1
1571 cat conftest.er1 >&5
1572 mv -f conftest.er1 conftest.err
1573 fi
1574 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1575 test $ac_status = 0; } >/dev/null && {
1576 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1577 test ! -s conftest.err
1578 }; then :
1579 ac_retval=0
1580else
1581 $as_echo "$as_me: failed program was:" >&5
1582sed 's/^/| /' conftest.$ac_ext >&5
1583
1584 ac_retval=1
1585fi
1586 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1587 as_fn_set_status $ac_retval
1588
1589} # ac_fn_c_try_cpp
1590
1591# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1592# -------------------------------------------------------
1593# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1594# the include files in INCLUDES and setting the cache variable VAR
1595# accordingly.
1596ac_fn_c_check_header_mongrel ()
1597{
1598 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1599 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1601$as_echo_n "checking for $2... " >&6; }
1602if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1603 $as_echo_n "(cached) " >&6
1604fi
1605eval ac_res=\$$3
1606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1607$as_echo "$ac_res" >&6; }
1608else
1609 # Is the header compilable?
1610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1611$as_echo_n "checking $2 usability... " >&6; }
1612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1613/* end confdefs.h. */
1614$4
1615#include <$2>
1616_ACEOF
1617if ac_fn_c_try_compile "$LINENO"; then :
1618 ac_header_compiler=yes
1619else
1620 ac_header_compiler=no
1621fi
1622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1624$as_echo "$ac_header_compiler" >&6; }
1625
1626# Is the header present?
1627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1628$as_echo_n "checking $2 presence... " >&6; }
1629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1630/* end confdefs.h. */
1631#include <$2>
1632_ACEOF
1633if ac_fn_c_try_cpp "$LINENO"; then :
1634 ac_header_preproc=yes
1635else
1636 ac_header_preproc=no
1637fi
1638rm -f conftest.err conftest.$ac_ext
1639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1640$as_echo "$ac_header_preproc" >&6; }
1641
1642# So? What about this header?
1643case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1644 yes:no: )
1645 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1646$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1647 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1648$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1649 ;;
1650 no:yes:* )
1651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1652$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1654$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1656$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1657 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1658$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1659 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1660$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1661( cat <<\_ASBOX
1662## -------------------------------------- ##
1663## Report this to http://bugs.python.org/ ##
1664## -------------------------------------- ##
1665_ASBOX
1666 ) | sed "s/^/$as_me: WARNING: /" >&2
1667 ;;
1668esac
1669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1670$as_echo_n "checking for $2... " >&6; }
1671if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1672 $as_echo_n "(cached) " >&6
1673else
1674 eval "$3=\$ac_header_compiler"
1675fi
1676eval ac_res=\$$3
1677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1678$as_echo "$ac_res" >&6; }
1679fi
1680 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1681
1682} # ac_fn_c_check_header_mongrel
1683
1684# ac_fn_c_try_run LINENO
1685# ----------------------
1686# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1687# that executables *can* be run.
1688ac_fn_c_try_run ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691 if { { ac_try="$ac_link"
1692case "(($ac_try" in
1693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694 *) ac_try_echo=$ac_try;;
1695esac
1696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697$as_echo "$ac_try_echo"; } >&5
1698 (eval "$ac_link") 2>&5
1699 ac_status=$?
1700 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1701 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1702 { { case "(($ac_try" in
1703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1704 *) ac_try_echo=$ac_try;;
1705esac
1706eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1707$as_echo "$ac_try_echo"; } >&5
1708 (eval "$ac_try") 2>&5
1709 ac_status=$?
1710 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1711 test $ac_status = 0; }; }; then :
1712 ac_retval=0
1713else
1714 $as_echo "$as_me: program exited with status $ac_status" >&5
1715 $as_echo "$as_me: failed program was:" >&5
1716sed 's/^/| /' conftest.$ac_ext >&5
1717
1718 ac_retval=$ac_status
1719fi
1720 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1721 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1722 as_fn_set_status $ac_retval
1723
1724} # ac_fn_c_try_run
1725
1726# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1727# -------------------------------------------------------
1728# Tests whether HEADER exists and can be compiled using the include files in
1729# INCLUDES, setting the cache variable VAR accordingly.
1730ac_fn_c_check_header_compile ()
1731{
1732 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1734$as_echo_n "checking for $2... " >&6; }
1735if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1736 $as_echo_n "(cached) " >&6
1737else
1738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1739/* end confdefs.h. */
1740$4
1741#include <$2>
1742_ACEOF
1743if ac_fn_c_try_compile "$LINENO"; then :
1744 eval "$3=yes"
1745else
1746 eval "$3=no"
1747fi
1748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1749fi
1750eval ac_res=\$$3
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1752$as_echo "$ac_res" >&6; }
1753 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1754
1755} # ac_fn_c_check_header_compile
1756
1757# ac_fn_c_try_link LINENO
1758# -----------------------
1759# Try to link conftest.$ac_ext, and return whether this succeeded.
1760ac_fn_c_try_link ()
1761{
1762 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1763 rm -f conftest.$ac_objext conftest$ac_exeext
1764 if { { ac_try="$ac_link"
1765case "(($ac_try" in
1766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1767 *) ac_try_echo=$ac_try;;
1768esac
1769eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1770$as_echo "$ac_try_echo"; } >&5
1771 (eval "$ac_link") 2>conftest.err
1772 ac_status=$?
1773 if test -s conftest.err; then
1774 grep -v '^ *+' conftest.err >conftest.er1
1775 cat conftest.er1 >&5
1776 mv -f conftest.er1 conftest.err
1777 fi
1778 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1779 test $ac_status = 0; } && {
1780 test -z "$ac_c_werror_flag" ||
1781 test ! -s conftest.err
1782 } && test -s conftest$ac_exeext && {
1783 test "$cross_compiling" = yes ||
1784 $as_test_x conftest$ac_exeext
1785 }; then :
1786 ac_retval=0
1787else
1788 $as_echo "$as_me: failed program was:" >&5
1789sed 's/^/| /' conftest.$ac_ext >&5
1790
1791 ac_retval=1
1792fi
1793 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1794 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1795 # interfere with the next link command; also delete a directory that is
1796 # left behind by Apple's compiler. We do this before executing the actions.
1797 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1798 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1799 as_fn_set_status $ac_retval
1800
1801} # ac_fn_c_try_link
1802
1803# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1804# -------------------------------------------
1805# Tests whether TYPE exists after having included INCLUDES, setting cache
1806# variable VAR accordingly.
1807ac_fn_c_check_type ()
1808{
1809 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1811$as_echo_n "checking for $2... " >&6; }
1812if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1813 $as_echo_n "(cached) " >&6
1814else
1815 eval "$3=no"
1816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1817/* end confdefs.h. */
1818$4
1819int
1820main ()
1821{
1822if (sizeof ($2))
1823 return 0;
1824 ;
1825 return 0;
1826}
1827_ACEOF
1828if ac_fn_c_try_compile "$LINENO"; then :
1829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1830/* end confdefs.h. */
1831$4
1832int
1833main ()
1834{
1835if (sizeof (($2)))
1836 return 0;
1837 ;
1838 return 0;
1839}
1840_ACEOF
1841if ac_fn_c_try_compile "$LINENO"; then :
1842
1843else
1844 eval "$3=yes"
1845fi
1846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1847fi
1848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1849fi
1850eval ac_res=\$$3
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1852$as_echo "$ac_res" >&6; }
1853 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1854
1855} # ac_fn_c_check_type
1856
1857# ac_fn_c_find_uintX_t LINENO BITS VAR
1858# ------------------------------------
1859# Finds an unsigned integer type with width BITS, setting cache variable VAR
1860# accordingly.
1861ac_fn_c_find_uintX_t ()
1862{
1863 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1865$as_echo_n "checking for uint$2_t... " >&6; }
1866if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1867 $as_echo_n "(cached) " >&6
1868else
1869 eval "$3=no"
1870 # Order is important - never check a type that is potentially smaller
1871 # than half of the expected target width.
1872 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1873 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1875/* end confdefs.h. */
1876$ac_includes_default
1877int
1878main ()
1879{
1880static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1881test_array [0] = 0
1882
1883 ;
1884 return 0;
1885}
1886_ACEOF
1887if ac_fn_c_try_compile "$LINENO"; then :
1888 case $ac_type in #(
1889 uint$2_t) :
1890 eval "$3=yes" ;; #(
1891 *) :
1892 eval "$3=\$ac_type" ;;
1893esac
1894fi
1895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1896 eval as_val=\$$3
1897 if test "x$as_val" = x""no; then :
1898
1899else
1900 break
1901fi
1902 done
1903fi
1904eval ac_res=\$$3
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1906$as_echo "$ac_res" >&6; }
1907 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1908
1909} # ac_fn_c_find_uintX_t
1910
1911# ac_fn_c_find_intX_t LINENO BITS VAR
1912# -----------------------------------
1913# Finds a signed integer type with width BITS, setting cache variable VAR
1914# accordingly.
1915ac_fn_c_find_intX_t ()
1916{
1917 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1919$as_echo_n "checking for int$2_t... " >&6; }
1920if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1921 $as_echo_n "(cached) " >&6
1922else
1923 eval "$3=no"
1924 # Order is important - never check a type that is potentially smaller
1925 # than half of the expected target width.
1926 for ac_type in int$2_t 'int' 'long int' \
1927 'long long int' 'short int' 'signed char'; do
1928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1929/* end confdefs.h. */
1930$ac_includes_default
1931 enum { N = $2 / 2 - 1 };
1932int
1933main ()
1934{
1935static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
1936test_array [0] = 0
1937
1938 ;
1939 return 0;
1940}
1941_ACEOF
1942if ac_fn_c_try_compile "$LINENO"; then :
1943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944/* end confdefs.h. */
1945$ac_includes_default
1946 enum { N = $2 / 2 - 1 };
1947int
1948main ()
1949{
1950static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
1951 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1952test_array [0] = 0
1953
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959
1960else
1961 case $ac_type in #(
1962 int$2_t) :
1963 eval "$3=yes" ;; #(
1964 *) :
1965 eval "$3=\$ac_type" ;;
1966esac
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969fi
1970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1971 eval as_val=\$$3
1972 if test "x$as_val" = x""no; then :
1973
1974else
1975 break
1976fi
1977 done
1978fi
1979eval ac_res=\$$3
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1981$as_echo "$ac_res" >&6; }
1982 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1983
1984} # ac_fn_c_find_intX_t
1985
1986# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1987# --------------------------------------------
1988# Tries to find the compile-time value of EXPR in a program that includes
1989# INCLUDES, setting VAR accordingly. Returns whether the value could be
1990# computed
1991ac_fn_c_compute_int ()
1992{
1993 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994 if test "$cross_compiling" = yes; then
1995 # Depending upon the size, compute the lo and hi bounds.
1996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1997/* end confdefs.h. */
1998$4
1999int
2000main ()
2001{
2002static int test_array [1 - 2 * !(($2) >= 0)];
2003test_array [0] = 0
2004
2005 ;
2006 return 0;
2007}
2008_ACEOF
2009if ac_fn_c_try_compile "$LINENO"; then :
2010 ac_lo=0 ac_mid=0
2011 while :; do
2012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$4
2015int
2016main ()
2017{
2018static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2019test_array [0] = 0
2020
2021 ;
2022 return 0;
2023}
2024_ACEOF
2025if ac_fn_c_try_compile "$LINENO"; then :
2026 ac_hi=$ac_mid; break
2027else
2028 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2029 if test $ac_lo -le $ac_mid; then
2030 ac_lo= ac_hi=
2031 break
2032 fi
2033 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2034fi
2035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2036 done
2037else
2038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2039/* end confdefs.h. */
2040$4
2041int
2042main ()
2043{
2044static int test_array [1 - 2 * !(($2) < 0)];
2045test_array [0] = 0
2046
2047 ;
2048 return 0;
2049}
2050_ACEOF
2051if ac_fn_c_try_compile "$LINENO"; then :
2052 ac_hi=-1 ac_mid=-1
2053 while :; do
2054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2061test_array [0] = 0
2062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_lo=$ac_mid; break
2069else
2070 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2071 if test $ac_mid -le $ac_hi; then
2072 ac_lo= ac_hi=
2073 break
2074 fi
2075 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078 done
2079else
2080 ac_lo= ac_hi=
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085# Binary search between lo and hi bounds.
2086while test "x$ac_lo" != "x$ac_hi"; do
2087 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
2092main ()
2093{
2094static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2095test_array [0] = 0
2096
2097 ;
2098 return 0;
2099}
2100_ACEOF
2101if ac_fn_c_try_compile "$LINENO"; then :
2102 ac_hi=$ac_mid
2103else
2104 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2105fi
2106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2107done
2108case $ac_lo in #((
2109?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2110'') ac_retval=1 ;;
2111esac
2112 else
2113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2114/* end confdefs.h. */
2115$4
2116static long int longval () { return $2; }
2117static unsigned long int ulongval () { return $2; }
2118#include <stdio.h>
2119#include <stdlib.h>
2120int
2121main ()
2122{
2123
2124 FILE *f = fopen ("conftest.val", "w");
2125 if (! f)
2126 return 1;
2127 if (($2) < 0)
2128 {
2129 long int i = longval ();
2130 if (i != ($2))
2131 return 1;
2132 fprintf (f, "%ld", i);
2133 }
2134 else
2135 {
2136 unsigned long int i = ulongval ();
2137 if (i != ($2))
2138 return 1;
2139 fprintf (f, "%lu", i);
2140 }
2141 /* Do not output a trailing newline, as this causes \r\n confusion
2142 on some platforms. */
2143 return ferror (f) || fclose (f) != 0;
2144
2145 ;
2146 return 0;
2147}
2148_ACEOF
2149if ac_fn_c_try_run "$LINENO"; then :
2150 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2151else
2152 ac_retval=1
2153fi
2154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2155 conftest.$ac_objext conftest.beam conftest.$ac_ext
2156rm -f conftest.val
2157
2158 fi
2159 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2160 as_fn_set_status $ac_retval
2161
2162} # ac_fn_c_compute_int
2163
2164# ac_fn_c_check_func LINENO FUNC VAR
2165# ----------------------------------
2166# Tests whether FUNC exists, setting the cache variable VAR accordingly
2167ac_fn_c_check_func ()
2168{
2169 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2171$as_echo_n "checking for $2... " >&6; }
2172if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2173 $as_echo_n "(cached) " >&6
2174else
2175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2176/* end confdefs.h. */
2177/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2178 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2179#define $2 innocuous_$2
2180
2181/* System header to define __stub macros and hopefully few prototypes,
2182 which can conflict with char $2 (); below.
2183 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2184 <limits.h> exists even on freestanding compilers. */
2185
2186#ifdef __STDC__
2187# include <limits.h>
2188#else
2189# include <assert.h>
2190#endif
2191
2192#undef $2
2193
2194/* Override any GCC internal prototype to avoid an error.
2195 Use char because int might match the return type of a GCC
2196 builtin and then its argument prototype would still apply. */
2197#ifdef __cplusplus
2198extern "C"
2199#endif
2200char $2 ();
2201/* The GNU C library defines this for functions which it implements
2202 to always fail with ENOSYS. Some functions are actually named
2203 something starting with __ and the normal name is an alias. */
2204#if defined __stub_$2 || defined __stub___$2
2205choke me
2206#endif
2207
2208int
2209main ()
2210{
2211return $2 ();
2212 ;
2213 return 0;
2214}
2215_ACEOF
2216if ac_fn_c_try_link "$LINENO"; then :
2217 eval "$3=yes"
2218else
2219 eval "$3=no"
2220fi
2221rm -f core conftest.err conftest.$ac_objext \
2222 conftest$ac_exeext conftest.$ac_ext
2223fi
2224eval ac_res=\$$3
2225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2226$as_echo "$ac_res" >&6; }
2227 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2228
2229} # ac_fn_c_check_func
2230
2231# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2232# ----------------------------------------------------
2233# Tries to find if the field MEMBER exists in type AGGR, after including
2234# INCLUDES, setting cache variable VAR accordingly.
2235ac_fn_c_check_member ()
2236{
2237 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2239$as_echo_n "checking for $2.$3... " >&6; }
2240if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2241 $as_echo_n "(cached) " >&6
2242else
2243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2244/* end confdefs.h. */
2245$5
2246int
2247main ()
2248{
2249static $2 ac_aggr;
2250if (ac_aggr.$3)
2251return 0;
2252 ;
2253 return 0;
2254}
2255_ACEOF
2256if ac_fn_c_try_compile "$LINENO"; then :
2257 eval "$4=yes"
2258else
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260/* end confdefs.h. */
2261$5
2262int
2263main ()
2264{
2265static $2 ac_aggr;
2266if (sizeof ac_aggr.$3)
2267return 0;
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272if ac_fn_c_try_compile "$LINENO"; then :
2273 eval "$4=yes"
2274else
2275 eval "$4=no"
2276fi
2277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2278fi
2279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2280fi
2281eval ac_res=\$$4
2282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2283$as_echo "$ac_res" >&6; }
2284 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2285
2286} # ac_fn_c_check_member
2287
2288# ac_fn_c_check_decl LINENO SYMBOL VAR
2289# ------------------------------------
2290# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2291ac_fn_c_check_decl ()
2292{
2293 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2295$as_echo_n "checking whether $2 is declared... " >&6; }
2296if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2297 $as_echo_n "(cached) " >&6
2298else
2299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2300/* end confdefs.h. */
2301$4
2302int
2303main ()
2304{
2305#ifndef $2
2306 (void) $2;
2307#endif
2308
2309 ;
2310 return 0;
2311}
2312_ACEOF
2313if ac_fn_c_try_compile "$LINENO"; then :
2314 eval "$3=yes"
2315else
2316 eval "$3=no"
2317fi
2318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2319fi
2320eval ac_res=\$$3
2321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2322$as_echo "$ac_res" >&6; }
2323 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2324
2325} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002326cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002327This file contains any messages produced by compilers while
2328running configure, to aid debugging if configure makes a mistake.
2329
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002330It was created by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +00002331generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002332
2333 $ $0 $@
2334
2335_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002336exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002337{
2338cat <<_ASUNAME
2339## --------- ##
2340## Platform. ##
2341## --------- ##
2342
2343hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2344uname -m = `(uname -m) 2>/dev/null || echo unknown`
2345uname -r = `(uname -r) 2>/dev/null || echo unknown`
2346uname -s = `(uname -s) 2>/dev/null || echo unknown`
2347uname -v = `(uname -v) 2>/dev/null || echo unknown`
2348
2349/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2350/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2351
2352/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2353/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2354/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002355/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002356/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2357/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2358/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2359
2360_ASUNAME
2361
2362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2363for as_dir in $PATH
2364do
2365 IFS=$as_save_IFS
2366 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002367 $as_echo "PATH: $as_dir"
2368 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002370
2371} >&5
2372
2373cat >&5 <<_ACEOF
2374
2375
2376## ----------- ##
2377## Core tests. ##
2378## ----------- ##
2379
2380_ACEOF
2381
2382
2383# Keep a trace of the command line.
2384# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002385# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002386# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002387# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002388ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002389ac_configure_args0=
2390ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002391ac_must_keep_next=false
2392for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002393do
Skip Montanaro6dead952003-09-25 14:50:04 +00002394 for ac_arg
2395 do
2396 case $ac_arg in
2397 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2398 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2399 | -silent | --silent | --silen | --sile | --sil)
2400 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002401 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002402 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002403 esac
2404 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002405 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002407 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002409 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002410 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002411 case $ac_arg in
2412 *=* | --config-cache | -C | -disable-* | --disable-* \
2413 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2414 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2415 | -with-* | --with-* | -without-* | --without-* | --x)
2416 case "$ac_configure_args0 " in
2417 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2418 esac
2419 ;;
2420 -* ) ac_must_keep_next=true ;;
2421 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002423 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 ;;
2425 esac
2426 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002427done
Matthias Kloseb9621712010-04-24 17:59:49 +00002428{ ac_configure_args0=; unset ac_configure_args0;}
2429{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002430
2431# When interrupted or exit'd, cleanup temporary files, and complete
2432# config.log. We remove comments because anyway the quotes in there
2433# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002434# WARNING: Use '\'' to represent an apostrophe within the trap.
2435# 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 +00002436trap 'exit_status=$?
2437 # Save into config.log some information that might help in debugging.
2438 {
2439 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002440
Martin v. Löwis11437992002-04-12 09:54:03 +00002441 cat <<\_ASBOX
2442## ---------------- ##
2443## Cache variables. ##
2444## ---------------- ##
2445_ASBOX
2446 echo
2447 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448(
2449 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2450 eval ac_val=\$$ac_var
2451 case $ac_val in #(
2452 *${as_nl}*)
2453 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002454 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2455$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456 esac
2457 case $ac_var in #(
2458 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002459 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2460 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461 esac ;;
2462 esac
2463 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002464 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2466 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 "s/'\''/'\''\\\\'\'''\''/g;
2469 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2470 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002471 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002473 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 esac |
2475 sort
2476)
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002478
2479 cat <<\_ASBOX
2480## ----------------- ##
2481## Output variables. ##
2482## ----------------- ##
2483_ASBOX
2484 echo
2485 for ac_var in $ac_subst_vars
2486 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 eval ac_val=\$$ac_var
2488 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 done | sort
2493 echo
2494
2495 if test -n "$ac_subst_files"; then
2496 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497## ------------------- ##
2498## File substitutions. ##
2499## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002500_ASBOX
2501 echo
2502 for ac_var in $ac_subst_files
2503 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 eval ac_val=\$$ac_var
2505 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002506 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 done | sort
2510 echo
2511 fi
2512
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 if test -s confdefs.h; then
2514 cat <<\_ASBOX
2515## ----------- ##
2516## confdefs.h. ##
2517## ----------- ##
2518_ASBOX
2519 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
2522 fi
2523 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$as_me: caught signal $ac_signal"
2525 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 rm -f core *.core core.conftest.* &&
2528 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002531for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002533done
2534ac_signal=0
2535
2536# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002538
Matthias Kloseb9621712010-04-24 17:59:49 +00002539$as_echo "/* confdefs.h */" > confdefs.h
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541# Predefined preprocessor variables.
2542
2543cat >>confdefs.h <<_ACEOF
2544#define PACKAGE_NAME "$PACKAGE_NAME"
2545_ACEOF
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_VERSION "$PACKAGE_VERSION"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_STRING "$PACKAGE_STRING"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2561_ACEOF
2562
Matthias Kloseb9621712010-04-24 17:59:49 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_URL "$PACKAGE_URL"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567
2568# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002569# Prefer an explicitly selected file to automatically selected ones.
2570ac_site_file1=NONE
2571ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572if test -n "$CONFIG_SITE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002573 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002575 ac_site_file1=$prefix/share/config.site
2576 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577else
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 ac_site_file1=$ac_default_prefix/share/config.site
2579 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002581for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582do
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 test "x$ac_site_file" = xNONE && continue
2584 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2585 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2586$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002588 . "$ac_site_file"
2589 fi
2590done
2591
2592if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 # Some versions of bash will fail to source /dev/null (special files
2594 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2595 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2597$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2600 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 esac
2602 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603else
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2605$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 >$cache_file
2607fi
2608
2609# Check that the precious variables saved in the cache have kept the same
2610# value.
2611ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2614 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2616 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 case $ac_old_set,$ac_new_set in
2618 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2620$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 +00002621 ac_cache_corrupted=: ;;
2622 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2624$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 ac_cache_corrupted=: ;;
2626 ,);;
2627 *)
2628 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002629 # differences in whitespace do not lead to failure.
2630 ac_old_val_w=`echo x $ac_old_val`
2631 ac_new_val_w=`echo x $ac_new_val`
2632 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2634$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2635 ac_cache_corrupted=:
2636 else
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2638$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2639 eval $ac_var=\$ac_old_val
2640 fi
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2642$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2644$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 fi;;
2646 esac
2647 # Pass precious variables to config.status.
2648 if test "$ac_new_set" = set; then
2649 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002650 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 *) ac_arg=$ac_var=$ac_new_val ;;
2652 esac
2653 case " $ac_configure_args " in
2654 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002655 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 esac
2657 fi
2658done
2659if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002660 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2661$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2663$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2664 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002666## -------------------- ##
2667## Main body of script. ##
2668## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002669
Guido van Rossum7f43da71994-08-01 12:15:30 +00002670ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002671ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002672ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2673ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2674ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675
Guido van Rossum627b2d71993-12-24 10:39:16 +00002676
Michael W. Hudson54241132001-12-07 15:38:26 +00002677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002678ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002679
2680
Martin v. Löwis11437992002-04-12 09:54:03 +00002681
Benjamin Petersond23f8222009-04-05 19:13:16 +00002682if test "$prefix" != "/"; then
2683 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2684fi
2685
2686
Martin v. Löwis11437992002-04-12 09:54:03 +00002687
2688
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002689# We don't use PACKAGE_ variables, and they cause conflicts
2690# with other autoconf-based packages that include Python.h
2691grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2692rm confdefs.h
2693mv confdefs.h.new confdefs.h
2694
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002695
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002696VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002697
Martin v. Löwis1142de32002-03-29 16:28:31 +00002698
2699SOVERSION=1.0
2700
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002701# The later defininition of _XOPEN_SOURCE disables certain features
2702# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2703
Matthias Kloseb9621712010-04-24 17:59:49 +00002704$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002705
2706
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002707# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2708# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2709# them.
2710
Matthias Kloseb9621712010-04-24 17:59:49 +00002711$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002712
2713
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002714# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2715# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2716# them.
2717
Matthias Kloseb9621712010-04-24 17:59:49 +00002718$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002719
2720
Martin v. Löwisd6320502004-08-12 13:45:08 +00002721# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2722# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2723
Matthias Kloseb9621712010-04-24 17:59:49 +00002724$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002725
2726
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002727# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2728# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2729# them.
2730
Matthias Kloseb9621712010-04-24 17:59:49 +00002731$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002732
2733
2734
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002735define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002736
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002737# Arguments passed to configure.
2738
2739CONFIG_ARGS="$ac_configure_args"
2740
Matthias Kloseb9621712010-04-24 17:59:49 +00002741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2742$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002743# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002744if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002745 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002746 case $enableval in
2747 yes)
2748 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002749 if test ! -d "${enableval}"
2750 then
2751 enableval=/
2752 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002753 ;;
2754 esac
2755 case $enableval in
2756 no)
2757 UNIVERSALSDK=
2758 enable_universalsdk=
2759 ;;
2760 *)
2761 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002762 if test ! -d "${UNIVERSALSDK}"
2763 then
Matthias Kloseb9621712010-04-24 17:59:49 +00002764 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002765 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002766 ;;
2767 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002768
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002769
Thomas Wouters477c8d52006-05-27 19:21:47 +00002770else
2771
2772 UNIVERSALSDK=
2773 enable_universalsdk=
2774
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002775fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002776
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002777if test -n "${UNIVERSALSDK}"
2778then
Matthias Kloseb9621712010-04-24 17:59:49 +00002779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2780$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002781else
Matthias Kloseb9621712010-04-24 17:59:49 +00002782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2783$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002784fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002786
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002787
2788
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002789UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002790
Matthias Kloseb9621712010-04-24 17:59:49 +00002791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2792$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002793
2794# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002795if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002796 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2798$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002799 UNIVERSAL_ARCHS="$withval"
2800
2801else
2802
Matthias Kloseb9621712010-04-24 17:59:49 +00002803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2804$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002805
2806fi
2807
2808
2809
2810
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002811
2812# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002813if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002814 withval=$with_framework_name;
2815 PYTHONFRAMEWORK=${withval}
2816 PYTHONFRAMEWORKDIR=${withval}.framework
2817 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2818
2819else
2820
2821 PYTHONFRAMEWORK=Python
2822 PYTHONFRAMEWORKDIR=Python.framework
2823 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2824
2825fi
2826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002827# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002828if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002829 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002830 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002831 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002832 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002833 esac
2834 case $enableval in
2835 no)
2836 PYTHONFRAMEWORK=
2837 PYTHONFRAMEWORKDIR=no-framework
2838 PYTHONFRAMEWORKPREFIX=
2839 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002840 FRAMEWORKINSTALLFIRST=
2841 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002842 FRAMEWORKALTINSTALLFIRST=
2843 FRAMEWORKALTINSTALLLAST=
2844 if test "x${prefix}" = "xNONE"; then
2845 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2846 else
2847 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2848 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002849 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002850 ;;
2851 *)
2852 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002853 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002854 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002855 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002856 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2857 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002858
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002859 if test "x${prefix}" = "xNONE" ; then
2860 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2861 else
2862 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2863 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002864 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002865
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002866 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002867 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002868 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002870 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002871
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002872 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2873
2874 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2875
Jack Jansene578a632001-08-15 01:27:14 +00002876 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002877
Guido van Rossum563e7081996-09-10 18:20:48 +00002878else
Martin v. Löwis11437992002-04-12 09:54:03 +00002879
Jack Jansene578a632001-08-15 01:27:14 +00002880 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002881 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002882 PYTHONFRAMEWORKPREFIX=
2883 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002884 FRAMEWORKINSTALLFIRST=
2885 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002886 FRAMEWORKALTINSTALLFIRST=
2887 FRAMEWORKALTINSTALLLAST=
2888 if test "x${prefix}" = "xNONE" ; then
2889 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2890 else
2891 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2892 fi
Jack Jansene578a632001-08-15 01:27:14 +00002893 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002894
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002895
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002896fi
2897
Thomas Wouters477c8d52006-05-27 19:21:47 +00002898
2899
Michael W. Hudson54241132001-12-07 15:38:26 +00002900
2901
2902
2903
Jack Jansene578a632001-08-15 01:27:14 +00002904
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002905
2906
2907
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002908
Jack Jansene578a632001-08-15 01:27:14 +00002909##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002910## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002911## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002912##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002913# Set name for machine-dependent library files
2914
Matthias Kloseb9621712010-04-24 17:59:49 +00002915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2916$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002917if test -z "$MACHDEP"
2918then
Guido van Rossum563e7081996-09-10 18:20:48 +00002919 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002920 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002921 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002922 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002923 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002924 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002925 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002926 ac_md_system=`echo $ac_sys_system |
2927 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2928 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002929 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002930 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002931
Guido van Rossum07397971997-04-29 21:49:50 +00002932 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002933 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002934 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002935 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002936 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002937 esac
2938fi
Guido van Rossum91922671997-10-09 20:24:13 +00002939
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002940# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2941# disable features if it is defined, without any means to access these
2942# features as extensions. For these systems, we skip the definition of
2943# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2944# some feature, make sure there is no alternative way to access this
2945# feature. Also, when using wildcards, make sure you have verified the
2946# need for not defining _XOPEN_SOURCE on all systems matching the
2947# wildcard, and that the wildcard does not include future systems
2948# (which may remove their limitations).
2949case $ac_sys_system/$ac_sys_release in
2950 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2951 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002952 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002953 # In addition, Stefan Krah confirms that issue #1244610 exists through
2954 # OpenBSD 4.6, but is fixed in 4.7.
2955 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002956 define_xopen_source=no
2957 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2958 # also defined. This can be overridden by defining _BSD_SOURCE
2959 # As this has a different meaning on Linux, only define it on OpenBSD
2960
Matthias Kloseb9621712010-04-24 17:59:49 +00002961$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002962
2963 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002964 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00002965 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2966 # also defined. This can be overridden by defining _BSD_SOURCE
2967 # As this has a different meaning on Linux, only define it on OpenBSD
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00002970
2971 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002972 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2973 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2974 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002975 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 +00002976 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002977 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2978 # of union __?sigval. Reported by Stuart Bishop.
2979 SunOS/5.6)
2980 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002981 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2982 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002983 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002984 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002985 define_xopen_source=no;;
2986 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002987 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002988 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002989 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002990 # On FreeBSD 4, the math functions C89 does not cover are never defined
2991 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2992 FreeBSD/4.*)
2993 define_xopen_source=no;;
2994 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2995 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2996 # identifies itself as Darwin/7.*
2997 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2998 # disables platform specific features beyond repair.
2999 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3000 # has no effect, don't bother defining them
3001 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003002 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003003 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003004 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003005 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3006 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3007 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003008 AIX/4)
3009 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003010 AIX/5)
3011 if test `uname -r` -eq 1; then
3012 define_xopen_source=no
3013 fi
3014 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003015 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3016 # defining NI_NUMERICHOST.
3017 QNX/6.3.2)
3018 define_xopen_source=no
3019 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003020
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003021esac
3022
3023if test $define_xopen_source = yes
3024then
Skip Montanarof0d5f792004-08-15 14:08:23 +00003025 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
3026 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00003027 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
3028 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00003029 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00003030 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00003031
Matthias Kloseb9621712010-04-24 17:59:49 +00003032$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
Skip Montanarof0d5f792004-08-15 14:08:23 +00003033
3034 ;;
3035 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003036
Matthias Kloseb9621712010-04-24 17:59:49 +00003037$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003038
Skip Montanarof0d5f792004-08-15 14:08:23 +00003039 ;;
3040 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003041
3042 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3043 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3044 # several APIs are not declared. Since this is also needed in some
3045 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00003046 # except for Solaris 10, where it must not be defined,
3047 # as it implies XPG4.2
3048 case $ac_sys_system/$ac_sys_release in
3049 SunOS/5.10)
3050 ;;
3051 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003052
Matthias Kloseb9621712010-04-24 17:59:49 +00003053$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003054
Martin v. Löwis7dece662005-11-26 11:38:24 +00003055 ;;
3056 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003057
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003058
Matthias Kloseb9621712010-04-24 17:59:49 +00003059$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003060
3061
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003062fi
3063
Guido van Rossum91922671997-10-09 20:24:13 +00003064#
3065# SGI compilers allow the specification of the both the ABI and the
3066# ISA on the command line. Depending on the values of these switches,
3067# different and often incompatable code will be generated.
3068#
3069# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3070# thus supply support for various ABI/ISA combinations. The MACHDEP
3071# variable is also adjusted.
3072#
3073
3074if test ! -z "$SGI_ABI"
3075then
3076 CC="cc $SGI_ABI"
3077 LDFLAGS="$SGI_ABI $LDFLAGS"
3078 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3079fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3081$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003082
Jack Jansen6b08a402004-06-03 12:41:45 +00003083# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3084# it may influence the way we can build extensions, so distutils
3085# needs to check it
3086
Thomas Wouters477c8d52006-05-27 19:21:47 +00003087
Jack Jansen6b08a402004-06-03 12:41:45 +00003088CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003089EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003090
Matthias Kloseb9621712010-04-24 17:59:49 +00003091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3092$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003093ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3095$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003096
Guido van Rossum627b2d71993-12-24 10:39:16 +00003097# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003098
3099# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3100# for debug/optimization stuff. BASECFLAGS is for flags that are required
3101# just to get things to compile and link. Users are free to override OPT
3102# when running configure or make. The build should not break if they do.
3103# BASECFLAGS should generally not be messed with, however.
3104
3105# XXX shouldn't some/most/all of this code be merged with the stuff later
3106# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3108$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003111if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003113 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003114 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003115 without_gcc=yes;;
3116 yes) CC=gcc
3117 without_gcc=no;;
3118 *) CC=$withval
3119 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003120 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003121else
Martin v. Löwis11437992002-04-12 09:54:03 +00003122
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003123 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003124 AIX*) CC=cc_r
3125 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003126 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003127 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003128fi
3129
Matthias Kloseb9621712010-04-24 17:59:49 +00003130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3131$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003132
Guido van Rossum8b131c51995-03-09 14:10:13 +00003133# If the user switches compilers, we can't believe the cache
3134if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3135then
Matthias Kloseb9621712010-04-24 17:59:49 +00003136 as_fn_error "cached CC is different -- throw away $cache_file
3137(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003138fi
3139
Victor Stinner00d6a1d2010-03-25 01:02:29 +00003140save_CFLAGS=$CFLAGS
Martin v. Löwis11437992002-04-12 09:54:03 +00003141ac_ext=c
3142ac_cpp='$CPP $CPPFLAGS'
3143ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3144ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3145ac_compiler_gnu=$ac_cv_c_compiler_gnu
3146if test -n "$ac_tool_prefix"; then
3147 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3148set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3150$as_echo_n "checking for $ac_word... " >&6; }
3151if test "${ac_cv_prog_CC+set}" = set; then :
3152 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003153else
3154 if test -n "$CC"; then
3155 ac_cv_prog_CC="$CC" # Let the user override the test.
3156else
Martin v. Löwis11437992002-04-12 09:54:03 +00003157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3158for as_dir in $PATH
3159do
3160 IFS=$as_save_IFS
3161 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003162 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003163 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 +00003164 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003165 $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 +00003166 break 2
3167 fi
3168done
Matthias Kloseb9621712010-04-24 17:59:49 +00003169 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003170IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003171
Jack Jansendd19cf82001-12-06 22:36:17 +00003172fi
3173fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003174CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003175if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3177$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003178else
Matthias Kloseb9621712010-04-24 17:59:49 +00003179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3180$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003181fi
3182
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003183
Martin v. Löwis11437992002-04-12 09:54:03 +00003184fi
3185if test -z "$ac_cv_prog_CC"; then
3186 ac_ct_CC=$CC
3187 # Extract the first word of "gcc", so it can be a program name with args.
3188set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3190$as_echo_n "checking for $ac_word... " >&6; }
3191if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3192 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003193else
3194 if test -n "$ac_ct_CC"; then
3195 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3196else
3197as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3198for as_dir in $PATH
3199do
3200 IFS=$as_save_IFS
3201 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003202 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203 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 +00003204 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003205 $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 +00003206 break 2
3207 fi
3208done
Matthias Kloseb9621712010-04-24 17:59:49 +00003209 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003210IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003211
3212fi
3213fi
3214ac_ct_CC=$ac_cv_prog_ac_ct_CC
3215if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3217$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003218else
Matthias Kloseb9621712010-04-24 17:59:49 +00003219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3220$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003221fi
3222
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003223 if test "x$ac_ct_CC" = x; then
3224 CC=""
3225 else
3226 case $cross_compiling:$ac_tool_warned in
3227yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003228{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3229$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230ac_tool_warned=yes ;;
3231esac
3232 CC=$ac_ct_CC
3233 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003234else
3235 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003236fi
3237
Jack Jansendd19cf82001-12-06 22:36:17 +00003238if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003239 if test -n "$ac_tool_prefix"; then
3240 # 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 +00003241set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3243$as_echo_n "checking for $ac_word... " >&6; }
3244if test "${ac_cv_prog_CC+set}" = set; then :
3245 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003246else
3247 if test -n "$CC"; then
3248 ac_cv_prog_CC="$CC" # Let the user override the test.
3249else
Martin v. Löwis11437992002-04-12 09:54:03 +00003250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3251for as_dir in $PATH
3252do
3253 IFS=$as_save_IFS
3254 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003255 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003256 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 +00003257 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003258 $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 +00003259 break 2
3260 fi
3261done
Matthias Kloseb9621712010-04-24 17:59:49 +00003262 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003263IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003264
3265fi
3266fi
3267CC=$ac_cv_prog_CC
3268if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3270$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003271else
Matthias Kloseb9621712010-04-24 17:59:49 +00003272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3273$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003274fi
3275
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003276
Martin v. Löwis11437992002-04-12 09:54:03 +00003277 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003278fi
3279if test -z "$CC"; then
3280 # Extract the first word of "cc", so it can be a program name with args.
3281set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3283$as_echo_n "checking for $ac_word... " >&6; }
3284if test "${ac_cv_prog_CC+set}" = set; then :
3285 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003286else
3287 if test -n "$CC"; then
3288 ac_cv_prog_CC="$CC" # Let the user override the test.
3289else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003290 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3292for as_dir in $PATH
3293do
3294 IFS=$as_save_IFS
3295 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003296 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003297 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 +00003298 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3299 ac_prog_rejected=yes
3300 continue
3301 fi
3302 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003303 $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 +00003304 break 2
3305 fi
3306done
Matthias Kloseb9621712010-04-24 17:59:49 +00003307 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003308IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003309
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003310if test $ac_prog_rejected = yes; then
3311 # We found a bogon in the path, so make sure we never use it.
3312 set dummy $ac_cv_prog_CC
3313 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003314 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003315 # We chose a different compiler from the bogus one.
3316 # However, it has the same basename, so the bogon will be chosen
3317 # first if we set CC to just the basename; use the full file name.
3318 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003319 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003320 fi
3321fi
3322fi
3323fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003324CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003325if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3327$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003328else
Matthias Kloseb9621712010-04-24 17:59:49 +00003329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3330$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003331fi
3332
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003333
Martin v. Löwis11437992002-04-12 09:54:03 +00003334fi
3335if test -z "$CC"; then
3336 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003337 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003338 do
3339 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3340set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3342$as_echo_n "checking for $ac_word... " >&6; }
3343if test "${ac_cv_prog_CC+set}" = set; then :
3344 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003345else
3346 if test -n "$CC"; then
3347 ac_cv_prog_CC="$CC" # Let the user override the test.
3348else
Martin v. Löwis11437992002-04-12 09:54:03 +00003349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3350for as_dir in $PATH
3351do
3352 IFS=$as_save_IFS
3353 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003355 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 +00003356 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003357 $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 +00003358 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003359 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003360done
Matthias Kloseb9621712010-04-24 17:59:49 +00003361 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003362IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003363
3364fi
3365fi
3366CC=$ac_cv_prog_CC
3367if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3369$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003370else
Matthias Kloseb9621712010-04-24 17:59:49 +00003371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3372$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003373fi
3374
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003375
Martin v. Löwis11437992002-04-12 09:54:03 +00003376 test -n "$CC" && break
3377 done
3378fi
3379if test -z "$CC"; then
3380 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003381 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003382do
3383 # Extract the first word of "$ac_prog", so it can be a program name with args.
3384set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3386$as_echo_n "checking for $ac_word... " >&6; }
3387if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3388 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003389else
3390 if test -n "$ac_ct_CC"; then
3391 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3392else
3393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3394for as_dir in $PATH
3395do
3396 IFS=$as_save_IFS
3397 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003398 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003399 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 +00003400 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003401 $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 +00003402 break 2
3403 fi
3404done
Matthias Kloseb9621712010-04-24 17:59:49 +00003405 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003406IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003407
Martin v. Löwis11437992002-04-12 09:54:03 +00003408fi
3409fi
3410ac_ct_CC=$ac_cv_prog_ac_ct_CC
3411if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3413$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003414else
Matthias Kloseb9621712010-04-24 17:59:49 +00003415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3416$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003417fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003419
Martin v. Löwis11437992002-04-12 09:54:03 +00003420 test -n "$ac_ct_CC" && break
3421done
Michael W. Hudson54241132001-12-07 15:38:26 +00003422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003423 if test "x$ac_ct_CC" = x; then
3424 CC=""
3425 else
3426 case $cross_compiling:$ac_tool_warned in
3427yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003428{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3429$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003430ac_tool_warned=yes ;;
3431esac
3432 CC=$ac_ct_CC
3433 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003434fi
3435
3436fi
3437
3438
Matthias Kloseb9621712010-04-24 17:59:49 +00003439test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3440$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3441as_fn_error "no acceptable C compiler found in \$PATH
3442See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003443
3444# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003445$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3446set X $ac_compile
3447ac_compiler=$2
3448for ac_option in --version -v -V -qversion; do
3449 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003450case "(($ac_try" in
3451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3452 *) ac_try_echo=$ac_try;;
3453esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003454eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3455$as_echo "$ac_try_echo"; } >&5
3456 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003457 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003458 if test -s conftest.err; then
3459 sed '10a\
3460... rest of stderr output deleted ...
3461 10q' conftest.err >conftest.er1
3462 cat conftest.er1 >&5
3463 fi
3464 rm -f conftest.er1 conftest.err
3465 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3466 test $ac_status = 0; }
3467done
Martin v. Löwis11437992002-04-12 09:54:03 +00003468
Matthias Kloseb9621712010-04-24 17:59:49 +00003469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003470/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003471
Martin v. Löwis11437992002-04-12 09:54:03 +00003472int
3473main ()
3474{
3475
3476 ;
3477 return 0;
3478}
3479_ACEOF
3480ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003481ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003482# Try to create an executable without -o first, disregard a.out.
3483# It will help us diagnose broken compilers, and finding out an intuition
3484# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3486$as_echo_n "checking whether the C compiler works... " >&6; }
3487ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3488
3489# The possible output files:
3490ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3491
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003492ac_rmfiles=
3493for ac_file in $ac_files
3494do
3495 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003496 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003497 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3498 esac
3499done
3500rm -f $ac_rmfiles
3501
Matthias Kloseb9621712010-04-24 17:59:49 +00003502if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003503case "(($ac_try" in
3504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3505 *) ac_try_echo=$ac_try;;
3506esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003507eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3508$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003509 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003511 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3512 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003513 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3514# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3515# in a Makefile. We should not override ac_cv_exeext if it was cached,
3516# so that the user can short-circuit this test for compilers unknown to
3517# Autoconf.
3518for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003519do
3520 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003521 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 Wouters1ba5b3b2006-06-08 14:52:47 +00003523 ;;
3524 [ab].out )
3525 # We found the default executable, but exeext='' is most
3526 # certainly right.
3527 break;;
3528 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003529 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003530 then :; else
3531 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3532 fi
3533 # We set ac_cv_exeext here because the later test for it is not
3534 # safe: cross compilers may not add the suffix if given an `-o'
3535 # argument, so we may need to know it at that point already.
3536 # Even if this section looks crufty: it has the advantage of
3537 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003538 break;;
3539 * )
3540 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003541 esac
3542done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543test "$ac_cv_exeext" = no && ac_cv_exeext=
3544
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003545else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003546 ac_file=''
3547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003548if test -z "$ac_file"; then :
3549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3550$as_echo "no" >&6; }
3551$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003552sed 's/^/| /' conftest.$ac_ext >&5
3553
Matthias Kloseb9621712010-04-24 17:59:49 +00003554{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3555$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3556{ as_fn_set_status 77
3557as_fn_error "C compiler cannot create executables
3558See \`config.log' for more details." "$LINENO" 5; }; }
3559else
3560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3561$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3564$as_echo_n "checking for C compiler default output file name... " >&6; }
3565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3566$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003567ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003568
Matthias Kloseb9621712010-04-24 17:59:49 +00003569rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003570ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3572$as_echo_n "checking for suffix of executables... " >&6; }
3573if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574case "(($ac_try" in
3575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3576 *) ac_try_echo=$ac_try;;
3577esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003578eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3579$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003580 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003581 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3583 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003584 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3585# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3586# work properly (i.e., refer to `conftest.exe'), while it won't with
3587# `rm'.
3588for ac_file in conftest.exe conftest conftest.*; do
3589 test -f "$ac_file" || continue
3590 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003591 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003592 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3593 break;;
3594 * ) break;;
3595 esac
3596done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003597else
Matthias Kloseb9621712010-04-24 17:59:49 +00003598 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3599$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3600as_fn_error "cannot compute suffix of executables: cannot compile and link
3601See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003603rm -f conftest conftest$ac_cv_exeext
3604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3605$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003606
3607rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003608EXEEXT=$ac_cv_exeext
3609ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3611/* end confdefs.h. */
3612#include <stdio.h>
3613int
3614main ()
3615{
3616FILE *f = fopen ("conftest.out", "w");
3617 return ferror (f) || fclose (f) != 0;
3618
3619 ;
3620 return 0;
3621}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003623ac_clean_files="$ac_clean_files conftest.out"
3624# Check that the compiler produces executables we can run. If not, either
3625# the compiler is broken, or we cross compile.
3626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3627$as_echo_n "checking whether we are cross compiling... " >&6; }
3628if test "$cross_compiling" != yes; then
3629 { { ac_try="$ac_link"
3630case "(($ac_try" in
3631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3632 *) ac_try_echo=$ac_try;;
3633esac
3634eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3635$as_echo "$ac_try_echo"; } >&5
3636 (eval "$ac_link") 2>&5
3637 ac_status=$?
3638 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3639 test $ac_status = 0; }
3640 if { ac_try='./conftest$ac_cv_exeext'
3641 { { case "(($ac_try" in
3642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3643 *) ac_try_echo=$ac_try;;
3644esac
3645eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3646$as_echo "$ac_try_echo"; } >&5
3647 (eval "$ac_try") 2>&5
3648 ac_status=$?
3649 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3650 test $ac_status = 0; }; }; then
3651 cross_compiling=no
3652 else
3653 if test "$cross_compiling" = maybe; then
3654 cross_compiling=yes
3655 else
3656 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3658as_fn_error "cannot run C compiled programs.
3659If you meant to cross compile, use \`--host'.
3660See \`config.log' for more details." "$LINENO" 5; }
3661 fi
3662 fi
3663fi
3664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3665$as_echo "$cross_compiling" >&6; }
3666
3667rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3668ac_clean_files=$ac_clean_files_save
3669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3670$as_echo_n "checking for suffix of object files... " >&6; }
3671if test "${ac_cv_objext+set}" = set; then :
3672 $as_echo_n "(cached) " >&6
3673else
3674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003675/* end confdefs.h. */
3676
3677int
3678main ()
3679{
3680
3681 ;
3682 return 0;
3683}
3684_ACEOF
3685rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003686if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003687case "(($ac_try" in
3688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3689 *) ac_try_echo=$ac_try;;
3690esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003691eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3692$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003694 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3696 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003697 for ac_file in conftest.o conftest.obj conftest.*; do
3698 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003699 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003701 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3702 break;;
3703 esac
3704done
3705else
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003707sed 's/^/| /' conftest.$ac_ext >&5
3708
Matthias Kloseb9621712010-04-24 17:59:49 +00003709{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3710$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3711as_fn_error "cannot compute suffix of object files: cannot compile
3712See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003713fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003714rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3717$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003718OBJEXT=$ac_cv_objext
3719ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3721$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3722if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3723 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003724else
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003727
Martin v. Löwis11437992002-04-12 09:54:03 +00003728int
3729main ()
3730{
3731#ifndef __GNUC__
3732 choke me
3733#endif
3734
3735 ;
3736 return 0;
3737}
3738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003739if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 ac_compiler_gnu=yes
3741else
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003745ac_cv_c_compiler_gnu=$ac_compiler_gnu
3746
3747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3749$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3750if test $ac_compiler_gnu = yes; then
3751 GCC=yes
3752else
3753 GCC=
3754fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003755ac_test_CFLAGS=${CFLAGS+set}
3756ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3758$as_echo_n "checking whether $CC accepts -g... " >&6; }
3759if test "${ac_cv_prog_cc_g+set}" = set; then :
3760 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003761else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762 ac_save_c_werror_flag=$ac_c_werror_flag
3763 ac_c_werror_flag=yes
3764 ac_cv_prog_cc_g=no
3765 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003768
Martin v. Löwis11437992002-04-12 09:54:03 +00003769int
3770main ()
3771{
3772
3773 ;
3774 return 0;
3775}
3776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003777if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003778 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003779else
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 CFLAGS=""
3781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782/* end confdefs.h. */
3783
3784int
3785main ()
3786{
3787
3788 ;
3789 return 0;
3790}
3791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003792if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793
Matthias Kloseb9621712010-04-24 17:59:49 +00003794else
3795 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798/* end confdefs.h. */
3799
3800int
3801main ()
3802{
3803
3804 ;
3805 return 0;
3806}
3807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003808if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3816 ac_c_werror_flag=$ac_save_c_werror_flag
3817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3819$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003820if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003821 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003822elif test $ac_cv_prog_cc_g = yes; then
3823 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003824 CFLAGS="-g -O2"
3825 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003826 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003827 fi
3828else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003829 if test "$GCC" = yes; then
3830 CFLAGS="-O2"
3831 else
3832 CFLAGS=
3833 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3836$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3837if test "${ac_cv_prog_cc_c89+set}" = set; then :
3838 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003839else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003841ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003843/* end confdefs.h. */
3844#include <stdarg.h>
3845#include <stdio.h>
3846#include <sys/types.h>
3847#include <sys/stat.h>
3848/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3849struct buf { int x; };
3850FILE * (*rcsopen) (struct buf *, struct stat *, int);
3851static char *e (p, i)
3852 char **p;
3853 int i;
3854{
3855 return p[i];
3856}
3857static char *f (char * (*g) (char **, int), char **p, ...)
3858{
3859 char *s;
3860 va_list v;
3861 va_start (v,p);
3862 s = g (p, va_arg (v,int));
3863 va_end (v);
3864 return s;
3865}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003866
3867/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3868 function prototypes and stuff, but not '\xHH' hex character constants.
3869 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003871 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3872 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003874int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003876/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3877 inside strings and character constants. */
3878#define FOO(x) 'x'
3879int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3880
Skip Montanaro6dead952003-09-25 14:50:04 +00003881int test (int i, double x);
3882struct s1 {int (*f) (int a);};
3883struct s2 {int (*f) (double a);};
3884int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3885int argc;
3886char **argv;
3887int
3888main ()
3889{
3890return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3891 ;
3892 return 0;
3893}
3894_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3896 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003897do
3898 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003899 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003900 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902rm -f core conftest.err conftest.$ac_objext
3903 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003904done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003906CC=$ac_save_CC
3907
3908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909# AC_CACHE_VAL
3910case "x$ac_cv_prog_cc_c89" in
3911 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3913$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003914 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3916$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003917 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3920$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003921esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003922if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003923
Matthias Kloseb9621712010-04-24 17:59:49 +00003924fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003925
Martin v. Löwis11437992002-04-12 09:54:03 +00003926ac_ext=c
3927ac_cpp='$CPP $CPPFLAGS'
3928ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3929ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3930ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003931
Victor Stinner00d6a1d2010-03-25 01:02:29 +00003932CFLAGS=$save_CFLAGS
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003933
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003934
3935
Matthias Kloseb9621712010-04-24 17:59:49 +00003936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3937$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003940if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003942
3943 case $withval in
3944 no) with_cxx_main=no
3945 MAINCC='$(CC)';;
3946 yes) with_cxx_main=yes
3947 MAINCC='$(CXX)';;
3948 *) with_cxx_main=yes
3949 MAINCC=$withval
3950 if test -z "$CXX"
3951 then
3952 CXX=$withval
3953 fi;;
3954 esac
3955else
3956
3957 with_cxx_main=no
3958 MAINCC='$(CC)'
3959
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960fi
3961
Matthias Kloseb9621712010-04-24 17:59:49 +00003962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3963$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003964
3965preset_cxx="$CXX"
3966if test -z "$CXX"
3967then
3968 case "$CC" in
3969 gcc) # Extract the first word of "g++", so it can be a program name with args.
3970set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3972$as_echo_n "checking for $ac_word... " >&6; }
3973if test "${ac_cv_path_CXX+set}" = set; then :
3974 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003975else
3976 case $CXX in
3977 [\\/]* | ?:[\\/]*)
3978 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3979 ;;
3980 *)
3981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3982for as_dir in notfound
3983do
3984 IFS=$as_save_IFS
3985 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003986 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987 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 +00003988 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00003989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003990 break 2
3991 fi
3992done
Matthias Kloseb9621712010-04-24 17:59:49 +00003993 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003995
3996 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3997 ;;
3998esac
3999fi
4000CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004001if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4003$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004004else
Matthias Kloseb9621712010-04-24 17:59:49 +00004005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4006$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004009 ;;
4010 cc) # Extract the first word of "c++", so it can be a program name with args.
4011set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4013$as_echo_n "checking for $ac_word... " >&6; }
4014if test "${ac_cv_path_CXX+set}" = set; then :
4015 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004016else
4017 case $CXX in
4018 [\\/]* | ?:[\\/]*)
4019 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4020 ;;
4021 *)
4022 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4023for as_dir in notfound
4024do
4025 IFS=$as_save_IFS
4026 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004028 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 +00004029 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004031 break 2
4032 fi
4033done
Matthias Kloseb9621712010-04-24 17:59:49 +00004034 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004035IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004036
4037 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4038 ;;
4039esac
4040fi
4041CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004042if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4044$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004045else
Matthias Kloseb9621712010-04-24 17:59:49 +00004046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4047$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004049
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004050 ;;
4051 esac
4052 if test "$CXX" = "notfound"
4053 then
4054 CXX=""
4055 fi
4056fi
4057if test -z "$CXX"
4058then
4059 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4060do
4061 # Extract the first word of "$ac_prog", so it can be a program name with args.
4062set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4064$as_echo_n "checking for $ac_word... " >&6; }
4065if test "${ac_cv_prog_CXX+set}" = set; then :
4066 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004067else
4068 if test -n "$CXX"; then
4069 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4070else
4071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4072for as_dir in $PATH
4073do
4074 IFS=$as_save_IFS
4075 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004076 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004077 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 +00004078 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004080 break 2
4081 fi
4082done
Matthias Kloseb9621712010-04-24 17:59:49 +00004083 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004084IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004085
4086fi
4087fi
4088CXX=$ac_cv_prog_CXX
4089if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4091$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004092else
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4094$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004095fi
4096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004097
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004098 test -n "$CXX" && break
4099done
4100test -n "$CXX" || CXX="notfound"
4101
4102 if test "$CXX" = "notfound"
4103 then
4104 CXX=""
4105 fi
4106fi
4107if test "$preset_cxx" != "$CXX"
4108then
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004110
4111 By default, distutils will build C++ extension modules with \"$CXX\".
4112 If this is not intended, then set CXX on the configure command line.
4113 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004114$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004115
4116 By default, distutils will build C++ extension modules with \"$CXX\".
4117 If this is not intended, then set CXX on the configure command line.
4118 " >&2;}
4119fi
4120
4121
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004122# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004123
4124ac_ext=c
4125ac_cpp='$CPP $CPPFLAGS'
4126ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4127ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4128ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4130$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004131# On Suns, sometimes $CPP names a directory.
4132if test -n "$CPP" && test -d "$CPP"; then
4133 CPP=
4134fi
4135if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 if test "${ac_cv_prog_CPP+set}" = set; then :
4137 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004138else
Martin v. Löwis11437992002-04-12 09:54:03 +00004139 # Double quotes because CPP needs to be expanded
4140 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4141 do
4142 ac_preproc_ok=false
4143for ac_c_preproc_warn_flag in '' yes
4144do
4145 # Use a header file that comes with gcc, so configuring glibc
4146 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004147 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4148 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004149 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004150 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004152/* end confdefs.h. */
4153#ifdef __STDC__
4154# include <limits.h>
4155#else
4156# include <assert.h>
4157#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004158 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004160if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004161
Matthias Kloseb9621712010-04-24 17:59:49 +00004162else
Martin v. Löwis11437992002-04-12 09:54:03 +00004163 # Broken: fails on valid input.
4164continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004165fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004166rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004167
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004168 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004169 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004172#include <ac_nonexistent.h>
4173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004174if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004175 # Broken: success on invalid input.
4176continue
4177else
Martin v. Löwis11437992002-04-12 09:54:03 +00004178 # Passes both tests.
4179ac_preproc_ok=:
4180break
4181fi
4182rm -f conftest.err conftest.$ac_ext
4183
4184done
4185# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4186rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004187if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004188 break
4189fi
4190
4191 done
4192 ac_cv_prog_CPP=$CPP
4193
4194fi
4195 CPP=$ac_cv_prog_CPP
4196else
4197 ac_cv_prog_CPP=$CPP
4198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4200$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004201ac_preproc_ok=false
4202for ac_c_preproc_warn_flag in '' yes
4203do
4204 # Use a header file that comes with gcc, so configuring glibc
4205 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004206 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4207 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 # On the NeXT, cc -E runs the code through the compiler's parser,
4209 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004211/* end confdefs.h. */
4212#ifdef __STDC__
4213# include <limits.h>
4214#else
4215# include <assert.h>
4216#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004217 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004219if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004220
Matthias Kloseb9621712010-04-24 17:59:49 +00004221else
Martin v. Löwis11437992002-04-12 09:54:03 +00004222 # Broken: fails on valid input.
4223continue
4224fi
4225rm -f conftest.err conftest.$ac_ext
4226
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004228 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004231#include <ac_nonexistent.h>
4232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004233if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004234 # Broken: success on invalid input.
4235continue
4236else
Martin v. Löwis11437992002-04-12 09:54:03 +00004237 # Passes both tests.
4238ac_preproc_ok=:
4239break
4240fi
4241rm -f conftest.err conftest.$ac_ext
4242
4243done
4244# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4245rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004246if $ac_preproc_ok; then :
4247
Martin v. Löwis11437992002-04-12 09:54:03 +00004248else
Matthias Kloseb9621712010-04-24 17:59:49 +00004249 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4250$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4251as_fn_error "C preprocessor \"$CPP\" fails sanity check
4252See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004253fi
4254
4255ac_ext=c
4256ac_cpp='$CPP $CPPFLAGS'
4257ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4258ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4259ac_compiler_gnu=$ac_cv_c_compiler_gnu
4260
4261
Matthias Kloseb9621712010-04-24 17:59:49 +00004262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4263$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4264if test "${ac_cv_path_GREP+set}" = set; then :
4265 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004266else
Matthias Kloseb9621712010-04-24 17:59:49 +00004267 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004268 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004269 # Loop through the user's path and test for each of PROGNAME-LIST
4270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4272do
4273 IFS=$as_save_IFS
4274 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004275 for ac_prog in grep ggrep; do
4276 for ac_exec_ext in '' $ac_executable_extensions; do
4277 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4278 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4279# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280 # Check for GNU $ac_path_GREP
4281case `"$ac_path_GREP" --version 2>&1` in
4282*GNU*)
4283 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4284*)
4285 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004286 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004287 while :
4288 do
4289 cat "conftest.in" "conftest.in" >"conftest.tmp"
4290 mv "conftest.tmp" "conftest.in"
4291 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004292 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004293 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4294 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004295 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004296 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4297 # Best one so far, save it but keep looking for a better one
4298 ac_cv_path_GREP="$ac_path_GREP"
4299 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004300 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 # 10*(2^10) chars as input seems more than enough
4302 test $ac_count -gt 10 && break
4303 done
4304 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4305esac
4306
Matthias Kloseb9621712010-04-24 17:59:49 +00004307 $ac_path_GREP_found && break 3
4308 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004310 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004312 if test -z "$ac_cv_path_GREP"; then
4313 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4314 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004315else
4316 ac_cv_path_GREP=$GREP
4317fi
4318
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4321$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 GREP="$ac_cv_path_GREP"
4323
4324
Matthias Kloseb9621712010-04-24 17:59:49 +00004325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4326$as_echo_n "checking for egrep... " >&6; }
4327if test "${ac_cv_path_EGREP+set}" = set; then :
4328 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329else
4330 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4331 then ac_cv_path_EGREP="$GREP -E"
4332 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004333 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004335 # Loop through the user's path and test for each of PROGNAME-LIST
4336 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4338do
4339 IFS=$as_save_IFS
4340 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 for ac_prog in egrep; do
4342 for ac_exec_ext in '' $ac_executable_extensions; do
4343 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4344 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4345# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346 # Check for GNU $ac_path_EGREP
4347case `"$ac_path_EGREP" --version 2>&1` in
4348*GNU*)
4349 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4350*)
4351 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004352 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353 while :
4354 do
4355 cat "conftest.in" "conftest.in" >"conftest.tmp"
4356 mv "conftest.tmp" "conftest.in"
4357 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4360 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4363 # Best one so far, save it but keep looking for a better one
4364 ac_cv_path_EGREP="$ac_path_EGREP"
4365 ac_path_EGREP_max=$ac_count
4366 fi
4367 # 10*(2^10) chars as input seems more than enough
4368 test $ac_count -gt 10 && break
4369 done
4370 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4371esac
4372
Matthias Kloseb9621712010-04-24 17:59:49 +00004373 $ac_path_EGREP_found && break 3
4374 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004376 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004377IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004378 if test -z "$ac_cv_path_EGREP"; then
4379 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4380 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381else
4382 ac_cv_path_EGREP=$EGREP
4383fi
4384
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385 fi
4386fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4388$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004389 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004390
4391
Matthias Kloseb9621712010-04-24 17:59:49 +00004392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4393$as_echo_n "checking for ANSI C header files... " >&6; }
4394if test "${ac_cv_header_stdc+set}" = set; then :
4395 $as_echo_n "(cached) " >&6
4396else
4397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004398/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004399#include <stdlib.h>
4400#include <stdarg.h>
4401#include <string.h>
4402#include <float.h>
4403
4404int
4405main ()
4406{
4407
4408 ;
4409 return 0;
4410}
4411_ACEOF
4412if ac_fn_c_try_compile "$LINENO"; then :
4413 ac_cv_header_stdc=yes
4414else
4415 ac_cv_header_stdc=no
4416fi
4417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4418
4419if test $ac_cv_header_stdc = yes; then
4420 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4422/* end confdefs.h. */
4423#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004424
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004425_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004426if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004427 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004428
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004429else
Matthias Kloseb9621712010-04-24 17:59:49 +00004430 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004431fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004432rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004433
Matthias Kloseb9621712010-04-24 17:59:49 +00004434fi
4435
4436if test $ac_cv_header_stdc = yes; then
4437 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4439/* end confdefs.h. */
4440#include <stdlib.h>
4441
4442_ACEOF
4443if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4444 $EGREP "free" >/dev/null 2>&1; then :
4445
4446else
4447 ac_cv_header_stdc=no
4448fi
4449rm -f conftest*
4450
4451fi
4452
4453if test $ac_cv_header_stdc = yes; then
4454 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4455 if test "$cross_compiling" = yes; then :
4456 :
4457else
4458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4459/* end confdefs.h. */
4460#include <ctype.h>
4461#include <stdlib.h>
4462#if ((' ' & 0x0FF) == 0x020)
4463# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4464# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4465#else
4466# define ISLOWER(c) \
4467 (('a' <= (c) && (c) <= 'i') \
4468 || ('j' <= (c) && (c) <= 'r') \
4469 || ('s' <= (c) && (c) <= 'z'))
4470# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4471#endif
4472
4473#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4474int
4475main ()
4476{
4477 int i;
4478 for (i = 0; i < 256; i++)
4479 if (XOR (islower (i), ISLOWER (i))
4480 || toupper (i) != TOUPPER (i))
4481 return 2;
4482 return 0;
4483}
4484_ACEOF
4485if ac_fn_c_try_run "$LINENO"; then :
4486
4487else
4488 ac_cv_header_stdc=no
4489fi
4490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4491 conftest.$ac_objext conftest.beam conftest.$ac_ext
4492fi
4493
4494fi
4495fi
4496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4497$as_echo "$ac_cv_header_stdc" >&6; }
4498if test $ac_cv_header_stdc = yes; then
4499
4500$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4501
4502fi
4503
4504# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4505for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4506 inttypes.h stdint.h unistd.h
4507do :
4508 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4509ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4510"
4511eval as_val=\$$as_ac_Header
4512 if test "x$as_val" = x""yes; then :
4513 cat >>confdefs.h <<_ACEOF
4514#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4515_ACEOF
4516
4517fi
4518
4519done
4520
4521
4522
4523 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4524if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4525 MINIX=yes
4526else
4527 MINIX=
4528fi
4529
4530
4531 if test "$MINIX" = yes; then
4532
4533$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4534
4535
4536$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4537
4538
4539$as_echo "#define _MINIX 1" >>confdefs.h
4540
4541 fi
4542
4543
4544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4545$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4546if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4547 $as_echo_n "(cached) " >&6
4548else
4549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4550/* end confdefs.h. */
4551
4552# define __EXTENSIONS__ 1
4553 $ac_includes_default
4554int
4555main ()
4556{
4557
4558 ;
4559 return 0;
4560}
4561_ACEOF
4562if ac_fn_c_try_compile "$LINENO"; then :
4563 ac_cv_safe_to_define___extensions__=yes
4564else
4565 ac_cv_safe_to_define___extensions__=no
4566fi
4567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4568fi
4569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4570$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4571 test $ac_cv_safe_to_define___extensions__ = yes &&
4572 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4573
4574 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4575
4576 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4577
4578 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4579
4580 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4581
4582
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004583
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004584# Check for unsupported systems
4585case $ac_sys_system/$ac_sys_release in
4586atheos*|Linux*/1*)
4587 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4588 echo See README for details.
4589 exit 1;;
4590esac
4591
4592
Matthias Kloseb9621712010-04-24 17:59:49 +00004593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4594$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004595
4596# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004597if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004598 withval=$with_suffix;
4599 case $withval in
4600 no) EXEEXT=;;
4601 yes) EXEEXT=.exe;;
4602 *) EXEEXT=$withval;;
4603 esac
4604fi
4605
Matthias Kloseb9621712010-04-24 17:59:49 +00004606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4607$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004608
4609# Test whether we're running on a non-case-sensitive system, in which
4610# case we give a warning if no ext is given
4611
Matthias Kloseb9621712010-04-24 17:59:49 +00004612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4613$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004614if test ! -d CaseSensitiveTestDir; then
4615mkdir CaseSensitiveTestDir
4616fi
4617
4618if test -d casesensitivetestdir
4619then
Matthias Kloseb9621712010-04-24 17:59:49 +00004620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4621$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004622 BUILDEXEEXT=.exe
4623else
Matthias Kloseb9621712010-04-24 17:59:49 +00004624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4625$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004626 BUILDEXEEXT=$EXEEXT
4627fi
4628rmdir CaseSensitiveTestDir
4629
4630case $MACHDEP in
4631bsdos*)
4632 case $CC in
4633 gcc) CC="$CC -D_HAVE_BSDI";;
4634 esac;;
4635esac
4636
4637case $ac_sys_system in
4638hp*|HP*)
4639 case $CC in
4640 cc|*/cc) CC="$CC -Ae";;
4641 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004642esac
4643
4644
4645
Matthias Kloseb9621712010-04-24 17:59:49 +00004646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4647$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004648if test -z "$LIBRARY"
4649then
4650 LIBRARY='libpython$(VERSION).a'
4651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4653$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004654
4655# LDLIBRARY is the name of the library to link against (as opposed to the
4656# name of the library into which to insert object files). BLDLIBRARY is also
4657# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4658# is blank as the main program is not linked directly against LDLIBRARY.
4659# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4660# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4661# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4662# DLLLIBRARY is the shared (i.e., DLL) library.
4663#
4664# RUNSHARED is used to run shared python without installed libraries
4665#
4666# INSTSONAME is the name of the shared library that will be use to install
4667# on the system - some systems like version suffix, others don't
4668
4669
4670
4671
4672
4673
4674LDLIBRARY="$LIBRARY"
4675BLDLIBRARY='$(LDLIBRARY)'
4676INSTSONAME='$(LDLIBRARY)'
4677DLLLIBRARY=''
4678LDLIBRARYDIR=''
4679RUNSHARED=''
4680
4681# LINKCC is the command that links the python executable -- default is $(CC).
4682# If CXX is set, and if it is needed to link a main function that was
4683# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4684# python might then depend on the C++ runtime
4685# This is altered for AIX in order to build the export list before
4686# linking.
4687
Matthias Kloseb9621712010-04-24 17:59:49 +00004688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4689$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004690if test -z "$LINKCC"
4691then
4692 LINKCC='$(PURIFY) $(MAINCC)'
4693 case $ac_sys_system in
4694 AIX*)
4695 exp_extra="\"\""
4696 if test $ac_sys_release -ge 5 -o \
4697 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4698 exp_extra="."
4699 fi
4700 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004701 QNX*)
4702 # qcc must be used because the other compilers do not
4703 # support -N.
4704 LINKCC=qcc;;
4705 esac
4706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4708$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004709
4710# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4711# make sure we default having it set to "no": this is used by
4712# distutils.unixccompiler to know if it should add --enable-new-dtags
4713# to linker command lines, and failing to detect GNU ld simply results
4714# in the same bahaviour as before.
4715
Matthias Kloseb9621712010-04-24 17:59:49 +00004716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4717$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004718ac_prog=ld
4719if test "$GCC" = yes; then
4720 ac_prog=`$CC -print-prog-name=ld`
4721fi
4722case `"$ac_prog" -V 2>&1 < /dev/null` in
4723 *GNU*)
4724 GNULD=yes;;
4725 *)
4726 GNULD=no;;
4727esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4729$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004730
Matthias Kloseb9621712010-04-24 17:59:49 +00004731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4732$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004733# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004734if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004735 enableval=$enable_shared;
4736fi
4737
4738
4739if test -z "$enable_shared"
4740then
4741 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004742 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004743 enable_shared="yes";;
4744 *)
4745 enable_shared="no";;
4746 esac
4747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4749$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004750
Matthias Kloseb9621712010-04-24 17:59:49 +00004751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4752$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004753# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004754if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004755 enableval=$enable_profiling; ac_save_cc="$CC"
4756 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004757 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004758 ac_enable_profiling="no"
4759else
Matthias Kloseb9621712010-04-24 17:59:49 +00004760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004761/* end confdefs.h. */
4762int main() { return 0; }
4763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004764if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004765 ac_enable_profiling="yes"
4766else
Matthias Kloseb9621712010-04-24 17:59:49 +00004767 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4770 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004771fi
4772
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004773 CC="$ac_save_cc"
4774fi
4775
Matthias Kloseb9621712010-04-24 17:59:49 +00004776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4777$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004778
4779case "$ac_enable_profiling" in
4780 "yes")
4781 BASECFLAGS="-pg $BASECFLAGS"
4782 LDFLAGS="-pg $LDFLAGS"
4783 ;;
4784esac
4785
Matthias Kloseb9621712010-04-24 17:59:49 +00004786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4787$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004788
4789# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4790# library that we build, but we do not want to link against it (we
4791# will find it with a -framework option). For this reason there is an
4792# extra variable BLDLIBRARY against which Python and the extension
4793# modules are linked, BLDLIBRARY. This is normally the same as
4794# LDLIBRARY, but empty for MacOSX framework builds.
4795if test "$enable_framework"
4796then
4797 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4798 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4799 BLDLIBRARY=''
4800else
4801 BLDLIBRARY='$(LDLIBRARY)'
4802fi
4803
4804# Other platforms follow
4805if test $enable_shared = "yes"; then
4806
Matthias Kloseb9621712010-04-24 17:59:49 +00004807$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004808
4809 case $ac_sys_system in
4810 CYGWIN*)
4811 LDLIBRARY='libpython$(VERSION).dll.a'
4812 DLLLIBRARY='libpython$(VERSION).dll'
4813 ;;
4814 SunOS*)
4815 LDLIBRARY='libpython$(VERSION).so'
4816 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4817 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4818 INSTSONAME="$LDLIBRARY".$SOVERSION
4819 ;;
4820 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4821 LDLIBRARY='libpython$(VERSION).so'
4822 BLDLIBRARY='-L. -lpython$(VERSION)'
4823 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4824 case $ac_sys_system in
4825 FreeBSD*)
4826 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4827 ;;
4828 esac
4829 INSTSONAME="$LDLIBRARY".$SOVERSION
4830 ;;
4831 hp*|HP*)
4832 case `uname -m` in
4833 ia64)
4834 LDLIBRARY='libpython$(VERSION).so'
4835 ;;
4836 *)
4837 LDLIBRARY='libpython$(VERSION).sl'
4838 ;;
4839 esac
4840 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4841 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4842 ;;
4843 OSF*)
4844 LDLIBRARY='libpython$(VERSION).so'
4845 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4846 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4847 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848 Darwin*)
4849 LDLIBRARY='libpython$(VERSION).dylib'
4850 BLDLIBRARY='-L. -lpython$(VERSION)'
4851 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4852 ;;
4853
4854 esac
4855else # shared is disabled
4856 case $ac_sys_system in
4857 CYGWIN*)
4858 BLDLIBRARY='$(LIBRARY)'
4859 LDLIBRARY='libpython$(VERSION).dll.a'
4860 ;;
4861 esac
4862fi
4863
Matthias Kloseb9621712010-04-24 17:59:49 +00004864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4865$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004866
4867if test -n "$ac_tool_prefix"; then
4868 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4869set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4871$as_echo_n "checking for $ac_word... " >&6; }
4872if test "${ac_cv_prog_RANLIB+set}" = set; then :
4873 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004874else
4875 if test -n "$RANLIB"; then
4876 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4877else
4878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4879for as_dir in $PATH
4880do
4881 IFS=$as_save_IFS
4882 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004883 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004884 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4885 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004887 break 2
4888 fi
4889done
Matthias Kloseb9621712010-04-24 17:59:49 +00004890 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004891IFS=$as_save_IFS
4892
4893fi
4894fi
4895RANLIB=$ac_cv_prog_RANLIB
4896if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4898$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004899else
Matthias Kloseb9621712010-04-24 17:59:49 +00004900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4901$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004902fi
4903
4904
4905fi
4906if test -z "$ac_cv_prog_RANLIB"; then
4907 ac_ct_RANLIB=$RANLIB
4908 # Extract the first word of "ranlib", so it can be a program name with args.
4909set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4911$as_echo_n "checking for $ac_word... " >&6; }
4912if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4913 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004914else
4915 if test -n "$ac_ct_RANLIB"; then
4916 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4917else
4918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4919for as_dir in $PATH
4920do
4921 IFS=$as_save_IFS
4922 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004923 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004924 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4925 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927 break 2
4928 fi
4929done
Matthias Kloseb9621712010-04-24 17:59:49 +00004930 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004931IFS=$as_save_IFS
4932
4933fi
4934fi
4935ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4936if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4938$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004939else
Matthias Kloseb9621712010-04-24 17:59:49 +00004940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4941$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004942fi
4943
4944 if test "x$ac_ct_RANLIB" = x; then
4945 RANLIB=":"
4946 else
4947 case $cross_compiling:$ac_tool_warned in
4948yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00004949{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4950$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951ac_tool_warned=yes ;;
4952esac
4953 RANLIB=$ac_ct_RANLIB
4954 fi
4955else
4956 RANLIB="$ac_cv_prog_RANLIB"
4957fi
4958
4959
4960for ac_prog in ar aal
4961do
4962 # Extract the first word of "$ac_prog", so it can be a program name with args.
4963set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4965$as_echo_n "checking for $ac_word... " >&6; }
4966if test "${ac_cv_prog_AR+set}" = set; then :
4967 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968else
4969 if test -n "$AR"; then
4970 ac_cv_prog_AR="$AR" # Let the user override the test.
4971else
4972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4973for as_dir in $PATH
4974do
4975 IFS=$as_save_IFS
4976 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004977 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4979 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981 break 2
4982 fi
4983done
Matthias Kloseb9621712010-04-24 17:59:49 +00004984 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004985IFS=$as_save_IFS
4986
4987fi
4988fi
4989AR=$ac_cv_prog_AR
4990if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4992$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004993else
Matthias Kloseb9621712010-04-24 17:59:49 +00004994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4995$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996fi
4997
4998
4999 test -n "$AR" && break
5000done
5001test -n "$AR" || AR="ar"
5002
5003
5004# tweak ARFLAGS only if the user didn't set it on the command line
5005
5006if test -z "$ARFLAGS"
5007then
5008 ARFLAGS="rc"
5009fi
5010
5011
5012# Extract the first word of "svnversion", so it can be a program name with args.
5013set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5015$as_echo_n "checking for $ac_word... " >&6; }
5016if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5017 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018else
5019 if test -n "$SVNVERSION"; then
5020 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5021else
5022as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5023for as_dir in $PATH
5024do
5025 IFS=$as_save_IFS
5026 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005027 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005028 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5029 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005030 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005031 break 2
5032 fi
5033done
Matthias Kloseb9621712010-04-24 17:59:49 +00005034 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005035IFS=$as_save_IFS
5036
5037 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5038fi
5039fi
5040SVNVERSION=$ac_cv_prog_SVNVERSION
5041if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5043$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044else
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5046$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005047fi
5048
5049
5050if test $SVNVERSION = found
5051then
5052 SVNVERSION="svnversion \$(srcdir)"
5053else
5054 SVNVERSION="echo Unversioned directory"
5055fi
5056
5057case $MACHDEP in
5058bsdos*|hp*|HP*)
5059 # install -d does not work on BSDI or HP-UX
5060 if test -z "$INSTALL"
5061 then
5062 INSTALL="${srcdir}/install-sh -c"
5063 fi
5064esac
5065ac_aux_dir=
5066for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 for ac_t in install-sh install.sh shtool; do
5068 if test -f "$ac_dir/$ac_t"; then
5069 ac_aux_dir=$ac_dir
5070 ac_install_sh="$ac_aux_dir/$ac_t -c"
5071 break 2
5072 fi
5073 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074done
5075if test -z "$ac_aux_dir"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077fi
5078
5079# These three variables are undocumented and unsupported,
5080# and are intended to be withdrawn in a future Autoconf release.
5081# They can cause serious problems if a builder's source tree is in a directory
5082# whose full name contains unusual characters.
5083ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5084ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5085ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5086
5087
5088# Find a good install program. We prefer a C program (faster),
5089# so one script is as good as another. But avoid the broken or
5090# incompatible versions:
5091# SysV /etc/install, /usr/sbin/install
5092# SunOS /usr/etc/install
5093# IRIX /sbin/install
5094# AIX /bin/install
5095# AmigaOS /C/install, which installs bootblocks on floppy discs
5096# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5097# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5098# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5099# OS/2's system install, which has a completely different semantic
5100# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005101# Reject install programs that cannot install multiple files.
5102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5103$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005104if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005105if test "${ac_cv_path_install+set}" = set; then :
5106 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005107else
5108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5109for as_dir in $PATH
5110do
5111 IFS=$as_save_IFS
5112 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 # Account for people who put trailing slashes in PATH elements.
5114case $as_dir/ in #((
5115 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005116 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005117 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005118 /usr/ucb/* ) ;;
5119 *)
5120 # OSF1 and SCO ODT 3.0 have their own names for install.
5121 # Don't use installbsd from OSF since it installs stuff as root
5122 # by default.
5123 for ac_prog in ginstall scoinst install; do
5124 for ac_exec_ext in '' $ac_executable_extensions; do
5125 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5126 if test $ac_prog = install &&
5127 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5128 # AIX install. It has an incompatible calling convention.
5129 :
5130 elif test $ac_prog = install &&
5131 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5132 # program-specific install script used by HP pwplus--don't use.
5133 :
5134 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005135 rm -rf conftest.one conftest.two conftest.dir
5136 echo one > conftest.one
5137 echo two > conftest.two
5138 mkdir conftest.dir
5139 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5140 test -s conftest.one && test -s conftest.two &&
5141 test -s conftest.dir/conftest.one &&
5142 test -s conftest.dir/conftest.two
5143 then
5144 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5145 break 3
5146 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005147 fi
5148 fi
5149 done
5150 done
5151 ;;
5152esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005153
5154 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005155IFS=$as_save_IFS
5156
Matthias Kloseb9621712010-04-24 17:59:49 +00005157rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005158
5159fi
5160 if test "${ac_cv_path_install+set}" = set; then
5161 INSTALL=$ac_cv_path_install
5162 else
5163 # As a last resort, use the slow shell script. Don't cache a
5164 # value for INSTALL within a source directory, because that will
5165 # break other packages using the cache if that directory is
5166 # removed, or if the value is a relative name.
5167 INSTALL=$ac_install_sh
5168 fi
5169fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5171$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005172
5173# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5174# It thinks the first close brace ends the variable substitution.
5175test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5176
5177test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5178
5179test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5180
5181
5182# Not every filesystem supports hard links
5183
5184if test -z "$LN" ; then
5185 case $ac_sys_system in
5186 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005187 *) LN=ln;;
5188 esac
5189fi
5190
5191# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5193$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005194
5195# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005196if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197 withval=$with_pydebug;
5198if test "$withval" != no
5199then
5200
Matthias Kloseb9621712010-04-24 17:59:49 +00005201$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005202
Matthias Kloseb9621712010-04-24 17:59:49 +00005203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5204$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005205 Py_DEBUG='true'
Matthias Kloseb9621712010-04-24 17:59:49 +00005206else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5207$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005208fi
5209else
Matthias Kloseb9621712010-04-24 17:59:49 +00005210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5211$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005212fi
5213
5214
5215# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5216# merged with this chunk of code?
5217
5218# Optimizer/debugger flags
5219# ------------------------
5220# (The following bit of code is complicated enough - please keep things
5221# indented properly. Just pretend you're editing Python code. ;-)
5222
5223# There are two parallel sets of case statements below, one that checks to
5224# see if OPT was set and one that does BASECFLAGS setting based upon
5225# compiler and platform. BASECFLAGS tweaks need to be made even if the
5226# user set OPT.
5227
5228# tweak OPT based on compiler and platform, only if the user didn't set
5229# it on the command line
5230
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005231if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005232then
5233 case $GCC in
5234 yes)
5235 if test "$CC" != 'g++' ; then
5236 STRICT_PROTO="-Wstrict-prototypes"
5237 fi
5238 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5239 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5240 WRAP="-fwrapv"
5241 fi
5242 case $ac_cv_prog_cc_g in
5243 yes)
5244 if test "$Py_DEBUG" = 'true' ; then
5245 # Optimization messes up debuggers, so turn it off for
5246 # debug builds.
5247 OPT="-g -Wall $STRICT_PROTO"
5248 else
5249 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5250 fi
5251 ;;
5252 *)
5253 OPT="-O3 -Wall $STRICT_PROTO"
5254 ;;
5255 esac
5256 case $ac_sys_system in
5257 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5258 ;;
5259 esac
5260 ;;
5261
5262 *)
5263 OPT="-O"
5264 ;;
5265 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005266fi
5267
5268
5269
5270# The -arch flags for universal builds on OSX
5271UNIVERSAL_ARCH_FLAGS=
5272
5273
5274# tweak BASECFLAGS based on compiler and platform
5275case $GCC in
5276yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005277 # Python doesn't violate C99 aliasing rules, but older versions of
5278 # GCC produce warnings for legal Python code. Enable
5279 # -fno-strict-aliasing on versions of GCC that support but produce
5280 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5282$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005283 ac_save_cc="$CC"
5284 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005285 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005286 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5287 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005288else
Matthias Kloseb9621712010-04-24 17:59:49 +00005289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005290/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005291
5292int
5293main ()
5294{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005295int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005296 ;
5297 return 0;
5298}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005300if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005301 CC="$ac_save_cc -fstrict-aliasing"
5302 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
Matthias Kloseb9621712010-04-24 17:59:49 +00005303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005304/* end confdefs.h. */
5305
5306int
5307main ()
5308{
5309void f(int **x) {} int main() { double *x; f((int **) &x); return 0; }
5310 ;
5311 return 0;
5312}
5313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005314if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005315 ac_cv_no_strict_aliasing=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005316else
Matthias Kloseb9621712010-04-24 17:59:49 +00005317 ac_cv_no_strict_aliasing=yes
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005318fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5320else
Matthias Kloseb9621712010-04-24 17:59:49 +00005321 ac_cv_no_strict_aliasing=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005322fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005324fi
5325
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005326 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005327 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5329$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005330 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005331 then
5332 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5333 fi
5334
5335 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5336 # support. Without this, treatment of subnormals doesn't follow
5337 # the standard.
5338 case $ac_sys_machine in
5339 alpha*)
5340 BASECFLAGS="$BASECFLAGS -mieee"
5341 ;;
5342 esac
5343
5344 case $ac_sys_system in
5345 SCO_SV*)
5346 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5347 ;;
5348 # is there any other compiler on Darwin besides gcc?
5349 Darwin*)
5350 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5351 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005352 if test "${CC}" = gcc
5353 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5355$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005356 case "${UNIVERSALSDK}" in
5357 */MacOSX10.4u.sdk)
5358 # Build using 10.4 SDK, force usage of gcc when the
5359 # compiler is gcc, otherwise the user will get very
5360 # confusing error messages when building on OSX 10.6
5361 CC=gcc-4.0
5362 CPP=cpp-4.0
5363 ;;
5364 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5366$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005367 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368
5369
5370 if test "${enable_universalsdk}"; then
5371 UNIVERSAL_ARCH_FLAGS=""
5372 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5373 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5374 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005375 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005376 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5377 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005378 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005379 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380
5381 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5382 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005383 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005384 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005385
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005386 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5387 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005388 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005389 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005390
5391 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5392 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005393 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005394 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005395
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005396 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005397 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 +00005398
5399 fi
5400
5401
Ronald Oussoren666028b2010-04-18 19:07:43 +00005402 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5403 if test "${UNIVERSALSDK}" != "/"
5404 then
5405 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5406 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005407 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408 fi
5409 fi
5410
5411 # Calculate the right deployment target for this build.
5412 #
5413 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5414 if test ${cur_target} '>' 10.2; then
5415 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005416 if test ${enable_universalsdk}; then
5417 if test "${UNIVERSAL_ARCHS}" = "all"; then
5418 # Ensure that the default platform for a
5419 # 4-way universal build is OSX 10.5,
5420 # that's the first OS release where
5421 # 4-way builds make sense.
5422 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005423
5424 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5425 cur_target='10.5'
5426
5427 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5428 cur_target='10.5'
5429
5430 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5431 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005432 fi
5433 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005434 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005435 # On Intel macs default to a deployment
5436 # target of 10.4, that's the first OSX
5437 # release with Intel support.
5438 cur_target="10.4"
5439 fi
5440 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005441 fi
5442 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5443
5444 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5445 # environment with a value that is the same as what we'll use
5446 # in the Makefile to ensure that we'll get the same compiler
5447 # environment during configure and build time.
5448 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5449 export MACOSX_DEPLOYMENT_TARGET
5450 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5451
5452 ;;
5453 OSF*)
5454 BASECFLAGS="$BASECFLAGS -mieee"
5455 ;;
5456 esac
5457 ;;
5458
5459*)
5460 case $ac_sys_system in
5461 OpenUNIX*|UnixWare*)
5462 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5463 ;;
5464 OSF*)
5465 BASECFLAGS="$BASECFLAGS -ieee -std"
5466 ;;
5467 SCO_SV*)
5468 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5469 ;;
5470 esac
5471 ;;
5472esac
5473
5474if test "$Py_DEBUG" = 'true'; then
5475 :
5476else
5477 OPT="-DNDEBUG $OPT"
5478fi
5479
5480if test "$ac_arch_flags"
5481then
5482 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5483fi
5484
5485# disable check for icc since it seems to pass, but generates a warning
5486if test "$CC" = icc
5487then
5488 ac_cv_opt_olimit_ok=no
5489fi
5490
Matthias Kloseb9621712010-04-24 17:59:49 +00005491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5492$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5493if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5494 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005495else
5496 ac_save_cc="$CC"
5497CC="$CC -OPT:Olimit=0"
Matthias Kloseb9621712010-04-24 17:59:49 +00005498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005500
5501int
5502main ()
5503{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005504int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005505 ;
5506 return 0;
5507}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005509if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510 ac_cv_opt_olimit_ok=yes
5511else
Matthias Kloseb9621712010-04-24 17:59:49 +00005512 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005513fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005515CC="$ac_save_cc"
5516fi
5517
Matthias Kloseb9621712010-04-24 17:59:49 +00005518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5519$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005520if test $ac_cv_opt_olimit_ok = yes; then
5521 case $ac_sys_system in
5522 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5523 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5524 # environment?
5525 Darwin*)
5526 ;;
5527 *)
5528 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5529 ;;
5530 esac
5531else
Matthias Kloseb9621712010-04-24 17:59:49 +00005532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5533$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5534 if test "${ac_cv_olimit_ok+set}" = set; then :
5535 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536else
5537 ac_save_cc="$CC"
5538 CC="$CC -Olimit 1500"
Matthias Kloseb9621712010-04-24 17:59:49 +00005539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005540/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005541
5542int
5543main ()
5544{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005546 ;
5547 return 0;
5548}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005550if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005551 ac_cv_olimit_ok=yes
5552else
Matthias Kloseb9621712010-04-24 17:59:49 +00005553 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005556 CC="$ac_save_cc"
5557fi
5558
Matthias Kloseb9621712010-04-24 17:59:49 +00005559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5560$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005561 if test $ac_cv_olimit_ok = yes; then
5562 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5563 fi
5564fi
5565
5566# Check whether GCC supports PyArg_ParseTuple format
5567if test "$GCC" = "yes"
5568then
Matthias Kloseb9621712010-04-24 17:59:49 +00005569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5570$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005571 save_CFLAGS=$CFLAGS
5572 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005574/* end confdefs.h. */
5575
5576 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5577
5578int
5579main ()
5580{
5581
5582 ;
5583 return 0;
5584}
5585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005586if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587
Matthias Kloseb9621712010-04-24 17:59:49 +00005588$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005589
Matthias Kloseb9621712010-04-24 17:59:49 +00005590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5591$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592else
Matthias Kloseb9621712010-04-24 17:59:49 +00005593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5594$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005595
5596fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5598 CFLAGS=$save_CFLAGS
5599fi
5600
5601# On some compilers, pthreads are available without further options
5602# (e.g. MacOS X). On some of these systems, the compiler will not
5603# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5604# So we have to see first whether pthreads are available without
5605# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5607$as_echo_n "checking whether pthreads are available without options... " >&6; }
5608if test "${ac_cv_pthread_is_default+set}" = set; then :
5609 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610else
Matthias Kloseb9621712010-04-24 17:59:49 +00005611 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612 ac_cv_pthread_is_default=no
5613else
Matthias Kloseb9621712010-04-24 17:59:49 +00005614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005615/* end confdefs.h. */
5616
5617#include <pthread.h>
5618
5619void* routine(void* p){return NULL;}
5620
5621int main(){
5622 pthread_t p;
5623 if(pthread_create(&p,NULL,routine,NULL)!=0)
5624 return 1;
5625 (void)pthread_detach(p);
5626 return 0;
5627}
5628
5629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005630if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631
5632 ac_cv_pthread_is_default=yes
5633 ac_cv_kthread=no
5634 ac_cv_pthread=no
5635
5636else
Matthias Kloseb9621712010-04-24 17:59:49 +00005637 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005639rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5640 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641fi
5642
5643
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644fi
5645
Matthias Kloseb9621712010-04-24 17:59:49 +00005646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5647$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648
5649
5650if test $ac_cv_pthread_is_default = yes
5651then
5652 ac_cv_kpthread=no
5653else
5654# -Kpthread, if available, provides the right #defines
5655# and linker options to make pthread_create available
5656# Some compilers won't report that they do not support -Kpthread,
5657# so we need to run a program to see whether it really made the
5658# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5660$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5661if test "${ac_cv_kpthread+set}" = set; then :
5662 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663else
5664 ac_save_cc="$CC"
5665CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005666if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667 ac_cv_kpthread=no
5668else
Matthias Kloseb9621712010-04-24 17:59:49 +00005669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670/* end confdefs.h. */
5671
5672#include <pthread.h>
5673
5674void* routine(void* p){return NULL;}
5675
5676int main(){
5677 pthread_t p;
5678 if(pthread_create(&p,NULL,routine,NULL)!=0)
5679 return 1;
5680 (void)pthread_detach(p);
5681 return 0;
5682}
5683
5684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005685if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686 ac_cv_kpthread=yes
5687else
Matthias Kloseb9621712010-04-24 17:59:49 +00005688 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005690rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5691 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692fi
5693
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694CC="$ac_save_cc"
5695fi
5696
Matthias Kloseb9621712010-04-24 17:59:49 +00005697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5698$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699fi
5700
5701if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5702then
5703# -Kthread, if available, provides the right #defines
5704# and linker options to make pthread_create available
5705# Some compilers won't report that they do not support -Kthread,
5706# so we need to run a program to see whether it really made the
5707# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5709$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5710if test "${ac_cv_kthread+set}" = set; then :
5711 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712else
5713 ac_save_cc="$CC"
5714CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005715if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716 ac_cv_kthread=no
5717else
Matthias Kloseb9621712010-04-24 17:59:49 +00005718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719/* end confdefs.h. */
5720
5721#include <pthread.h>
5722
5723void* routine(void* p){return NULL;}
5724
5725int main(){
5726 pthread_t p;
5727 if(pthread_create(&p,NULL,routine,NULL)!=0)
5728 return 1;
5729 (void)pthread_detach(p);
5730 return 0;
5731}
5732
5733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005734if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735 ac_cv_kthread=yes
5736else
Matthias Kloseb9621712010-04-24 17:59:49 +00005737 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005739rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5740 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741fi
5742
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743CC="$ac_save_cc"
5744fi
5745
Matthias Kloseb9621712010-04-24 17:59:49 +00005746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5747$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748fi
5749
5750if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5751then
5752# -pthread, if available, provides the right #defines
5753# and linker options to make pthread_create available
5754# Some compilers won't report that they do not support -pthread,
5755# so we need to run a program to see whether it really made the
5756# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5758$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5759if test "${ac_cv_thread+set}" = set; then :
5760 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761else
5762 ac_save_cc="$CC"
5763CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005764if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765 ac_cv_pthread=no
5766else
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768/* end confdefs.h. */
5769
5770#include <pthread.h>
5771
5772void* routine(void* p){return NULL;}
5773
5774int main(){
5775 pthread_t p;
5776 if(pthread_create(&p,NULL,routine,NULL)!=0)
5777 return 1;
5778 (void)pthread_detach(p);
5779 return 0;
5780}
5781
5782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005783if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784 ac_cv_pthread=yes
5785else
Matthias Kloseb9621712010-04-24 17:59:49 +00005786 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5789 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790fi
5791
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792CC="$ac_save_cc"
5793fi
5794
Matthias Kloseb9621712010-04-24 17:59:49 +00005795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5796$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797fi
5798
5799# If we have set a CC compiler flag for thread support then
5800# check if it works for CXX, too.
5801ac_cv_cxx_thread=no
5802if test ! -z "$CXX"
5803then
Matthias Kloseb9621712010-04-24 17:59:49 +00005804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5805$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806ac_save_cxx="$CXX"
5807
5808if test "$ac_cv_kpthread" = "yes"
5809then
5810 CXX="$CXX -Kpthread"
5811 ac_cv_cxx_thread=yes
5812elif test "$ac_cv_kthread" = "yes"
5813then
5814 CXX="$CXX -Kthread"
5815 ac_cv_cxx_thread=yes
5816elif test "$ac_cv_pthread" = "yes"
5817then
5818 CXX="$CXX -pthread"
5819 ac_cv_cxx_thread=yes
5820fi
5821
5822if test $ac_cv_cxx_thread = yes
5823then
5824 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5825 $CXX -c conftest.$ac_ext 2>&5
5826 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5827 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5828 then
5829 ac_cv_cxx_thread=yes
5830 else
5831 ac_cv_cxx_thread=no
5832 fi
5833 rm -fr conftest*
5834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5836$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837fi
5838CXX="$ac_save_cxx"
5839
5840
5841# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5843$as_echo_n "checking for ANSI C header files... " >&6; }
5844if test "${ac_cv_header_stdc+set}" = set; then :
5845 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846else
Matthias Kloseb9621712010-04-24 17:59:49 +00005847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848/* end confdefs.h. */
5849#include <stdlib.h>
5850#include <stdarg.h>
5851#include <string.h>
5852#include <float.h>
5853
5854int
5855main ()
5856{
5857
5858 ;
5859 return 0;
5860}
5861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005862if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863 ac_cv_header_stdc=yes
5864else
Matthias Kloseb9621712010-04-24 17:59:49 +00005865 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5868
5869if test $ac_cv_header_stdc = yes; then
5870 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872/* end confdefs.h. */
5873#include <string.h>
5874
5875_ACEOF
5876if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005877 $EGREP "memchr" >/dev/null 2>&1; then :
5878
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879else
5880 ac_cv_header_stdc=no
5881fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005882rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883
5884fi
5885
5886if test $ac_cv_header_stdc = yes; then
5887 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889/* end confdefs.h. */
5890#include <stdlib.h>
5891
5892_ACEOF
5893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005894 $EGREP "free" >/dev/null 2>&1; then :
5895
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896else
5897 ac_cv_header_stdc=no
5898fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005899rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900
5901fi
5902
5903if test $ac_cv_header_stdc = yes; then
5904 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005905 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 :
5907else
Matthias Kloseb9621712010-04-24 17:59:49 +00005908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909/* end confdefs.h. */
5910#include <ctype.h>
5911#include <stdlib.h>
5912#if ((' ' & 0x0FF) == 0x020)
5913# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5914# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5915#else
5916# define ISLOWER(c) \
5917 (('a' <= (c) && (c) <= 'i') \
5918 || ('j' <= (c) && (c) <= 'r') \
5919 || ('s' <= (c) && (c) <= 'z'))
5920# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5921#endif
5922
5923#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5924int
5925main ()
5926{
5927 int i;
5928 for (i = 0; i < 256; i++)
5929 if (XOR (islower (i), ISLOWER (i))
5930 || toupper (i) != TOUPPER (i))
5931 return 2;
5932 return 0;
5933}
5934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005935if ac_fn_c_try_run "$LINENO"; then :
5936
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937else
Matthias Kloseb9621712010-04-24 17:59:49 +00005938 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005940rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5941 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942fi
5943
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944fi
5945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5947$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948if test $ac_cv_header_stdc = yes; then
5949
Matthias Kloseb9621712010-04-24 17:59:49 +00005950$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951
5952fi
5953
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005954for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5955fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005956ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005957shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005958unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005959sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5960sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005961sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005962sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005963sys/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 +00005964sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00005965bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005966do :
5967 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5968ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5969eval as_val=\$$as_ac_Header
5970 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00005971 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005972#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005973_ACEOF
5974
5975fi
5976
Guido van Rossum627b2d71993-12-24 10:39:16 +00005977done
5978
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005979ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005980for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00005981 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
5983$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
5984if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
5985 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005986else
Matthias Kloseb9621712010-04-24 17:59:49 +00005987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00005988/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005989#include <sys/types.h>
5990#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005991
Martin v. Löwis11437992002-04-12 09:54:03 +00005992int
5993main ()
5994{
5995if ((DIR *) 0)
5996return 0;
5997 ;
5998 return 0;
5999}
6000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006001if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006002 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006003else
Matthias Kloseb9621712010-04-24 17:59:49 +00006004 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006008eval ac_res=\$$as_ac_Header
6009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6010$as_echo "$ac_res" >&6; }
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_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006015_ACEOF
6016
6017ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006018fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006019
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006020done
6021# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6022if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6024$as_echo_n "checking for library containing opendir... " >&6; }
6025if test "${ac_cv_search_opendir+set}" = set; then :
6026 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006027else
Martin v. Löwis11437992002-04-12 09:54:03 +00006028 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006030/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006032/* Override any GCC internal prototype to avoid an error.
6033 Use char because int might match the return type of a GCC
6034 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006035#ifdef __cplusplus
6036extern "C"
6037#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006038char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006039int
6040main ()
6041{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006042return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006043 ;
6044 return 0;
6045}
6046_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006047for ac_lib in '' dir; do
6048 if test -z "$ac_lib"; then
6049 ac_res="none required"
6050 else
6051 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006052 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006053 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006054 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006055 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006057rm -f core conftest.err conftest.$ac_objext \
6058 conftest$ac_exeext
6059 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006060 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006062done
Matthias Kloseb9621712010-04-24 17:59:49 +00006063if test "${ac_cv_search_opendir+set}" = set; then :
6064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006065else
6066 ac_cv_search_opendir=no
6067fi
6068rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006069LIBS=$ac_func_search_save_LIBS
6070fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6072$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006073ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006074if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006075 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006076
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006077fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006078
Michael W. Hudson54241132001-12-07 15:38:26 +00006079else
Matthias Kloseb9621712010-04-24 17:59:49 +00006080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6081$as_echo_n "checking for library containing opendir... " >&6; }
6082if test "${ac_cv_search_opendir+set}" = set; then :
6083 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006084else
6085 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006087/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006088
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006089/* Override any GCC internal prototype to avoid an error.
6090 Use char because int might match the return type of a GCC
6091 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006092#ifdef __cplusplus
6093extern "C"
6094#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006095char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006096int
6097main ()
6098{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006099return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006100 ;
6101 return 0;
6102}
6103_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006104for ac_lib in '' x; do
6105 if test -z "$ac_lib"; then
6106 ac_res="none required"
6107 else
6108 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006109 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006110 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006111 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006112 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006114rm -f core conftest.err conftest.$ac_objext \
6115 conftest$ac_exeext
6116 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006117 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006119done
Matthias Kloseb9621712010-04-24 17:59:49 +00006120if test "${ac_cv_search_opendir+set}" = set; then :
6121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006122else
6123 ac_cv_search_opendir=no
6124fi
6125rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006126LIBS=$ac_func_search_save_LIBS
6127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6129$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006130ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006131if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006132 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006133
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006134fi
6135
6136fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006137
Matthias Kloseb9621712010-04-24 17:59:49 +00006138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6139$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6140if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6141 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006142else
Matthias Kloseb9621712010-04-24 17:59:49 +00006143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006144/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006145#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006146int
6147main ()
6148{
6149return makedev(0, 0);
6150 ;
6151 return 0;
6152}
6153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006154if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006155 ac_cv_header_sys_types_h_makedev=yes
6156else
Matthias Kloseb9621712010-04-24 17:59:49 +00006157 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006159rm -f core conftest.err conftest.$ac_objext \
6160 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006161
6162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6164$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006165
6166if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006167ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6168if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006169
Matthias Kloseb9621712010-04-24 17:59:49 +00006170$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006171
6172fi
6173
6174
6175
6176 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006177 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6178if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006179
Matthias Kloseb9621712010-04-24 17:59:49 +00006180$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006181
6182fi
6183
6184
6185 fi
6186fi
6187
Michael W. Hudson54241132001-12-07 15:38:26 +00006188
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006189# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006190for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006191do :
6192 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006193#ifdef HAVE_CURSES_H
6194#include <curses.h>
6195#endif
6196
Matthias Kloseb9621712010-04-24 17:59:49 +00006197"
6198if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006199 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006200#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006201_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006202
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006203fi
6204
6205done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006206
6207
Martin v. Löwis11017b12006-01-14 18:12:57 +00006208# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006209for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006210do :
6211 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 +00006212#ifdef HAVE_ASM_TYPES_H
6213#include <asm/types.h>
6214#endif
6215#ifdef HAVE_SYS_SOCKET_H
6216#include <sys/socket.h>
6217#endif
6218
Matthias Kloseb9621712010-04-24 17:59:49 +00006219"
6220if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006221 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006222#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006223_ACEOF
6224
6225fi
6226
6227done
6228
6229
Guido van Rossum627b2d71993-12-24 10:39:16 +00006230# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006231was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6233$as_echo_n "checking for clock_t in time.h... " >&6; }
6234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006235/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006236#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006237
6238_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006239if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006240 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006241 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006242else
Martin v. Löwis11437992002-04-12 09:54:03 +00006243
6244
Matthias Kloseb9621712010-04-24 17:59:49 +00006245$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006246
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006247
Guido van Rossum627b2d71993-12-24 10:39:16 +00006248fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006249rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006250
Matthias Kloseb9621712010-04-24 17:59:49 +00006251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6252$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006253
Neal Norwitz11690112002-07-30 01:08:28 +00006254# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6256$as_echo_n "checking for makedev... " >&6; }
6257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006258/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006259#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006260int
6261main ()
6262{
6263 makedev(0, 0)
6264 ;
6265 return 0;
6266}
6267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006268if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006269 ac_cv_has_makedev=yes
6270else
Matthias Kloseb9621712010-04-24 17:59:49 +00006271 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006272fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006273rm -f core conftest.err conftest.$ac_objext \
6274 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006275if test "$ac_cv_has_makedev" = "no"; then
6276 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006278/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006279
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006280#define _OSF_SOURCE 1
6281#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006282
Neal Norwitz11690112002-07-30 01:08:28 +00006283int
6284main ()
6285{
6286 makedev(0, 0)
6287 ;
6288 return 0;
6289}
6290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006291if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006292 ac_cv_has_makedev=yes
6293else
Matthias Kloseb9621712010-04-24 17:59:49 +00006294 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006296rm -f core conftest.err conftest.$ac_objext \
6297 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006298 if test "$ac_cv_has_makedev" = "yes"; then
6299
Matthias Kloseb9621712010-04-24 17:59:49 +00006300$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006301
6302 fi
6303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6305$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006306if test "$ac_cv_has_makedev" = "yes"; then
6307
Matthias Kloseb9621712010-04-24 17:59:49 +00006308$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006309
6310fi
6311
Martin v. Löwis399a6892002-10-04 10:22:02 +00006312# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6313# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6314# defined, but the compiler does not support pragma redefine_extname,
6315# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6316# structures (such as rlimit64) without declaring them. As a
6317# work-around, disable LFS on such configurations
6318
6319use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6321$as_echo_n "checking Solaris LFS bug... " >&6; }
6322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006323/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006324
6325#define _LARGEFILE_SOURCE 1
6326#define _FILE_OFFSET_BITS 64
6327#include <sys/resource.h>
6328
Martin v. Löwis399a6892002-10-04 10:22:02 +00006329int
6330main ()
6331{
6332struct rlimit foo;
6333 ;
6334 return 0;
6335}
6336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006337if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006338 sol_lfs_bug=no
6339else
Matthias Kloseb9621712010-04-24 17:59:49 +00006340 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6344$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006345if test "$sol_lfs_bug" = "yes"; then
6346 use_lfs=no
6347fi
6348
6349if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006350# Two defines needed to enable largefile support on various platforms
6351# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006352
Matthias Kloseb9621712010-04-24 17:59:49 +00006353$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006354
6355
Matthias Kloseb9621712010-04-24 17:59:49 +00006356$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006357
Martin v. Löwis399a6892002-10-04 10:22:02 +00006358fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006359
Guido van Rossum84e7b241996-08-19 21:59:00 +00006360# Add some code to confdefs.h so that the test for off_t works on SCO
6361cat >> confdefs.h <<\EOF
6362#if defined(SCO_DS)
6363#undef _OFF_T
6364#endif
6365EOF
6366
Guido van Rossumef2255b2000-03-10 22:30:29 +00006367# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006368ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6369if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006370
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006371else
Martin v. Löwis11437992002-04-12 09:54:03 +00006372
6373cat >>confdefs.h <<_ACEOF
6374#define mode_t int
6375_ACEOF
6376
6377fi
6378
Matthias Kloseb9621712010-04-24 17:59:49 +00006379ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6380if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006381
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006382else
Martin v. Löwis11437992002-04-12 09:54:03 +00006383
6384cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006385#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006386_ACEOF
6387
6388fi
6389
Matthias Kloseb9621712010-04-24 17:59:49 +00006390ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6391if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006392
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006393else
Martin v. Löwis11437992002-04-12 09:54:03 +00006394
6395cat >>confdefs.h <<_ACEOF
6396#define pid_t int
6397_ACEOF
6398
6399fi
6400
Matthias Kloseb9621712010-04-24 17:59:49 +00006401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
6402$as_echo_n "checking return type of signal handlers... " >&6; }
6403if test "${ac_cv_type_signal+set}" = set; then :
6404 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006405else
Matthias Kloseb9621712010-04-24 17:59:49 +00006406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006407/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006408#include <sys/types.h>
6409#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006410
Martin v. Löwis11437992002-04-12 09:54:03 +00006411int
6412main ()
6413{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006414return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006415 ;
6416 return 0;
6417}
6418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006419if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006420 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006421else
Matthias Kloseb9621712010-04-24 17:59:49 +00006422 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
6427$as_echo "$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006428
Martin v. Löwis11437992002-04-12 09:54:03 +00006429cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006430#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006431_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006432
Michael W. Hudson54241132001-12-07 15:38:26 +00006433
Matthias Kloseb9621712010-04-24 17:59:49 +00006434ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6435if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006436
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006437else
Martin v. Löwis11437992002-04-12 09:54:03 +00006438
6439cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006440#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006441_ACEOF
6442
6443fi
6444
Matthias Kloseb9621712010-04-24 17:59:49 +00006445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6446$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6447if test "${ac_cv_type_uid_t+set}" = set; then :
6448 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006449else
Matthias Kloseb9621712010-04-24 17:59:49 +00006450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006451/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006452#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006453
6454_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006456 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006457 ac_cv_type_uid_t=yes
6458else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006459 ac_cv_type_uid_t=no
6460fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006461rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006462
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006463fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6465$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006466if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006467
Matthias Kloseb9621712010-04-24 17:59:49 +00006468$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006469
6470
Matthias Kloseb9621712010-04-24 17:59:49 +00006471$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006472
6473fi
6474
Matthias Kloseb9621712010-04-24 17:59:49 +00006475ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6476case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006477 no|yes) ;; #(
6478 *)
6479
Matthias Kloseb9621712010-04-24 17:59:49 +00006480$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006481
6482
6483cat >>confdefs.h <<_ACEOF
6484#define uint32_t $ac_cv_c_uint32_t
6485_ACEOF
6486;;
6487 esac
6488
Matthias Kloseb9621712010-04-24 17:59:49 +00006489ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6490case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006491 no|yes) ;; #(
6492 *)
6493
Matthias Kloseb9621712010-04-24 17:59:49 +00006494$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006495
6496
6497cat >>confdefs.h <<_ACEOF
6498#define uint64_t $ac_cv_c_uint64_t
6499_ACEOF
6500;;
6501 esac
6502
Matthias Kloseb9621712010-04-24 17:59:49 +00006503ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6504case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006505 no|yes) ;; #(
6506 *)
6507
6508cat >>confdefs.h <<_ACEOF
6509#define int32_t $ac_cv_c_int32_t
6510_ACEOF
6511;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006512esac
6513
Matthias Kloseb9621712010-04-24 17:59:49 +00006514ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6515case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006516 no|yes) ;; #(
6517 *)
6518
6519cat >>confdefs.h <<_ACEOF
6520#define int64_t $ac_cv_c_int64_t
6521_ACEOF
6522;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006523esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006524
Matthias Kloseb9621712010-04-24 17:59:49 +00006525ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6526if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006527
Matthias Kloseb9621712010-04-24 17:59:49 +00006528$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006529
6530fi
6531
Jack Jansendd19cf82001-12-06 22:36:17 +00006532
Michael W. Hudson54241132001-12-07 15:38:26 +00006533# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006534# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006535# The cast to long int works around a bug in the HP C Compiler
6536# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6537# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6538# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6540$as_echo_n "checking size of int... " >&6; }
6541if test "${ac_cv_sizeof_int+set}" = set; then :
6542 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006543else
Matthias Kloseb9621712010-04-24 17:59:49 +00006544 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 +00006545
Martin v. Löwis11437992002-04-12 09:54:03 +00006546else
Matthias Kloseb9621712010-04-24 17:59:49 +00006547 if test "$ac_cv_type_int" = yes; then
6548 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6549$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6550{ as_fn_set_status 77
6551as_fn_error "cannot compute sizeof (int)
6552See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006553 else
6554 ac_cv_sizeof_int=0
6555 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006556fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006557
Martin v. Löwis11437992002-04-12 09:54:03 +00006558fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6560$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006561
6562
6563
Martin v. Löwis11437992002-04-12 09:54:03 +00006564cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006565#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006566_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006567
6568
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006569# The cast to long int works around a bug in the HP C Compiler
6570# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6571# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6572# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6574$as_echo_n "checking size of long... " >&6; }
6575if test "${ac_cv_sizeof_long+set}" = set; then :
6576 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006577else
Matthias Kloseb9621712010-04-24 17:59:49 +00006578 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 +00006579
Martin v. Löwis11437992002-04-12 09:54:03 +00006580else
Matthias Kloseb9621712010-04-24 17:59:49 +00006581 if test "$ac_cv_type_long" = yes; then
6582 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6584{ as_fn_set_status 77
6585as_fn_error "cannot compute sizeof (long)
6586See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006587 else
6588 ac_cv_sizeof_long=0
6589 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006591
Martin v. Löwis11437992002-04-12 09:54:03 +00006592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6594$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006595
6596
6597
Martin v. Löwis11437992002-04-12 09:54:03 +00006598cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006599#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006600_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006601
6602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006603# The cast to long int works around a bug in the HP C Compiler
6604# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6605# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6606# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6608$as_echo_n "checking size of void *... " >&6; }
6609if test "${ac_cv_sizeof_void_p+set}" = set; then :
6610 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006611else
Matthias Kloseb9621712010-04-24 17:59:49 +00006612 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 +00006613
Martin v. Löwis11437992002-04-12 09:54:03 +00006614else
Matthias Kloseb9621712010-04-24 17:59:49 +00006615 if test "$ac_cv_type_void_p" = yes; then
6616 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6617$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6618{ as_fn_set_status 77
6619as_fn_error "cannot compute sizeof (void *)
6620See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006621 else
6622 ac_cv_sizeof_void_p=0
6623 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006625
Martin v. Löwis11437992002-04-12 09:54:03 +00006626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6628$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006629
6630
6631
Martin v. Löwis11437992002-04-12 09:54:03 +00006632cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006633#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006634_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006635
6636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006637# The cast to long int works around a bug in the HP C Compiler
6638# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6639# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6640# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6642$as_echo_n "checking size of short... " >&6; }
6643if test "${ac_cv_sizeof_short+set}" = set; then :
6644 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006645else
Matthias Kloseb9621712010-04-24 17:59:49 +00006646 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 +00006647
Martin v. Löwis11437992002-04-12 09:54:03 +00006648else
Matthias Kloseb9621712010-04-24 17:59:49 +00006649 if test "$ac_cv_type_short" = yes; then
6650 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6651$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6652{ as_fn_set_status 77
6653as_fn_error "cannot compute sizeof (short)
6654See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006655 else
6656 ac_cv_sizeof_short=0
6657 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006659
Martin v. Löwis11437992002-04-12 09:54:03 +00006660fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6662$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006663
6664
6665
Martin v. Löwis11437992002-04-12 09:54:03 +00006666cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006667#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006668_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006669
6670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006671# The cast to long int works around a bug in the HP C Compiler
6672# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6673# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6674# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6676$as_echo_n "checking size of float... " >&6; }
6677if test "${ac_cv_sizeof_float+set}" = set; then :
6678 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006679else
Matthias Kloseb9621712010-04-24 17:59:49 +00006680 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 +00006681
Martin v. Löwis11437992002-04-12 09:54:03 +00006682else
Matthias Kloseb9621712010-04-24 17:59:49 +00006683 if test "$ac_cv_type_float" = yes; then
6684 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6686{ as_fn_set_status 77
6687as_fn_error "cannot compute sizeof (float)
6688See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006689 else
6690 ac_cv_sizeof_float=0
6691 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006693
Martin v. Löwis11437992002-04-12 09:54:03 +00006694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6696$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006697
6698
6699
Martin v. Löwis11437992002-04-12 09:54:03 +00006700cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006701#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006702_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006703
6704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006705# The cast to long int works around a bug in the HP C Compiler
6706# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6707# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6708# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6710$as_echo_n "checking size of double... " >&6; }
6711if test "${ac_cv_sizeof_double+set}" = set; then :
6712 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006713else
Matthias Kloseb9621712010-04-24 17:59:49 +00006714 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 +00006715
Martin v. Löwis11437992002-04-12 09:54:03 +00006716else
Matthias Kloseb9621712010-04-24 17:59:49 +00006717 if test "$ac_cv_type_double" = yes; then
6718 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6719$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6720{ as_fn_set_status 77
6721as_fn_error "cannot compute sizeof (double)
6722See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006723 else
6724 ac_cv_sizeof_double=0
6725 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006727
Martin v. Löwis11437992002-04-12 09:54:03 +00006728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6730$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006731
6732
6733
Martin v. Löwis11437992002-04-12 09:54:03 +00006734cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006735#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006736_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006737
6738
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006739# The cast to long int works around a bug in the HP C Compiler
6740# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6741# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6742# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6744$as_echo_n "checking size of fpos_t... " >&6; }
6745if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6746 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006747else
Matthias Kloseb9621712010-04-24 17:59:49 +00006748 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 +00006749
Martin v. Löwis11437992002-04-12 09:54:03 +00006750else
Matthias Kloseb9621712010-04-24 17:59:49 +00006751 if test "$ac_cv_type_fpos_t" = yes; then
6752 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6753$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6754{ as_fn_set_status 77
6755as_fn_error "cannot compute sizeof (fpos_t)
6756See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006757 else
6758 ac_cv_sizeof_fpos_t=0
6759 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006761
Martin v. Löwis11437992002-04-12 09:54:03 +00006762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6764$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006765
6766
6767
Martin v. Löwis11437992002-04-12 09:54:03 +00006768cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006769#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006770_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006771
Michael W. Hudson54241132001-12-07 15:38:26 +00006772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006773# The cast to long int works around a bug in the HP C Compiler
6774# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6775# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6776# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6778$as_echo_n "checking size of size_t... " >&6; }
6779if test "${ac_cv_sizeof_size_t+set}" = set; then :
6780 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006781else
Matthias Kloseb9621712010-04-24 17:59:49 +00006782 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 +00006783
Martin v. Löwis18e16552006-02-15 17:27:45 +00006784else
Matthias Kloseb9621712010-04-24 17:59:49 +00006785 if test "$ac_cv_type_size_t" = yes; then
6786 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6788{ as_fn_set_status 77
6789as_fn_error "cannot compute sizeof (size_t)
6790See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006791 else
6792 ac_cv_sizeof_size_t=0
6793 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006795
Martin v. Löwis18e16552006-02-15 17:27:45 +00006796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6798$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006799
6800
6801
Martin v. Löwis18e16552006-02-15 17:27:45 +00006802cat >>confdefs.h <<_ACEOF
6803#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6804_ACEOF
6805
6806
Christian Heimes400adb02008-02-01 08:12:03 +00006807# The cast to long int works around a bug in the HP C Compiler
6808# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6809# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6810# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6812$as_echo_n "checking size of pid_t... " >&6; }
6813if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6814 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006815else
Matthias Kloseb9621712010-04-24 17:59:49 +00006816 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 +00006817
Christian Heimes400adb02008-02-01 08:12:03 +00006818else
Matthias Kloseb9621712010-04-24 17:59:49 +00006819 if test "$ac_cv_type_pid_t" = yes; then
6820 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6821$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6822{ as_fn_set_status 77
6823as_fn_error "cannot compute sizeof (pid_t)
6824See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006825 else
6826 ac_cv_sizeof_pid_t=0
6827 fi
6828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006829
Christian Heimes400adb02008-02-01 08:12:03 +00006830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6832$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006833
6834
6835
6836cat >>confdefs.h <<_ACEOF
6837#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6838_ACEOF
6839
6840
Michael W. Hudson54241132001-12-07 15:38:26 +00006841
Matthias Kloseb9621712010-04-24 17:59:49 +00006842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6843$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006844have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006846/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006847
Martin v. Löwis11437992002-04-12 09:54:03 +00006848int
6849main ()
6850{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006851long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006852 ;
6853 return 0;
6854}
6855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006856if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006857
6858
Matthias Kloseb9621712010-04-24 17:59:49 +00006859$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006860
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006861 have_long_long=yes
6862
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6866$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006867if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006868# The cast to long int works around a bug in the HP C Compiler
6869# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6870# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6871# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6873$as_echo_n "checking size of long long... " >&6; }
6874if test "${ac_cv_sizeof_long_long+set}" = set; then :
6875 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006876else
Matthias Kloseb9621712010-04-24 17:59:49 +00006877 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 +00006878
Martin v. Löwis11437992002-04-12 09:54:03 +00006879else
Matthias Kloseb9621712010-04-24 17:59:49 +00006880 if test "$ac_cv_type_long_long" = yes; then
6881 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6882$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6883{ as_fn_set_status 77
6884as_fn_error "cannot compute sizeof (long long)
6885See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006886 else
6887 ac_cv_sizeof_long_long=0
6888 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006890
Martin v. Löwis11437992002-04-12 09:54:03 +00006891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6893$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006894
6895
6896
Martin v. Löwis11437992002-04-12 09:54:03 +00006897cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006898#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006899_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006900
Michael W. Hudson54241132001-12-07 15:38:26 +00006901
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006902fi
6903
Matthias Kloseb9621712010-04-24 17:59:49 +00006904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6905$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006906have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006908/* end confdefs.h. */
6909
6910int
6911main ()
6912{
6913long double x; x = (long double)0;
6914 ;
6915 return 0;
6916}
6917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006918if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006919
6920
Matthias Kloseb9621712010-04-24 17:59:49 +00006921$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006922
6923 have_long_double=yes
6924
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006925fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6928$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006929if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006930# The cast to long int works around a bug in the HP C Compiler
6931# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6932# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6933# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6935$as_echo_n "checking size of long double... " >&6; }
6936if test "${ac_cv_sizeof_long_double+set}" = set; then :
6937 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006938else
Matthias Kloseb9621712010-04-24 17:59:49 +00006939 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 +00006940
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006941else
Matthias Kloseb9621712010-04-24 17:59:49 +00006942 if test "$ac_cv_type_long_double" = yes; then
6943 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6945{ as_fn_set_status 77
6946as_fn_error "cannot compute sizeof (long double)
6947See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006948 else
6949 ac_cv_sizeof_long_double=0
6950 fi
6951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006952
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6955$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006956
6957
6958
6959cat >>confdefs.h <<_ACEOF
6960#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6961_ACEOF
6962
6963
6964fi
6965
6966
Matthias Kloseb9621712010-04-24 17:59:49 +00006967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6968$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006969have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006971/* end confdefs.h. */
6972
6973int
6974main ()
6975{
6976_Bool x; x = (_Bool)0;
6977 ;
6978 return 0;
6979}
6980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006981if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00006982
6983
Matthias Kloseb9621712010-04-24 17:59:49 +00006984$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00006985
6986 have_c99_bool=yes
6987
Thomas Woutersb2137042007-02-01 18:02:27 +00006988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
6991$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006992if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006993# The cast to long int works around a bug in the HP C Compiler
6994# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6995# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6996# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
6998$as_echo_n "checking size of _Bool... " >&6; }
6999if test "${ac_cv_sizeof__Bool+set}" = set; then :
7000 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007001else
Matthias Kloseb9621712010-04-24 17:59:49 +00007002 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 +00007003
Thomas Woutersb2137042007-02-01 18:02:27 +00007004else
Matthias Kloseb9621712010-04-24 17:59:49 +00007005 if test "$ac_cv_type__Bool" = yes; then
7006 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7007$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7008{ as_fn_set_status 77
7009as_fn_error "cannot compute sizeof (_Bool)
7010See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007011 else
7012 ac_cv_sizeof__Bool=0
7013 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007015
Thomas Woutersb2137042007-02-01 18:02:27 +00007016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7018$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007019
7020
7021
Thomas Woutersb2137042007-02-01 18:02:27 +00007022cat >>confdefs.h <<_ACEOF
7023#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7024_ACEOF
7025
7026
7027fi
7028
Matthias Kloseb9621712010-04-24 17:59:49 +00007029ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007030 #include <stdint.h>
7031 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007032"
7033if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007034
7035cat >>confdefs.h <<_ACEOF
7036#define HAVE_UINTPTR_T 1
7037_ACEOF
7038
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007039# The cast to long int works around a bug in the HP C Compiler
7040# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7041# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7042# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7044$as_echo_n "checking size of uintptr_t... " >&6; }
7045if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7046 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007047else
Matthias Kloseb9621712010-04-24 17:59:49 +00007048 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 +00007049
Martin v. Löwis11437992002-04-12 09:54:03 +00007050else
Matthias Kloseb9621712010-04-24 17:59:49 +00007051 if test "$ac_cv_type_uintptr_t" = yes; then
7052 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7053$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7054{ as_fn_set_status 77
7055as_fn_error "cannot compute sizeof (uintptr_t)
7056See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007057 else
7058 ac_cv_sizeof_uintptr_t=0
7059 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007061
Martin v. Löwis11437992002-04-12 09:54:03 +00007062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7064$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007065
7066
7067
Martin v. Löwis11437992002-04-12 09:54:03 +00007068cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007069#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007070_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007071
Michael W. Hudson54241132001-12-07 15:38:26 +00007072
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007073fi
7074
Thomas Wouters89f507f2006-12-13 04:49:30 +00007075
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007076# The cast to long int works around a bug in the HP C Compiler
7077# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7078# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7079# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7081$as_echo_n "checking size of off_t... " >&6; }
7082if test "${ac_cv_sizeof_off_t+set}" = set; then :
7083 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007084else
Matthias Kloseb9621712010-04-24 17:59:49 +00007085 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007086#ifdef HAVE_SYS_TYPES_H
7087#include <sys/types.h>
7088#endif
7089
Matthias Kloseb9621712010-04-24 17:59:49 +00007090"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007091
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007092else
Matthias Kloseb9621712010-04-24 17:59:49 +00007093 if test "$ac_cv_type_off_t" = yes; then
7094 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7095$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7096{ as_fn_set_status 77
7097as_fn_error "cannot compute sizeof (off_t)
7098See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007099 else
7100 ac_cv_sizeof_off_t=0
7101 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007103
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7106$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007107
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007108
7109
Martin v. Löwis11437992002-04-12 09:54:03 +00007110cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007111#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007112_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007113
Michael W. Hudson54241132001-12-07 15:38:26 +00007114
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007115
Matthias Kloseb9621712010-04-24 17:59:49 +00007116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7117$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007118if test "$have_long_long" = yes
7119then
7120if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007121 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007122
Matthias Kloseb9621712010-04-24 17:59:49 +00007123$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007124
Matthias Kloseb9621712010-04-24 17:59:49 +00007125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7126$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007127else
Matthias Kloseb9621712010-04-24 17:59:49 +00007128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7129$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007130fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007131else
Matthias Kloseb9621712010-04-24 17:59:49 +00007132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7133$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007134fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007135
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007136# The cast to long int works around a bug in the HP C Compiler
7137# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7138# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7139# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7141$as_echo_n "checking size of time_t... " >&6; }
7142if test "${ac_cv_sizeof_time_t+set}" = set; then :
7143 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007144else
Matthias Kloseb9621712010-04-24 17:59:49 +00007145 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007146#ifdef HAVE_SYS_TYPES_H
7147#include <sys/types.h>
7148#endif
7149#ifdef HAVE_TIME_H
7150#include <time.h>
7151#endif
7152
Matthias Kloseb9621712010-04-24 17:59:49 +00007153"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007154
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007155else
Matthias Kloseb9621712010-04-24 17:59:49 +00007156 if test "$ac_cv_type_time_t" = yes; then
7157 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7159{ as_fn_set_status 77
7160as_fn_error "cannot compute sizeof (time_t)
7161See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007162 else
7163 ac_cv_sizeof_time_t=0
7164 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007166
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7169$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007170
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007171
7172
Martin v. Löwis11437992002-04-12 09:54:03 +00007173cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007174#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007175_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007176
Michael W. Hudson54241132001-12-07 15:38:26 +00007177
7178
Trent Mick635f6fb2000-08-23 21:33:05 +00007179# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007180ac_save_cc="$CC"
7181if test "$ac_cv_kpthread" = "yes"
7182then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007183elif test "$ac_cv_kthread" = "yes"
7184then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007185elif test "$ac_cv_pthread" = "yes"
7186then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007187fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007188
Matthias Kloseb9621712010-04-24 17:59:49 +00007189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7190$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007191have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007193/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00007194#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007195int
7196main ()
7197{
Guido van Rossum12580492000-09-24 16:47:19 +00007198pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007199 ;
7200 return 0;
7201}
7202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007203if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007204 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7208$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007209if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007210 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007211# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7212# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7213# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7215$as_echo_n "checking size of pthread_t... " >&6; }
7216if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7217 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007218else
Matthias Kloseb9621712010-04-24 17:59:49 +00007219 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007220#ifdef HAVE_PTHREAD_H
7221#include <pthread.h>
7222#endif
7223
Matthias Kloseb9621712010-04-24 17:59:49 +00007224"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007225
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007226else
Matthias Kloseb9621712010-04-24 17:59:49 +00007227 if test "$ac_cv_type_pthread_t" = yes; then
7228 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7229$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7230{ as_fn_set_status 77
7231as_fn_error "cannot compute sizeof (pthread_t)
7232See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007233 else
7234 ac_cv_sizeof_pthread_t=0
7235 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007236fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007237
Trent Mick635f6fb2000-08-23 21:33:05 +00007238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7240$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007241
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007242
7243
Martin v. Löwis11437992002-04-12 09:54:03 +00007244cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007245#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007246_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007247
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007248
Trent Mick635f6fb2000-08-23 21:33:05 +00007249fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007250CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007251
Michael W. Hudson54241132001-12-07 15:38:26 +00007252
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007253case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007254 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007255 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7256 ;;
7257 Darwin/*)
7258 OTHER_LIBTOOL_OPT=""
7259 ;;
7260esac
7261
7262
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007263ARCH_RUN_32BIT=""
7264
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007265case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007266 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007267 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7268 if test "${enable_universalsdk}"; then
7269 :
7270 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007271 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007272 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007273 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007274 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007275 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007276 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007277 if test ${gcc_version} '<' 4.0
7278 then
7279 LIBTOOL_CRUFT="-lcc_dynamic"
7280 else
7281 LIBTOOL_CRUFT=""
7282 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007283 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007284 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007285else
Matthias Kloseb9621712010-04-24 17:59:49 +00007286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007287/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007288
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007289 #include <unistd.h>
7290 int main(int argc, char*argv[])
7291 {
7292 if (sizeof(long) == 4) {
7293 return 0;
7294 } else {
7295 return 1;
7296 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007297 }
7298
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007300if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007301 ac_osx_32bit=yes
7302else
Matthias Kloseb9621712010-04-24 17:59:49 +00007303 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7306 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007307fi
7308
7309
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007310 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007311 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007312 i386)
7313 MACOSX_DEFAULT_ARCH="i386"
7314 ;;
7315 ppc)
7316 MACOSX_DEFAULT_ARCH="ppc"
7317 ;;
7318 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007319 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007320 ;;
7321 esac
7322 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007323 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007324 i386)
7325 MACOSX_DEFAULT_ARCH="x86_64"
7326 ;;
7327 ppc)
7328 MACOSX_DEFAULT_ARCH="ppc64"
7329 ;;
7330 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007331 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007332 ;;
7333 esac
7334
7335 #ARCH_RUN_32BIT="true"
7336 fi
7337
7338 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007339 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007340 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007341esac
7342
Matthias Kloseb9621712010-04-24 17:59:49 +00007343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7344$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007345if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007346then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007347 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007348 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007349 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007350
Matthias Kloseb9621712010-04-24 17:59:49 +00007351$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007352
Matthias Kloseb9621712010-04-24 17:59:49 +00007353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7354$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007355 if test $enable_shared = "yes"
7356 then
Matthias Kloseb9621712010-04-24 17:59:49 +00007357 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 +00007358 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007359else
Matthias Kloseb9621712010-04-24 17:59:49 +00007360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7361$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007362fi
7363
Matthias Kloseb9621712010-04-24 17:59:49 +00007364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7365$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007366case $ac_sys_system/$ac_sys_release in
7367 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007368
Matthias Kloseb9621712010-04-24 17:59:49 +00007369$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007370
Matthias Kloseb9621712010-04-24 17:59:49 +00007371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7372$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007373 ;;
7374 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7376$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007377 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007378esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007379
Guido van Rossum0a516c91994-09-12 10:58:40 +00007380# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007381
Michael W. Hudson54241132001-12-07 15:38:26 +00007382
7383
7384
7385
Benjamin Peterson99f03762010-04-11 22:15:28 +00007386
Guido van Rossum0a516c91994-09-12 10:58:40 +00007387# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007388# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Kloseb9621712010-04-24 17:59:49 +00007389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7390$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007391if test -z "$SO"
7392then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007393 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +00007394 hp*|HP*)
7395 case `uname -m` in
7396 ia64) SO=.so;;
7397 *) SO=.sl;;
7398 esac
7399 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007400 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007401 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007402 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007403else
7404 # this might also be a termcap variable, see #610332
7405 echo
7406 echo '====================================================================='
7407 echo '+ +'
7408 echo '+ WARNING: You have set SO in your environment. +'
7409 echo '+ Do you really mean to change the extension for shared libraries? +'
7410 echo '+ Continuing in 10 seconds to let you to ponder. +'
7411 echo '+ +'
7412 echo '====================================================================='
7413 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7416$as_echo "$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00007417
Georg Brandlb1441c72009-01-03 22:33:39 +00007418
Thomas Wouters477c8d52006-05-27 19:21:47 +00007419cat >>confdefs.h <<_ACEOF
7420#define SHLIB_EXT "$SO"
7421_ACEOF
7422
Guido van Rossum0a516c91994-09-12 10:58:40 +00007423# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007424# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007425# (Shared libraries in this instance are shared modules to be loaded into
7426# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7428$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007429if test -z "$LDSHARED"
7430then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007431 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007432 AIX*)
7433 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007434 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007435 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007436 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007437 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007438 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007439 if test "$GCC" = "yes" ; then
7440 LDSHARED='$(CC) -shared'
7441 LDCXXSHARED='$(CXX) -shared'
7442 else
7443 LDSHARED='$(CC) -G'
7444 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007445 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007446 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007447 if test "$GCC" = "yes" ; then
7448 LDSHARED='$(CC) -shared'
7449 LDCXXSHARED='$(CXX) -shared'
7450 else
7451 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007452 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007453 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007454 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00007455 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007456 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007457 if test "$enable_framework" ; then
7458 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007459 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7460 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007461 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007462 else
7463 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007464 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007465 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007466 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007467 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00007468 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007469 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007470 if test "$enable_framework" ; then
7471 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007472 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7473 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007474 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007475 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007476 # No framework, use the Python app as bundle-loader
7477 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007478 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007479 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007480 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007481 Darwin/*)
7482 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7483 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007484
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007485 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007486 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007487 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007488 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007489 fi
Jack Jansen6b08a402004-06-03 12:41:45 +00007490 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007491 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007492 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007493 else
7494 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007495 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +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 Jansen6b08a402004-06-03 12:41:45 +00007501 else
7502 # No framework, use the Python app as bundle-loader
7503 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7504 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007505 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007506 fi
7507 fi
7508 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007509 Linux*|GNU*|QNX*)
7510 LDSHARED='$(CC) -shared'
7511 LDCXXSHARED='$(CXX) -shared';;
7512 BSD/OS*/4*)
7513 LDSHARED="gcc -shared"
7514 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007515 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007516 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007517 then
Benjamin Petersonab0a7522010-03-14 15:18:25 +00007518 LDSHARED='$(CC) -shared ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007519 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007520 else
7521 LDSHARED="ld -Bshareable ${LDFLAGS}"
7522 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007523 OpenBSD*)
7524 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7525 then
7526 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007527 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007528 else
7529 case `uname -r` in
7530 [01].* | 2.[0-7] | 2.[0-7].*)
7531 LDSHARED="ld -Bshareable ${LDFLAGS}"
7532 ;;
7533 *)
7534 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007535 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007536 ;;
7537 esac
7538 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007539 NetBSD*|DragonFly*)
7540 LDSHARED="cc -shared ${LDFLAGS}"
7541 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007542 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007543 if test "$GCC" = "yes" ; then
7544 LDSHARED='$(CC) -shared'
7545 LDCXXSHARED='$(CXX) -shared'
7546 else
7547 LDSHARED='$(CC) -G'
7548 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007549 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007550 SCO_SV*)
7551 LDSHARED='$(CC) -Wl,-G,-Bexport'
7552 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7553 CYGWIN*)
7554 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7555 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007556 *) LDSHARED="ld";;
7557 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007558fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7560$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007561LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007562BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007563# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007564# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7566$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007567if test -z "$CCSHARED"
7568then
Guido van Rossum07397971997-04-29 21:49:50 +00007569 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007570 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007571 then CCSHARED="-fPIC";
7572 elif test `uname -p` = sparc;
7573 then CCSHARED="-xcode=pic32";
7574 else CCSHARED="-Kpic";
7575 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007576 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007577 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007578 else CCSHARED="+z";
7579 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007580 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007581 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007582 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007583 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007584 if test "$GCC" = "yes"
7585 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007586 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007587 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007588 SCO_SV*)
7589 if test "$GCC" = "yes"
7590 then CCSHARED="-fPIC"
7591 else CCSHARED="-Kpic -belf"
7592 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007593 IRIX*/6*) case $CC in
7594 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007595 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007596 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007597 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7600$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007601# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007602# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7604$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007605if test -z "$LINKFORSHARED"
7606then
Guido van Rossum07397971997-04-29 21:49:50 +00007607 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007608 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007609 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007610 LINKFORSHARED="-Wl,-E -Wl,+s";;
7611# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007612 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007613 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007614 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007615 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007616 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007617 if test "$enable_framework"
7618 then
Jack Jansenda49e192005-01-07 13:08:22 +00007619 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007620 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007621 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007622 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007623 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007624 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007625 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007626 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7627 then
7628 LINKFORSHARED="-Wl,--export-dynamic"
7629 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007630 SunOS/5*) case $CC in
7631 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007632 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007633 then
7634 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007635 fi;;
7636 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007637 CYGWIN*)
7638 if test $enable_shared = "no"
7639 then
7640 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7641 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007642 QNX*)
7643 # -Wl,-E causes the symbols to be added to the dynamic
7644 # symbol table so that they can be found when a module
7645 # is loaded. -N 2048K causes the stack size to be set
7646 # to 2048 kilobytes so that the stack doesn't overflow
7647 # when running test_compile.py.
7648 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007649 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7652$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007653
Michael W. Hudson54241132001-12-07 15:38:26 +00007654
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007655
Matthias Kloseb9621712010-04-24 17:59:49 +00007656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7657$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007658if test ! "$LIBRARY" = "$LDLIBRARY"
7659then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007660 case $ac_sys_system in
7661 CYGWIN*)
7662 # Cygwin needs CCSHARED when building extension DLLs
7663 # but not when building the interpreter DLL.
7664 CFLAGSFORSHARED='';;
7665 *)
7666 CFLAGSFORSHARED='$(CCSHARED)'
7667 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7670$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007671
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007672# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7673# library (with --enable-shared).
7674# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007675# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7676# if it is not required, since it creates a dependency of the shared library
7677# to LIBS. This, in turn, means that applications linking the shared libpython
7678# don't need to link LIBS explicitly. The default should be only changed
7679# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007680
Matthias Kloseb9621712010-04-24 17:59:49 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7682$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007683case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007684 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007685 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007686esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7688$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007689
7690
Guido van Rossum627b2d71993-12-24 10:39:16 +00007691# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7693$as_echo_n "checking for dlopen in -ldl... " >&6; }
7694if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7695 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007696else
Martin v. Löwis11437992002-04-12 09:54:03 +00007697 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007698LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007700/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007701
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007702/* Override any GCC internal prototype to avoid an error.
7703 Use char because int might match the return type of a GCC
7704 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007705#ifdef __cplusplus
7706extern "C"
7707#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007708char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007709int
7710main ()
7711{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007712return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007713 ;
7714 return 0;
7715}
7716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007717if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007718 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007719else
Matthias Kloseb9621712010-04-24 17:59:49 +00007720 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007722rm -f core conftest.err conftest.$ac_objext \
7723 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007724LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7727$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7728if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007729 cat >>confdefs.h <<_ACEOF
7730#define HAVE_LIBDL 1
7731_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007732
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007733 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007734
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007735fi
7736 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7738$as_echo_n "checking for shl_load in -ldld... " >&6; }
7739if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7740 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007741else
Martin v. Löwis11437992002-04-12 09:54:03 +00007742 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007743LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007746
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007747/* Override any GCC internal prototype to avoid an error.
7748 Use char because int might match the return type of a GCC
7749 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007750#ifdef __cplusplus
7751extern "C"
7752#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007753char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007754int
7755main ()
7756{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007757return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007758 ;
7759 return 0;
7760}
7761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007762if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007763 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007764else
Matthias Kloseb9621712010-04-24 17:59:49 +00007765 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007767rm -f core conftest.err conftest.$ac_objext \
7768 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007769LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7772$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7773if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007774 cat >>confdefs.h <<_ACEOF
7775#define HAVE_LIBDLD 1
7776_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007777
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007778 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007779
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007780fi
7781 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007782
Georg Brandlb1441c72009-01-03 22:33:39 +00007783# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007784if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7786$as_echo_n "checking for library containing sem_init... " >&6; }
7787if test "${ac_cv_search_sem_init+set}" = set; then :
7788 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007789else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007790 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007794/* Override any GCC internal prototype to avoid an error.
7795 Use char because int might match the return type of a GCC
7796 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007797#ifdef __cplusplus
7798extern "C"
7799#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007800char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007801int
7802main ()
7803{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007804return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007805 ;
7806 return 0;
7807}
7808_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007809for ac_lib in '' pthread rt posix4; do
7810 if test -z "$ac_lib"; then
7811 ac_res="none required"
7812 else
7813 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007814 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007815 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007816 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007819rm -f core conftest.err conftest.$ac_objext \
7820 conftest$ac_exeext
7821 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007822 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007824done
Matthias Kloseb9621712010-04-24 17:59:49 +00007825if test "${ac_cv_search_sem_init+set}" = set; then :
7826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007827else
7828 ac_cv_search_sem_init=no
7829fi
7830rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007831LIBS=$ac_func_search_save_LIBS
7832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7834$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007836if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007837 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007838
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007839fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007840 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007841 # posix4 on Solaris 2.6
7842 # pthread (first!) on Linux
7843fi
7844
Martin v. Löwis19d17342003-06-14 21:03:05 +00007845# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7847$as_echo_n "checking for textdomain in -lintl... " >&6; }
7848if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7849 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007850else
7851 ac_check_lib_save_LIBS=$LIBS
7852LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007854/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007856/* Override any GCC internal prototype to avoid an error.
7857 Use char because int might match the return type of a GCC
7858 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007859#ifdef __cplusplus
7860extern "C"
7861#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007862char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007863int
7864main ()
7865{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007866return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007867 ;
7868 return 0;
7869}
7870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007871if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007872 ac_cv_lib_intl_textdomain=yes
7873else
Matthias Kloseb9621712010-04-24 17:59:49 +00007874 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007876rm -f core conftest.err conftest.$ac_objext \
7877 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007878LIBS=$ac_check_lib_save_LIBS
7879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7881$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7882if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007883
Matthias Kloseb9621712010-04-24 17:59:49 +00007884$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007885
Brett Cannonc6d936e2009-06-07 20:09:53 +00007886 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007887fi
7888
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007889
7890# checks for system dependent C++ extensions support
7891case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007892 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7893$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007895/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007896#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007897int
7898main ()
7899{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007900loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 ;
7902 return 0;
7903}
7904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007905if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007906
Matthias Kloseb9621712010-04-24 17:59:49 +00007907$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007908
Matthias Kloseb9621712010-04-24 17:59:49 +00007909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7910$as_echo "yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007911else
Matthias Kloseb9621712010-04-24 17:59:49 +00007912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7913$as_echo "no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007915rm -f core conftest.err conftest.$ac_objext \
7916 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007917 *) ;;
7918esac
7919
Guido van Rossum70c7f481998-03-26 18:44:10 +00007920# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7922$as_echo_n "checking for t_open in -lnsl... " >&6; }
7923if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7924 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007925else
Martin v. Löwis11437992002-04-12 09:54:03 +00007926 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007927LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007931/* Override any GCC internal prototype to avoid an error.
7932 Use char because int might match the return type of a GCC
7933 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007934#ifdef __cplusplus
7935extern "C"
7936#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007937char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007938int
7939main ()
7940{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007941return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007942 ;
7943 return 0;
7944}
7945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007946if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007947 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007948else
Matthias Kloseb9621712010-04-24 17:59:49 +00007949 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007951rm -f core conftest.err conftest.$ac_objext \
7952 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007953LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7956$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
7957if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007958 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007959fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007960 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7962$as_echo_n "checking for socket in -lsocket... " >&6; }
7963if test "${ac_cv_lib_socket_socket+set}" = set; then :
7964 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007965else
Martin v. Löwis11437992002-04-12 09:54:03 +00007966 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007967LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007969/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971/* Override any GCC internal prototype to avoid an error.
7972 Use char because int might match the return type of a GCC
7973 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007974#ifdef __cplusplus
7975extern "C"
7976#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007977char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007978int
7979main ()
7980{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007982 ;
7983 return 0;
7984}
7985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007986if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007987 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007988else
Matthias Kloseb9621712010-04-24 17:59:49 +00007989 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007991rm -f core conftest.err conftest.$ac_objext \
7992 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007993LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
7996$as_echo "$ac_cv_lib_socket_socket" >&6; }
7997if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00007998 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00007999fi
8000 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008001
Matthias Kloseb9621712010-04-24 17:59:49 +00008002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8003$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008004
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008005# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008006if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8009$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008010LIBS="$withval $LIBS"
8011
8012else
Matthias Kloseb9621712010-04-24 17:59:49 +00008013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8014$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015fi
8016
Guido van Rossum7f43da71994-08-01 12:15:30 +00008017
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008018if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008019 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8020set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8022$as_echo_n "checking for $ac_word... " >&6; }
8023if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8024 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008025else
8026 case $PKG_CONFIG in
8027 [\\/]* | ?:[\\/]*)
8028 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8029 ;;
8030 *)
8031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8032for as_dir in $PATH
8033do
8034 IFS=$as_save_IFS
8035 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008036 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008037 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8038 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008040 break 2
8041 fi
8042done
Matthias Kloseb9621712010-04-24 17:59:49 +00008043 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008044IFS=$as_save_IFS
8045
8046 ;;
8047esac
8048fi
8049PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8050if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8052$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008053else
Matthias Kloseb9621712010-04-24 17:59:49 +00008054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8055$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008056fi
8057
8058
8059fi
8060if test -z "$ac_cv_path_PKG_CONFIG"; then
8061 ac_pt_PKG_CONFIG=$PKG_CONFIG
8062 # Extract the first word of "pkg-config", so it can be a program name with args.
8063set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8065$as_echo_n "checking for $ac_word... " >&6; }
8066if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8067 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008068else
8069 case $ac_pt_PKG_CONFIG in
8070 [\\/]* | ?:[\\/]*)
8071 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8072 ;;
8073 *)
8074 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8075for as_dir in $PATH
8076do
8077 IFS=$as_save_IFS
8078 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008079 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008080 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8081 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008083 break 2
8084 fi
8085done
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008087IFS=$as_save_IFS
8088
8089 ;;
8090esac
8091fi
8092ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8093if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8095$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008096else
Matthias Kloseb9621712010-04-24 17:59:49 +00008097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8098$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008099fi
8100
8101 if test "x$ac_pt_PKG_CONFIG" = x; then
8102 PKG_CONFIG=""
8103 else
8104 case $cross_compiling:$ac_tool_warned in
8105yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008106{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8107$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008108ac_tool_warned=yes ;;
8109esac
8110 PKG_CONFIG=$ac_pt_PKG_CONFIG
8111 fi
8112else
8113 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8114fi
8115
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008116
8117# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8119$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008120
8121# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008122if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008123 withval=$with_system_expat;
8124fi
8125
8126
Matthias Kloseb9621712010-04-24 17:59:49 +00008127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8128$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008129
8130# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8132$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008133
8134# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008135if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008136 withval=$with_system_ffi;
8137fi
8138
8139
8140if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008141 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8142else
8143 LIBFFI_INCLUDEDIR=""
8144fi
8145
8146
Matthias Kloseb9621712010-04-24 17:59:49 +00008147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8148$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008149
Matthias Klose55708cc2009-04-30 08:06:49 +00008150# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8152$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008153
8154# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008155if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008156 withval=$with_dbmliborder;
8157if test x$with_dbmliborder = xyes
8158then
Matthias Kloseb9621712010-04-24 17:59:49 +00008159as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008160else
8161 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8162 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8163 then
Matthias Kloseb9621712010-04-24 17:59:49 +00008164 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008165 fi
8166 done
8167fi
8168fi
8169
Matthias Kloseb9621712010-04-24 17:59:49 +00008170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8171$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008172
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008173# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008174
8175
Matthias Kloseb9621712010-04-24 17:59:49 +00008176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8177$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008178
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008179# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008180if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008181 withval=$with_signal_module;
8182fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008183
8184
8185if test -z "$with_signal_module"
8186then with_signal_module="yes"
8187fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8189$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008190
8191if test "${with_signal_module}" = "yes"; then
8192 USE_SIGNAL_MODULE=""
8193 SIGNAL_OBJS=""
8194else
8195 USE_SIGNAL_MODULE="#"
8196 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8197fi
8198
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008199# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008200
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008201USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008202
Matthias Kloseb9621712010-04-24 17:59:49 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8204$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008205
Guido van Rossumec2f0731997-01-22 20:54:01 +00008206
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008207# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008208if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008209 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8211$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008212LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008213if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008214 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008215fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008216else
Matthias Kloseb9621712010-04-24 17:59:49 +00008217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8218$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219fi
8220
Martin v. Löwis11437992002-04-12 09:54:03 +00008221
8222# Templates for things AC_DEFINEd more than once.
8223# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008224
8225
Martin v. Löwis11437992002-04-12 09:54:03 +00008226
8227
Matthias Kloseb9621712010-04-24 17:59:49 +00008228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8229$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008231# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008232if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008233 withval=$with_threads;
8234fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008235
8236
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008237# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008238
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008240if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008241 withval=$with_thread; with_threads=$with_thread
8242fi
8243
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008244
8245if test -z "$with_threads"
8246then with_threads="yes"
8247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8249$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008250
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008251
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008252if test "$with_threads" = "no"
8253then
8254 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008255elif test "$ac_cv_pthread_is_default" = yes
8256then
Matthias Kloseb9621712010-04-24 17:59:49 +00008257 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008258
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008259 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008260 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008261
8262 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008263 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008264elif test "$ac_cv_kpthread" = "yes"
8265then
8266 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008267 if test "$ac_cv_cxx_thread" = "yes"; then
8268 CXX="$CXX -Kpthread"
8269 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008270 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008271
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008272 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008273 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008274elif test "$ac_cv_kthread" = "yes"
8275then
8276 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008277 if test "$ac_cv_cxx_thread" = "yes"; then
8278 CXX="$CXX -Kthread"
8279 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008280 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008281
8282 posix_threads=yes
8283 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008284elif test "$ac_cv_pthread" = "yes"
8285then
8286 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008287 if test "$ac_cv_cxx_thread" = "yes"; then
8288 CXX="$CXX -pthread"
8289 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008290 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008291
8292 posix_threads=yes
8293 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008294else
8295 if test ! -z "$with_threads" -a -d "$with_threads"
8296 then LDFLAGS="$LDFLAGS -L$with_threads"
8297 fi
8298 if test ! -z "$withval" -a -d "$withval"
8299 then LDFLAGS="$LDFLAGS -L$withval"
8300 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008301
8302 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008303 # define _POSIX_THREADS in unistd.h. Some apparently don't
8304 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8306$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008308/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008309
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008310#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008311#ifdef _POSIX_THREADS
8312yes
8313#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008314
8315_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008316if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008317 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008318 unistd_defines_pthreads=yes
8319else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008320 unistd_defines_pthreads=no
8321fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008322rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008323
Matthias Kloseb9621712010-04-24 17:59:49 +00008324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8325$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008326
Matthias Kloseb9621712010-04-24 17:59:49 +00008327 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008328
Matthias Kloseb9621712010-04-24 17:59:49 +00008329 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8330if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8331 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008332
Matthias Kloseb9621712010-04-24 17:59:49 +00008333 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008334
Martin v. Löwis11437992002-04-12 09:54:03 +00008335
Matthias Kloseb9621712010-04-24 17:59:49 +00008336$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008337
8338 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008339 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008340else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008341
Matthias Kloseb9621712010-04-24 17:59:49 +00008342 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8343if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8344 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008345
Matthias Kloseb9621712010-04-24 17:59:49 +00008346 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008347
Martin v. Löwis11437992002-04-12 09:54:03 +00008348
Matthias Kloseb9621712010-04-24 17:59:49 +00008349$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008350
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008351 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008352else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008353
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008354 # Just looking for pthread_create in libpthread is not enough:
8355 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8356 # So we really have to include pthread.h, and then link.
8357 _libs=$LIBS
8358 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8360$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008362/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008363#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008364
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008365void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008366int
8367main ()
8368{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008369
8370pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008371 ;
8372 return 0;
8373}
8374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008375if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008376
Matthias Kloseb9621712010-04-24 17:59:49 +00008377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8378$as_echo "yes" >&6; }
8379 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008380
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008381 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008382 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008383else
Martin v. Löwis11437992002-04-12 09:54:03 +00008384
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008385 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8387if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8388 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008389
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008390 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008391 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008392else
Guido van Rossumad678af1998-10-02 14:42:15 +00008393
Matthias Kloseb9621712010-04-24 17:59:49 +00008394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8395$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8396if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8397 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008398else
Martin v. Löwis11437992002-04-12 09:54:03 +00008399 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008400LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008403
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008404/* Override any GCC internal prototype to avoid an error.
8405 Use char because int might match the return type of a GCC
8406 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008407#ifdef __cplusplus
8408extern "C"
8409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008410char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008411int
8412main ()
8413{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008414return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008415 ;
8416 return 0;
8417}
8418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008419if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008420 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008421else
Matthias Kloseb9621712010-04-24 17:59:49 +00008422 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008423fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008424rm -f core conftest.err conftest.$ac_objext \
8425 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008426LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008427fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8429$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8430if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8431 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008432
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008433 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008434 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008435 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008436else
Greg Steinadf63d62000-07-05 10:38:09 +00008437
Matthias Kloseb9621712010-04-24 17:59:49 +00008438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8439$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8440if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8441 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008442else
Martin v. Löwis11437992002-04-12 09:54:03 +00008443 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008444LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008446/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008447
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008448/* Override any GCC internal prototype to avoid an error.
8449 Use char because int might match the return type of a GCC
8450 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008451#ifdef __cplusplus
8452extern "C"
8453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008454char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008455int
8456main ()
8457{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008458return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008459 ;
8460 return 0;
8461}
8462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008463if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008464 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008465else
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008467fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008468rm -f core conftest.err conftest.$ac_objext \
8469 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008470LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008471fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8473$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8474if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8475 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008476
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008477 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008478 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008479 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008480else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008481
Matthias Kloseb9621712010-04-24 17:59:49 +00008482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8483$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8484if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8485 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008486else
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008488LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008491
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008492/* Override any GCC internal prototype to avoid an error.
8493 Use char because int might match the return type of a GCC
8494 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008495#ifdef __cplusplus
8496extern "C"
8497#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008498char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008499int
8500main ()
8501{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008502return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 ;
8504 return 0;
8505}
8506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008507if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008508 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008509else
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008511fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008512rm -f core conftest.err conftest.$ac_objext \
8513 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008514LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8517$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8518if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8519 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008520
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008521 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008522 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008523 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008524else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008525
Matthias Kloseb9621712010-04-24 17:59:49 +00008526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8527$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8528if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8529 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008530else
Martin v. Löwis11437992002-04-12 09:54:03 +00008531 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008532LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008534/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008535
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008536/* Override any GCC internal prototype to avoid an error.
8537 Use char because int might match the return type of a GCC
8538 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008539#ifdef __cplusplus
8540extern "C"
8541#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008542char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008543int
8544main ()
8545{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008546return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008547 ;
8548 return 0;
8549}
8550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008551if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008552 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008553else
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008556rm -f core conftest.err conftest.$ac_objext \
8557 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008558LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8561$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8562if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8563 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008564
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008565 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008566 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008567 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008568else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008569
Martin v. Löwis130fb172001-07-19 11:00:41 +00008570 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008571fi
8572
Guido van Rossum627b2d71993-12-24 10:39:16 +00008573
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008574fi
8575
Guido van Rossum0be3e491997-05-22 20:33:33 +00008576fi
8577
Guido van Rossum49545951997-12-02 19:28:29 +00008578fi
8579
Guido van Rossumb93a8621998-05-07 13:27:32 +00008580fi
8581
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008583rm -f core conftest.err conftest.$ac_objext \
8584 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008585fi
8586
Martin v. Löwis11437992002-04-12 09:54:03 +00008587
8588fi
8589
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008590
Michael W. Hudson54241132001-12-07 15:38:26 +00008591
Matthias Kloseb9621712010-04-24 17:59:49 +00008592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8593$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8594if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8595 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008596else
Martin v. Löwis11437992002-04-12 09:54:03 +00008597 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008598LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008601
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008602/* Override any GCC internal prototype to avoid an error.
8603 Use char because int might match the return type of a GCC
8604 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008605#ifdef __cplusplus
8606extern "C"
8607#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008608char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008609int
8610main ()
8611{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008613 ;
8614 return 0;
8615}
8616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008617if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008618 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008619else
Matthias Kloseb9621712010-04-24 17:59:49 +00008620 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008622rm -f core conftest.err conftest.$ac_objext \
8623 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008624LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8627$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8628if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8629 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008630
Martin v. Löwis130fb172001-07-19 11:00:41 +00008631 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008632 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008633 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008634fi
8635
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008636
Neal Norwitza978ab02002-11-02 16:58:05 +00008637 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8639$as_echo_n "checking for thr_create in -lthread... " >&6; }
8640if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8641 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008642else
Martin v. Löwis11437992002-04-12 09:54:03 +00008643 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008644LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008647
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008648/* Override any GCC internal prototype to avoid an error.
8649 Use char because int might match the return type of a GCC
8650 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008651#ifdef __cplusplus
8652extern "C"
8653#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008654char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008655int
8656main ()
8657{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 ;
8660 return 0;
8661}
8662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008663if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008665else
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008668rm -f core conftest.err conftest.$ac_objext \
8669 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008670LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8673$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8674if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8675 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008676
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008677 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008678 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008679 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008680fi
8681
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008682 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008683
Martin v. Löwis130fb172001-07-19 11:00:41 +00008684 if test "$USE_THREAD_MODULE" != "#"
8685 then
8686 # If the above checks didn't disable threads, (at least) OSF1
8687 # needs this '-threads' argument during linking.
8688 case $ac_sys_system in
8689 OSF1) LDLAST=-threads;;
8690 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008691 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008692fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008693
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008694if test "$posix_threads" = "yes"; then
8695 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008696
Matthias Kloseb9621712010-04-24 17:59:49 +00008697$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008698
8699 fi
8700
8701 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8702 case $ac_sys_system/$ac_sys_release in
8703 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008704$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008705
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008706 ;;
8707 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008708$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008709
8710 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008711 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008712$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008713
8714 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008715 esac
8716
Matthias Kloseb9621712010-04-24 17:59:49 +00008717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8718$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8719 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8720 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008721else
Matthias Kloseb9621712010-04-24 17:59:49 +00008722 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008723 ac_cv_pthread_system_supported=no
8724else
Matthias Kloseb9621712010-04-24 17:59:49 +00008725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008726/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008727#include <pthread.h>
8728 void *foo(void *parm) {
8729 return NULL;
8730 }
8731 main() {
8732 pthread_attr_t attr;
8733 pthread_t id;
8734 if (pthread_attr_init(&attr)) exit(-1);
8735 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8736 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8737 exit(0);
8738 }
8739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008740if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008741 ac_cv_pthread_system_supported=yes
8742else
Matthias Kloseb9621712010-04-24 17:59:49 +00008743 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008745rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8746 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008747fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008748
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008749
Guido van Rossum627b2d71993-12-24 10:39:16 +00008750fi
8751
Matthias Kloseb9621712010-04-24 17:59:49 +00008752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8753$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008754 if test "$ac_cv_pthread_system_supported" = "yes"; then
8755
Matthias Kloseb9621712010-04-24 17:59:49 +00008756$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008757
8758 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 for ac_func in pthread_sigmask
8760do :
8761 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8762if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008763 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008764#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008765_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008766 case $ac_sys_system in
8767 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008768
Matthias Kloseb9621712010-04-24 17:59:49 +00008769$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008770
8771 ;;
8772 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008773fi
8774done
8775
8776fi
8777
8778
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008779# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008780
Matthias Kloseb9621712010-04-24 17:59:49 +00008781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8782$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008783# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008784if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008785 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008786 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8788$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008789 ipv6=no
8790 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8792$as_echo "yes" >&6; }
8793 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008794
8795 ipv6=yes
8796 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008797 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008798else
Martin v. Löwis11437992002-04-12 09:54:03 +00008799
Matthias Kloseb9621712010-04-24 17:59:49 +00008800 if test "$cross_compiling" = yes; then :
8801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8802$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008803 ipv6=no
8804
8805else
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008807/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008808 /* AF_INET6 available check */
8809#include <sys/types.h>
8810#include <sys/socket.h>
8811main()
8812{
8813 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8814 exit(1);
8815 else
8816 exit(0);
8817}
8818
Martin v. Löwis11437992002-04-12 09:54:03 +00008819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008820if ac_fn_c_try_run "$LINENO"; then :
8821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8822$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008823 ipv6=yes
8824else
Matthias Kloseb9621712010-04-24 17:59:49 +00008825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8826$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008827 ipv6=no
8828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8830 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008831fi
8832
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008833
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008834if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8836$as_echo_n "checking if RFC2553 API is available... " >&6; }
8837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008838/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008839#include <sys/types.h>
8840#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008841int
8842main ()
8843{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008844struct sockaddr_in6 x;
8845x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008846 ;
8847 return 0;
8848}
8849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008850if ac_fn_c_try_compile "$LINENO"; then :
8851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8852$as_echo "yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008853 ipv6=yes
8854else
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8856$as_echo "no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008857 ipv6=no
8858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008860fi
8861
8862if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008863 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008864
8865fi
8866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008867fi
8868
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008869
8870ipv6type=unknown
8871ipv6lib=none
8872ipv6trylibc=no
8873
8874if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8876$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008877 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8878 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008879 case $i in
8880 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008882/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008883
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008884#include <netinet/in.h>
8885#ifdef IPV6_INRIA_VERSION
8886yes
8887#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008888_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008889if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008891 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008892fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008893rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008894
8895 ;;
8896 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008898/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008899
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008900#include <netinet/in.h>
8901#ifdef __KAME__
8902yes
8903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008904_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008906 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008907 ipv6type=$i;
8908 ipv6lib=inet6
8909 ipv6libdir=/usr/local/v6/lib
8910 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008911fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008912rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008913
8914 ;;
8915 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008917/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008918
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008919#include <features.h>
8920#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8921yes
8922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008923_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008925 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008926 ipv6type=$i;
8927 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008928fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008929rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008930
8931 ;;
8932 linux-inet6)
8933 if test -d /usr/inet6; then
8934 ipv6type=$i
8935 ipv6lib=inet6
8936 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008937 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008938 fi
8939 ;;
8940 solaris)
8941 if test -f /etc/netconfig; then
8942 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
8943 ipv6type=$i
8944 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008945 fi
8946 fi
8947 ;;
8948 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008950/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008951
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008952#include <sys/param.h>
8953#ifdef _TOSHIBA_INET6
8954yes
8955#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008956_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008957if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008959 ipv6type=$i;
8960 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008961 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008962fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008963rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008964
8965 ;;
8966 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008968/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008969
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008970#include </usr/local/v6/include/sys/v6config.h>
8971#ifdef __V6D__
8972yes
8973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008974_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008977 ipv6type=$i;
8978 ipv6lib=v6;
8979 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00008980 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008981fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008982rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008983
8984 ;;
8985 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00008986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008987/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008988
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008989#include <sys/param.h>
8990#ifdef _ZETA_MINAMI_INET6
8991yes
8992#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008993_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008994if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008996 ipv6type=$i;
8997 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008998 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008999fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009000rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001
9002 ;;
9003 esac
9004 if test "$ipv6type" != "unknown"; then
9005 break
9006 fi
9007 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9009$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009010fi
9011
9012if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9013 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9014 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9015 echo "using lib$ipv6lib"
9016 else
9017 if test $ipv6trylibc = "yes"; then
9018 echo "using libc"
9019 else
9020 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9021 echo "You need to fetch lib$ipv6lib.a from appropriate"
9022 echo 'ipv6 kit and compile beforehand.'
9023 exit 1
9024 fi
9025 fi
9026fi
9027
Matthias Kloseb9621712010-04-24 17:59:49 +00009028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9029$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009031/* end confdefs.h. */
9032#include <Carbon/Carbon.h>
9033int
9034main ()
9035{
9036FSIORefNum fRef = 0
9037 ;
9038 return 0;
9039}
9040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009041if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009042
Matthias Kloseb9621712010-04-24 17:59:49 +00009043$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009044
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9046$as_echo "yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009047else
Matthias Kloseb9621712010-04-24 17:59:49 +00009048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9049$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009050
9051fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9053
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009054# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9056$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009058# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009059if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009060 withval=$with_doc_strings;
9061fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009062
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009063
9064if test -z "$with_doc_strings"
9065then with_doc_strings="yes"
9066fi
9067if test "$with_doc_strings" != "no"
9068then
9069
Matthias Kloseb9621712010-04-24 17:59:49 +00009070$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009071
9072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9074$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009075
Neil Schemenauera35c6882001-02-27 04:45:05 +00009076# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9078$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009079
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009080# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009081if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009082 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009083if test "$withval" != no
9084then
9085
Matthias Kloseb9621712010-04-24 17:59:49 +00009086$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009087
Matthias Kloseb9621712010-04-24 17:59:49 +00009088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9089$as_echo "yes" >&6; }
9090else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9091$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009092fi
9093else
Matthias Kloseb9621712010-04-24 17:59:49 +00009094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9095$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009096fi
9097
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009098
9099# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9101$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009103# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009104if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009105 withval=$with_pymalloc;
9106fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009107
Neil Schemenauera35c6882001-02-27 04:45:05 +00009108
Neil Schemenauer16c22972002-03-22 15:34:49 +00009109if test -z "$with_pymalloc"
9110then with_pymalloc="yes"
9111fi
9112if test "$with_pymalloc" != "no"
9113then
Martin v. Löwis11437992002-04-12 09:54:03 +00009114
Matthias Kloseb9621712010-04-24 17:59:49 +00009115$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009116
9117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9119$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009120
Benjamin Peterson05159c42009-12-03 03:01:27 +00009121# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9123$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009124
9125# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009126if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009127 withval=$with_valgrind;
9128else
9129 with_valgrind=no
9130fi
9131
Matthias Kloseb9621712010-04-24 17:59:49 +00009132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9133$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009134if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009135 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9136if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009137
Matthias Kloseb9621712010-04-24 17:59:49 +00009138$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009139
9140else
Matthias Kloseb9621712010-04-24 17:59:49 +00009141 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009142
9143fi
9144
9145
9146fi
9147
Barry Warsawef82cd72000-06-30 16:21:01 +00009148# Check for --with-wctype-functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9150$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009151
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009152# Check whether --with-wctype-functions was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009153if test "${with_wctype_functions+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009154 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009155if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009156then
9157
Matthias Kloseb9621712010-04-24 17:59:49 +00009158$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009159
Matthias Kloseb9621712010-04-24 17:59:49 +00009160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9161$as_echo "yes" >&6; }
9162else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9163$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009164fi
9165else
Matthias Kloseb9621712010-04-24 17:59:49 +00009166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9167$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009168fi
9169
Barry Warsawef82cd72000-06-30 16:21:01 +00009170
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009171# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009172
Guido van Rossum98935bf2001-09-05 19:13:16 +00009173DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009174
Guido van Rossume97ee181999-12-20 21:27:22 +00009175# the dlopen() function means we might want to use dynload_shlib.o. some
9176# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009177for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009178do :
9179 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9180if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009181 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009182#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009183_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009184
Guido van Rossume97ee181999-12-20 21:27:22 +00009185fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009186done
Guido van Rossume97ee181999-12-20 21:27:22 +00009187
Michael W. Hudson54241132001-12-07 15:38:26 +00009188
Guido van Rossume97ee181999-12-20 21:27:22 +00009189# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9190# loading of modules.
9191
Matthias Kloseb9621712010-04-24 17:59:49 +00009192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9193$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009194if test -z "$DYNLOADFILE"
9195then
9196 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009197 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9198 if test "$ac_cv_func_dlopen" = yes
9199 then DYNLOADFILE="dynload_shlib.o"
9200 else DYNLOADFILE="dynload_aix.o"
9201 fi
9202 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009203 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009204 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9205 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009206 *)
9207 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9208 # out any dynamic loading
9209 if test "$ac_cv_func_dlopen" = yes
9210 then DYNLOADFILE="dynload_shlib.o"
9211 else DYNLOADFILE="dynload_stub.o"
9212 fi
9213 ;;
9214 esac
9215fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9217$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009218if test "$DYNLOADFILE" != "dynload_stub.o"
9219then
Martin v. Löwis11437992002-04-12 09:54:03 +00009220
Matthias Kloseb9621712010-04-24 17:59:49 +00009221$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009222
9223fi
9224
Neil Schemenauer4e425612001-06-19 15:44:15 +00009225# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9226
Michael W. Hudson54241132001-12-07 15:38:26 +00009227
Matthias Kloseb9621712010-04-24 17:59:49 +00009228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9229$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009230if test -z "$MACHDEP_OBJS"
9231then
Jack Jansene578a632001-08-15 01:27:14 +00009232 MACHDEP_OBJS=$extra_machdep_objs
9233else
9234 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9237$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009238
Guido van Rossum627b2d71993-12-24 10:39:16 +00009239# checks for library functions
Martin v. Löwis823725e2008-03-24 13:39:54 +00009240for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9241 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009242 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009243 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009244 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009245 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009246 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009247 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9248 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009249 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
9250 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009251 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009252 truncate uname unsetenv utimes waitpid wait3 wait4 \
9253 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009254do :
9255 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9256ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9257eval as_val=\$$as_ac_var
9258 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009259 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009260#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009261_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009262
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009263fi
9264done
9265
Michael W. Hudson54241132001-12-07 15:38:26 +00009266
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009267# For some functions, having a definition is not sufficient, since
9268# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9270$as_echo_n "checking for chroot... " >&6; }
9271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009272/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009273#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009274int
9275main ()
9276{
9277void *x=chroot
9278 ;
9279 return 0;
9280}
9281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009282if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009283
Matthias Kloseb9621712010-04-24 17:59:49 +00009284$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009285
Matthias Kloseb9621712010-04-24 17:59:49 +00009286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9287$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009288else
Matthias Kloseb9621712010-04-24 17:59:49 +00009289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9290$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009291
9292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9295$as_echo_n "checking for link... " >&6; }
9296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009297/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009298#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009299int
9300main ()
9301{
9302void *x=link
9303 ;
9304 return 0;
9305}
9306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009307if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009308
Matthias Kloseb9621712010-04-24 17:59:49 +00009309$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009310
Matthias Kloseb9621712010-04-24 17:59:49 +00009311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9312$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009313else
Matthias Kloseb9621712010-04-24 17:59:49 +00009314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9315$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009316
9317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9320$as_echo_n "checking for symlink... " >&6; }
9321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009322/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009323#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009324int
9325main ()
9326{
9327void *x=symlink
9328 ;
9329 return 0;
9330}
9331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009332if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009333
Matthias Kloseb9621712010-04-24 17:59:49 +00009334$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009335
Matthias Kloseb9621712010-04-24 17:59:49 +00009336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9337$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009338else
Matthias Kloseb9621712010-04-24 17:59:49 +00009339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9340$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009341
9342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9345$as_echo_n "checking for fchdir... " >&6; }
9346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009347/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009348#include <unistd.h>
9349int
9350main ()
9351{
9352void *x=fchdir
9353 ;
9354 return 0;
9355}
9356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009357if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009358
Matthias Kloseb9621712010-04-24 17:59:49 +00009359$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009360
Matthias Kloseb9621712010-04-24 17:59:49 +00009361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9362$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009363else
Matthias Kloseb9621712010-04-24 17:59:49 +00009364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9365$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009366
9367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9370$as_echo_n "checking for fsync... " >&6; }
9371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009372/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009373#include <unistd.h>
9374int
9375main ()
9376{
9377void *x=fsync
9378 ;
9379 return 0;
9380}
9381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009382if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009383
Matthias Kloseb9621712010-04-24 17:59:49 +00009384$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009385
Matthias Kloseb9621712010-04-24 17:59:49 +00009386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9387$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009388else
Matthias Kloseb9621712010-04-24 17:59:49 +00009389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9390$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009391
9392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9395$as_echo_n "checking for fdatasync... " >&6; }
9396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009397/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009398#include <unistd.h>
9399int
9400main ()
9401{
9402void *x=fdatasync
9403 ;
9404 return 0;
9405}
9406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009407if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009408
Matthias Kloseb9621712010-04-24 17:59:49 +00009409$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009410
Matthias Kloseb9621712010-04-24 17:59:49 +00009411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9412$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009413else
Matthias Kloseb9621712010-04-24 17:59:49 +00009414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9415$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009416
9417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9420$as_echo_n "checking for epoll... " >&6; }
9421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009422/* end confdefs.h. */
9423#include <sys/epoll.h>
9424int
9425main ()
9426{
9427void *x=epoll_create
9428 ;
9429 return 0;
9430}
9431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009432if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009433
Matthias Kloseb9621712010-04-24 17:59:49 +00009434$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009435
Matthias Kloseb9621712010-04-24 17:59:49 +00009436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9437$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009438else
Matthias Kloseb9621712010-04-24 17:59:49 +00009439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9440$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009441
9442fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9445$as_echo_n "checking for kqueue... " >&6; }
9446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009447/* end confdefs.h. */
9448
9449#include <sys/types.h>
9450#include <sys/event.h>
9451
9452int
9453main ()
9454{
9455int x=kqueue()
9456 ;
9457 return 0;
9458}
9459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009460if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009461
Matthias Kloseb9621712010-04-24 17:59:49 +00009462$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009463
Matthias Kloseb9621712010-04-24 17:59:49 +00009464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9465$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009466else
Matthias Kloseb9621712010-04-24 17:59:49 +00009467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9468$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009469
9470fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009472# On some systems (eg. FreeBSD 5), we would find a definition of the
9473# functions ctermid_r, setgroups in the library, but no prototype
9474# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9475# address to avoid compiler warnings and potential miscompilations
9476# because of the missing prototypes.
9477
Matthias Kloseb9621712010-04-24 17:59:49 +00009478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9479$as_echo_n "checking for ctermid_r... " >&6; }
9480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009481/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009482
9483#include "confdefs.h"
9484#include <stdio.h>
9485
Martin v. Löwisd5843682002-11-21 20:41:28 +00009486int
9487main ()
9488{
9489void* p = ctermid_r
9490 ;
9491 return 0;
9492}
9493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009494if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009495
Matthias Kloseb9621712010-04-24 17:59:49 +00009496$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009497
Matthias Kloseb9621712010-04-24 17:59:49 +00009498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9499$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009500else
Matthias Kloseb9621712010-04-24 17:59:49 +00009501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9502$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009503
9504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9506
Matthias Kloseb9621712010-04-24 17:59:49 +00009507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
9508$as_echo_n "checking for flock... " >&6; }
9509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009510/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009511
9512#include "confdefs.h"
9513#include <sys/file.h>
9514
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009515int
9516main ()
9517{
9518void* p = flock
9519 ;
9520 return 0;
9521}
9522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009523if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009524
Matthias Kloseb9621712010-04-24 17:59:49 +00009525$as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009526
Matthias Kloseb9621712010-04-24 17:59:49 +00009527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9528$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009529else
Matthias Kloseb9621712010-04-24 17:59:49 +00009530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9531$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009532
9533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9535
Matthias Kloseb9621712010-04-24 17:59:49 +00009536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9537$as_echo_n "checking for getpagesize... " >&6; }
9538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009539/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009540
9541#include "confdefs.h"
9542#include <unistd.h>
9543
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009544int
9545main ()
9546{
9547void* p = getpagesize
9548 ;
9549 return 0;
9550}
9551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009552if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009553
Matthias Kloseb9621712010-04-24 17:59:49 +00009554$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009555
Matthias Kloseb9621712010-04-24 17:59:49 +00009556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9557$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009558else
Matthias Kloseb9621712010-04-24 17:59:49 +00009559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9560$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009561
9562fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009564
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009565for ac_prog in true
9566do
9567 # Extract the first word of "$ac_prog", so it can be a program name with args.
9568set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9570$as_echo_n "checking for $ac_word... " >&6; }
9571if test "${ac_cv_prog_TRUE+set}" = set; then :
9572 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009573else
9574 if test -n "$TRUE"; then
9575 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9576else
9577as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9578for as_dir in $PATH
9579do
9580 IFS=$as_save_IFS
9581 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009582 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009583 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 +00009584 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009585 $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 +00009586 break 2
9587 fi
9588done
Matthias Kloseb9621712010-04-24 17:59:49 +00009589 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009590IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009591
9592fi
9593fi
9594TRUE=$ac_cv_prog_TRUE
9595if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9597$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009598else
Matthias Kloseb9621712010-04-24 17:59:49 +00009599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9600$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009601fi
9602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009603
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009604 test -n "$TRUE" && break
9605done
9606test -n "$TRUE" || TRUE="/bin/true"
9607
9608
Matthias Kloseb9621712010-04-24 17:59:49 +00009609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9610$as_echo_n "checking for inet_aton in -lc... " >&6; }
9611if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9612 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009613else
9614 ac_check_lib_save_LIBS=$LIBS
9615LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009617/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009618
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009619/* Override any GCC internal prototype to avoid an error.
9620 Use char because int might match the return type of a GCC
9621 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009622#ifdef __cplusplus
9623extern "C"
9624#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009625char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009626int
9627main ()
9628{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009629return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009630 ;
9631 return 0;
9632}
9633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009634if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009635 ac_cv_lib_c_inet_aton=yes
9636else
Matthias Kloseb9621712010-04-24 17:59:49 +00009637 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009639rm -f core conftest.err conftest.$ac_objext \
9640 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009641LIBS=$ac_check_lib_save_LIBS
9642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9644$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9645if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009646 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009647else
Matthias Kloseb9621712010-04-24 17:59:49 +00009648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9649$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9650if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9651 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009652else
9653 ac_check_lib_save_LIBS=$LIBS
9654LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009656/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009657
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009658/* Override any GCC internal prototype to avoid an error.
9659 Use char because int might match the return type of a GCC
9660 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009661#ifdef __cplusplus
9662extern "C"
9663#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009664char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009665int
9666main ()
9667{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009668return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009669 ;
9670 return 0;
9671}
9672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009673if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009674 ac_cv_lib_resolv_inet_aton=yes
9675else
Matthias Kloseb9621712010-04-24 17:59:49 +00009676 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009678rm -f core conftest.err conftest.$ac_objext \
9679 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009680LIBS=$ac_check_lib_save_LIBS
9681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9683$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9684if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009685 cat >>confdefs.h <<_ACEOF
9686#define HAVE_LIBRESOLV 1
9687_ACEOF
9688
9689 LIBS="-lresolv $LIBS"
9690
9691fi
9692
9693
9694fi
9695
9696
Christian Heimesd0764e22007-12-04 15:00:33 +00009697# On Tru64, chflags seems to be present, but calling it will
9698# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9700$as_echo_n "checking for chflags... " >&6; }
9701if test "${ac_cv_have_chflags+set}" = set; then :
9702 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009703else
Matthias Kloseb9621712010-04-24 17:59:49 +00009704 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009705 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009706else
Matthias Kloseb9621712010-04-24 17:59:49 +00009707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009708/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009709[
Christian Heimesd0764e22007-12-04 15:00:33 +00009710#include <sys/stat.h>
9711#include <unistd.h>
9712int main(int argc, char*argv[])
9713{
9714 if(chflags(argv[0], 0) != 0)
9715 return 1;
9716 return 0;
9717}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009718]
Christian Heimesd0764e22007-12-04 15:00:33 +00009719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009720if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009721 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009722else
Matthias Kloseb9621712010-04-24 17:59:49 +00009723 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9726 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009727fi
9728
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009729
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9732$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009733if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009734 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9735if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009736 ac_cv_have_chflags="yes"
9737else
9738 ac_cv_have_chflags="no"
9739fi
9740
9741fi
9742if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009743
Matthias Kloseb9621712010-04-24 17:59:49 +00009744$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009745
9746fi
9747
Matthias Kloseb9621712010-04-24 17:59:49 +00009748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9749$as_echo_n "checking for lchflags... " >&6; }
9750if test "${ac_cv_have_lchflags+set}" = set; then :
9751 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009752else
Matthias Kloseb9621712010-04-24 17:59:49 +00009753 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009754 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009755else
Matthias Kloseb9621712010-04-24 17:59:49 +00009756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009757/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009758[
Christian Heimesd0764e22007-12-04 15:00:33 +00009759#include <sys/stat.h>
9760#include <unistd.h>
9761int main(int argc, char*argv[])
9762{
9763 if(lchflags(argv[0], 0) != 0)
9764 return 1;
9765 return 0;
9766}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009767]
Christian Heimesd0764e22007-12-04 15:00:33 +00009768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009769if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009770 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009771else
Matthias Kloseb9621712010-04-24 17:59:49 +00009772 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9775 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009776fi
9777
9778
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9781$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009782if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009783 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9784if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009785 ac_cv_have_lchflags="yes"
9786else
9787 ac_cv_have_lchflags="no"
9788fi
9789
9790fi
9791if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009792
Matthias Kloseb9621712010-04-24 17:59:49 +00009793$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009794
9795fi
9796
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009797case $ac_sys_system/$ac_sys_release in
9798Darwin/*)
9799 _CUR_CFLAGS="${CFLAGS}"
9800 _CUR_LDFLAGS="${LDFLAGS}"
9801 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9802 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9803 ;;
9804esac
9805
Matthias Kloseb9621712010-04-24 17:59:49 +00009806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9807$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9808if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9809 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009810else
9811 ac_check_lib_save_LIBS=$LIBS
9812LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009814/* end confdefs.h. */
9815
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009816/* Override any GCC internal prototype to avoid an error.
9817 Use char because int might match the return type of a GCC
9818 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009819#ifdef __cplusplus
9820extern "C"
9821#endif
9822char inflateCopy ();
9823int
9824main ()
9825{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009826return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009827 ;
9828 return 0;
9829}
9830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009831if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009832 ac_cv_lib_z_inflateCopy=yes
9833else
Matthias Kloseb9621712010-04-24 17:59:49 +00009834 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009836rm -f core conftest.err conftest.$ac_objext \
9837 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009838LIBS=$ac_check_lib_save_LIBS
9839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9841$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9842if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009843
Matthias Kloseb9621712010-04-24 17:59:49 +00009844$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009845
9846fi
9847
9848
9849case $ac_sys_system/$ac_sys_release in
9850Darwin/*)
9851 CFLAGS="${_CUR_CFLAGS}"
9852 LDFLAGS="${_CUR_LDFLAGS}"
9853 ;;
9854esac
9855
Matthias Kloseb9621712010-04-24 17:59:49 +00009856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9857$as_echo_n "checking for hstrerror... " >&6; }
9858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009859/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009860
9861#include "confdefs.h"
9862#include <netdb.h>
9863
Martin v. Löwise9416172003-05-03 10:12:45 +00009864int
9865main ()
9866{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009867void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009868 ;
9869 return 0;
9870}
9871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009872if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009873
Matthias Kloseb9621712010-04-24 17:59:49 +00009874$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009875
Matthias Kloseb9621712010-04-24 17:59:49 +00009876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9877$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009878else
Matthias Kloseb9621712010-04-24 17:59:49 +00009879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9880$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009881
9882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009883rm -f core conftest.err conftest.$ac_objext \
9884 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885
Matthias Kloseb9621712010-04-24 17:59:49 +00009886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9887$as_echo_n "checking for inet_aton... " >&6; }
9888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009889/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009890
9891#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +00009892#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009893#include <sys/socket.h>
9894#include <netinet/in.h>
9895#include <arpa/inet.h>
9896
Martin v. Löwise9416172003-05-03 10:12:45 +00009897int
9898main ()
9899{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009900void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009901 ;
9902 return 0;
9903}
9904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009905if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009906
Matthias Kloseb9621712010-04-24 17:59:49 +00009907$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009908
Matthias Kloseb9621712010-04-24 17:59:49 +00009909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9910$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009911else
Matthias Kloseb9621712010-04-24 17:59:49 +00009912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9913$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009914
9915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009916rm -f core conftest.err conftest.$ac_objext \
9917 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009918
Matthias Kloseb9621712010-04-24 17:59:49 +00009919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9920$as_echo_n "checking for inet_pton... " >&6; }
9921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009922/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009923
9924#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009925#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009926#include <sys/socket.h>
9927#include <netinet/in.h>
9928#include <arpa/inet.h>
9929
Martin v. Löwise9416172003-05-03 10:12:45 +00009930int
9931main ()
9932{
9933void* p = inet_pton
9934 ;
9935 return 0;
9936}
9937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009938if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009939
Matthias Kloseb9621712010-04-24 17:59:49 +00009940$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009941
Matthias Kloseb9621712010-04-24 17:59:49 +00009942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9943$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009944else
Matthias Kloseb9621712010-04-24 17:59:49 +00009945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9946$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009947
9948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +00009950
Martin v. Löwisd6640d42003-07-06 09:29:52 +00009951# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +00009952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
9953$as_echo_n "checking for setgroups... " >&6; }
9954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009955/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009956
9957#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009958#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +00009959#ifdef HAVE_GRP_H
9960#include <grp.h>
9961#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +00009962
Martin v. Löwisd5843682002-11-21 20:41:28 +00009963int
9964main ()
9965{
9966void* p = setgroups
9967 ;
9968 return 0;
9969}
9970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009971if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009972
Matthias Kloseb9621712010-04-24 17:59:49 +00009973$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009974
Matthias Kloseb9621712010-04-24 17:59:49 +00009975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9976$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009977else
Matthias Kloseb9621712010-04-24 17:59:49 +00009978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9979$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009980
9981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009983
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009984# check for openpty and forkpty
9985
9986for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009987do :
9988 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
9989if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009990 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009991#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009992_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009993
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009994else
Matthias Kloseb9621712010-04-24 17:59:49 +00009995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
9996$as_echo_n "checking for openpty in -lutil... " >&6; }
9997if test "${ac_cv_lib_util_openpty+set}" = set; then :
9998 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00009999else
Martin v. Löwis11437992002-04-12 09:54:03 +000010000 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010001LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010003/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010005/* Override any GCC internal prototype to avoid an error.
10006 Use char because int might match the return type of a GCC
10007 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010008#ifdef __cplusplus
10009extern "C"
10010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010011char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010012int
10013main ()
10014{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010016 ;
10017 return 0;
10018}
10019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010020if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010021 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010022else
Matthias Kloseb9621712010-04-24 17:59:49 +000010023 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010025rm -f core conftest.err conftest.$ac_objext \
10026 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010027LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10030$as_echo "$ac_cv_lib_util_openpty" >&6; }
10031if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10032 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010033 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010034else
Matthias Kloseb9621712010-04-24 17:59:49 +000010035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10036$as_echo_n "checking for openpty in -lbsd... " >&6; }
10037if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10038 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010039else
10040 ac_check_lib_save_LIBS=$LIBS
10041LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010043/* end confdefs.h. */
10044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010045/* Override any GCC internal prototype to avoid an error.
10046 Use char because int might match the return type of a GCC
10047 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010048#ifdef __cplusplus
10049extern "C"
10050#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010051char openpty ();
10052int
10053main ()
10054{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010055return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010056 ;
10057 return 0;
10058}
10059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010060if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010061 ac_cv_lib_bsd_openpty=yes
10062else
Matthias Kloseb9621712010-04-24 17:59:49 +000010063 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010065rm -f core conftest.err conftest.$ac_objext \
10066 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010067LIBS=$ac_check_lib_save_LIBS
10068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10070$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10071if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10072 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010073 LIBS="$LIBS -lbsd"
10074fi
10075
10076
10077fi
10078
Fred Drake8cef4cf2000-06-28 16:40:38 +000010079
10080fi
10081done
10082
10083for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010084do :
10085 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10086if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010087 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010088#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010089_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010090
Fred Drake8cef4cf2000-06-28 16:40:38 +000010091else
Matthias Kloseb9621712010-04-24 17:59:49 +000010092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10093$as_echo_n "checking for forkpty in -lutil... " >&6; }
10094if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10095 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010096else
Martin v. Löwis11437992002-04-12 09:54:03 +000010097 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010098LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010100/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010102/* Override any GCC internal prototype to avoid an error.
10103 Use char because int might match the return type of a GCC
10104 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010105#ifdef __cplusplus
10106extern "C"
10107#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010108char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010109int
10110main ()
10111{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010112return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010113 ;
10114 return 0;
10115}
10116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010117if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010118 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010119else
Matthias Kloseb9621712010-04-24 17:59:49 +000010120 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010122rm -f core conftest.err conftest.$ac_objext \
10123 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010124LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010125fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10127$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10128if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10129 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010130 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010131else
Matthias Kloseb9621712010-04-24 17:59:49 +000010132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10133$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10134if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10135 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010136else
10137 ac_check_lib_save_LIBS=$LIBS
10138LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010140/* end confdefs.h. */
10141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010142/* Override any GCC internal prototype to avoid an error.
10143 Use char because int might match the return type of a GCC
10144 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010145#ifdef __cplusplus
10146extern "C"
10147#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010148char forkpty ();
10149int
10150main ()
10151{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010152return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010153 ;
10154 return 0;
10155}
10156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010157if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010158 ac_cv_lib_bsd_forkpty=yes
10159else
Matthias Kloseb9621712010-04-24 17:59:49 +000010160 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010162rm -f core conftest.err conftest.$ac_objext \
10163 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010164LIBS=$ac_check_lib_save_LIBS
10165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10167$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10168if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10169 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010170 LIBS="$LIBS -lbsd"
10171fi
10172
10173
10174fi
10175
Fred Drake8cef4cf2000-06-28 16:40:38 +000010176
10177fi
10178done
10179
Jack Jansendd19cf82001-12-06 22:36:17 +000010180
Christian Heimesb186d002008-03-18 15:15:01 +000010181# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010182for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010183do :
10184 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10185if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010186 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010187#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010188_ACEOF
10189
10190fi
10191done
10192
10193
Michael W. Hudson54241132001-12-07 15:38:26 +000010194# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010195for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010196do :
10197 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10198ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10199eval as_val=\$$as_ac_var
10200 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010201 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010202#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010203_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010204
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010205fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010206done
10207
Michael W. Hudson54241132001-12-07 15:38:26 +000010208
Christian Heimesb186d002008-03-18 15:15:01 +000010209for ac_func in dup2 getcwd strdup
Matthias Kloseb9621712010-04-24 17:59:49 +000010210do :
10211 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10212ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10213eval as_val=\$$as_ac_var
10214 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010215 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010216#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010217_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010218
Martin v. Löwis1142de32002-03-29 16:28:31 +000010219else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010221 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010222 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
10223 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010224esac
10225
Martin v. Löwis1142de32002-03-29 16:28:31 +000010226fi
10227done
10228
10229
10230for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010231do :
10232 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10233if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010235#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010238/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010239#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010240int
10241main ()
10242{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010243getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 ;
10245 return 0;
10246}
10247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010248if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010249
Matthias Kloseb9621712010-04-24 17:59:49 +000010250$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010252
Guido van Rossum627b2d71993-12-24 10:39:16 +000010253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010255
Guido van Rossum627b2d71993-12-24 10:39:16 +000010256fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010257done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010258
Jack Jansen150753c2003-03-29 22:07:47 +000010259for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010260do :
10261 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10262if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010263 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010264#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010267/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010268#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010269int
10270main ()
10271{
10272setpgrp(0,0);
10273 ;
10274 return 0;
10275}
10276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010277if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010278
Matthias Kloseb9621712010-04-24 17:59:49 +000010279$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010281
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010284
10285fi
10286done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010287
Thomas Wouters3a584202000-08-05 23:28:51 +000010288for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010289do :
10290 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10291if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010293#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010296/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010297#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010298int
10299main ()
10300{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010301gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010302 ;
10303 return 0;
10304}
10305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010306if ac_fn_c_try_compile "$LINENO"; then :
10307
Guido van Rossum627b2d71993-12-24 10:39:16 +000010308else
Skip Montanaro6dead952003-09-25 14:50:04 +000010309
Matthias Kloseb9621712010-04-24 17:59:49 +000010310$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010311
Martin v. Löwis11437992002-04-12 09:54:03 +000010312
Guido van Rossum627b2d71993-12-24 10:39:16 +000010313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010315
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010316fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010317done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010318
Michael W. Hudson54241132001-12-07 15:38:26 +000010319
Matthias Kloseb9621712010-04-24 17:59:49 +000010320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10321$as_echo_n "checking for major... " >&6; }
10322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010323/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010324
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010325#if defined(MAJOR_IN_MKDEV)
10326#include <sys/mkdev.h>
10327#elif defined(MAJOR_IN_SYSMACROS)
10328#include <sys/sysmacros.h>
10329#else
10330#include <sys/types.h>
10331#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010332
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010333int
10334main ()
10335{
10336
10337 makedev(major(0),minor(0));
10338
10339 ;
10340 return 0;
10341}
10342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010343if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010344
10345
Matthias Kloseb9621712010-04-24 17:59:49 +000010346$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010347
Matthias Kloseb9621712010-04-24 17:59:49 +000010348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10349$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010350
10351else
Skip Montanaro6dead952003-09-25 14:50:04 +000010352
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10354$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010355
10356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010357rm -f core conftest.err conftest.$ac_objext \
10358 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010359
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010360# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010361# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10363$as_echo_n "checking for getaddrinfo... " >&6; }
10364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010365/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010366
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010367#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010368#include <sys/socket.h>
10369#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010370#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010371
Martin v. Löwis11437992002-04-12 09:54:03 +000010372int
10373main ()
10374{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010375getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010376 ;
10377 return 0;
10378}
10379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010380if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010381 have_getaddrinfo=yes
10382else
Matthias Kloseb9621712010-04-24 17:59:49 +000010383 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010385rm -f core conftest.err conftest.$ac_objext \
10386 conftest$ac_exeext conftest.$ac_ext
10387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10388$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010389if test $have_getaddrinfo = yes
10390then
Matthias Kloseb9621712010-04-24 17:59:49 +000010391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10392$as_echo_n "checking getaddrinfo bug... " >&6; }
10393 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10394 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010395else
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010397 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010398else
Matthias Kloseb9621712010-04-24 17:59:49 +000010399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010400/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010401
10402#include <sys/types.h>
10403#include <netdb.h>
10404#include <string.h>
10405#include <sys/socket.h>
10406#include <netinet/in.h>
10407
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010408int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010409{
10410 int passive, gaierr, inet4 = 0, inet6 = 0;
10411 struct addrinfo hints, *ai, *aitop;
10412 char straddr[INET6_ADDRSTRLEN], strport[16];
10413
10414 for (passive = 0; passive <= 1; passive++) {
10415 memset(&hints, 0, sizeof(hints));
10416 hints.ai_family = AF_UNSPEC;
10417 hints.ai_flags = passive ? AI_PASSIVE : 0;
10418 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010419 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010420 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10421 (void)gai_strerror(gaierr);
10422 goto bad;
10423 }
10424 for (ai = aitop; ai; ai = ai->ai_next) {
10425 if (ai->ai_addr == NULL ||
10426 ai->ai_addrlen == 0 ||
10427 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10428 straddr, sizeof(straddr), strport, sizeof(strport),
10429 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10430 goto bad;
10431 }
10432 switch (ai->ai_family) {
10433 case AF_INET:
10434 if (strcmp(strport, "54321") != 0) {
10435 goto bad;
10436 }
10437 if (passive) {
10438 if (strcmp(straddr, "0.0.0.0") != 0) {
10439 goto bad;
10440 }
10441 } else {
10442 if (strcmp(straddr, "127.0.0.1") != 0) {
10443 goto bad;
10444 }
10445 }
10446 inet4++;
10447 break;
10448 case AF_INET6:
10449 if (strcmp(strport, "54321") != 0) {
10450 goto bad;
10451 }
10452 if (passive) {
10453 if (strcmp(straddr, "::") != 0) {
10454 goto bad;
10455 }
10456 } else {
10457 if (strcmp(straddr, "::1") != 0) {
10458 goto bad;
10459 }
10460 }
10461 inet6++;
10462 break;
10463 case AF_UNSPEC:
10464 goto bad;
10465 break;
10466 default:
10467 /* another family support? */
10468 break;
10469 }
10470 }
10471 }
10472
10473 if (!(inet4 == 0 || inet4 == 2))
10474 goto bad;
10475 if (!(inet6 == 0 || inet6 == 2))
10476 goto bad;
10477
10478 if (aitop)
10479 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010480 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010481
10482 bad:
10483 if (aitop)
10484 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010485 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010486}
10487
Martin v. Löwis11437992002-04-12 09:54:03 +000010488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010489if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010490 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010491else
Matthias Kloseb9621712010-04-24 17:59:49 +000010492 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10495 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010497
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010498fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010499
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010501
Mark Dickinson2df5d282009-12-31 21:22:50 +000010502if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010503then
10504 if test $ipv6 = yes
10505 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010506 echo 'Fatal: You must get working getaddrinfo() function.'
10507 echo ' or you can specify "--disable-ipv6"'.
10508 exit 1
10509 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010510else
Martin v. Löwis11437992002-04-12 09:54:03 +000010511
Matthias Kloseb9621712010-04-24 17:59:49 +000010512$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010513
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010514fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010515for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010516do :
10517 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10518if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010519 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010520#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010521_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010522
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010523fi
10524done
10525
Michael W. Hudson54241132001-12-07 15:38:26 +000010526
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010527# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10529$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10530if test "${ac_cv_header_time+set}" = set; then :
10531 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010532else
Matthias Kloseb9621712010-04-24 17:59:49 +000010533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010534/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010535#include <sys/types.h>
10536#include <sys/time.h>
10537#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010538
Martin v. Löwis11437992002-04-12 09:54:03 +000010539int
10540main ()
10541{
10542if ((struct tm *) 0)
10543return 0;
10544 ;
10545 return 0;
10546}
10547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010548if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010549 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010550else
Matthias Kloseb9621712010-04-24 17:59:49 +000010551 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10556$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010557if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010558
Matthias Kloseb9621712010-04-24 17:59:49 +000010559$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010560
10561fi
10562
Matthias Kloseb9621712010-04-24 17:59:49 +000010563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10564$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10565if test "${ac_cv_struct_tm+set}" = set; then :
10566 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010567else
Matthias Kloseb9621712010-04-24 17:59:49 +000010568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010569/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010570#include <sys/types.h>
10571#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010572
Martin v. Löwis11437992002-04-12 09:54:03 +000010573int
10574main ()
10575{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010576struct tm tm;
10577 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010578 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010579 ;
10580 return 0;
10581}
10582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010583if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010584 ac_cv_struct_tm=time.h
10585else
Matthias Kloseb9621712010-04-24 17:59:49 +000010586 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10591$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010592if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010593
Matthias Kloseb9621712010-04-24 17:59:49 +000010594$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010595
10596fi
10597
Matthias Kloseb9621712010-04-24 17:59:49 +000010598ac_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 +000010599#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010600
Matthias Kloseb9621712010-04-24 17:59:49 +000010601"
10602if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010603
10604cat >>confdefs.h <<_ACEOF
10605#define HAVE_STRUCT_TM_TM_ZONE 1
10606_ACEOF
10607
10608
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010609fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010610
Martin v. Löwis11437992002-04-12 09:54:03 +000010611if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10612
Matthias Kloseb9621712010-04-24 17:59:49 +000010613$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010614
10615else
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10617"
10618if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10619 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010620else
Matthias Kloseb9621712010-04-24 17:59:49 +000010621 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010622fi
10623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010624cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010625#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010626_ACEOF
10627
Matthias Kloseb9621712010-04-24 17:59:49 +000010628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10629$as_echo_n "checking for tzname... " >&6; }
10630if test "${ac_cv_var_tzname+set}" = set; then :
10631 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010632else
Matthias Kloseb9621712010-04-24 17:59:49 +000010633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010634/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010635#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010636#if !HAVE_DECL_TZNAME
10637extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010638#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010639
Martin v. Löwis11437992002-04-12 09:54:03 +000010640int
10641main ()
10642{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010643return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010644 ;
10645 return 0;
10646}
10647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010648if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010649 ac_cv_var_tzname=yes
10650else
Matthias Kloseb9621712010-04-24 17:59:49 +000010651 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010652fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010653rm -f core conftest.err conftest.$ac_objext \
10654 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10657$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010658 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010659
Matthias Kloseb9621712010-04-24 17:59:49 +000010660$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010661
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010662 fi
10663fi
10664
Matthias Kloseb9621712010-04-24 17:59:49 +000010665ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10666if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010667
10668cat >>confdefs.h <<_ACEOF
10669#define HAVE_STRUCT_STAT_ST_RDEV 1
10670_ACEOF
10671
10672
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010673fi
10674
Matthias Kloseb9621712010-04-24 17:59:49 +000010675ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10676if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010677
Martin v. Löwis11437992002-04-12 09:54:03 +000010678cat >>confdefs.h <<_ACEOF
10679#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10680_ACEOF
10681
10682
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010683fi
10684
Matthias Kloseb9621712010-04-24 17:59:49 +000010685ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10686if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010687
10688cat >>confdefs.h <<_ACEOF
10689#define HAVE_STRUCT_STAT_ST_FLAGS 1
10690_ACEOF
10691
10692
10693fi
10694
Matthias Kloseb9621712010-04-24 17:59:49 +000010695ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10696if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010697
10698cat >>confdefs.h <<_ACEOF
10699#define HAVE_STRUCT_STAT_ST_GEN 1
10700_ACEOF
10701
10702
10703fi
10704
Matthias Kloseb9621712010-04-24 17:59:49 +000010705ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10706if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010707
10708cat >>confdefs.h <<_ACEOF
10709#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10710_ACEOF
10711
10712
10713fi
10714
Matthias Kloseb9621712010-04-24 17:59:49 +000010715ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10716if test "x$ac_cv_member_struct_stat_st_blocks" = 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_BLOCKS 1
10720_ACEOF
10721
10722
Matthias Kloseb9621712010-04-24 17:59:49 +000010723$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010724
10725else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010726 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010727 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010728 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10729 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010730esac
10731
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010732fi
10733
Michael W. Hudson54241132001-12-07 15:38:26 +000010734
Martin v. Löwis11437992002-04-12 09:54:03 +000010735
Matthias Kloseb9621712010-04-24 17:59:49 +000010736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10737$as_echo_n "checking for time.h that defines altzone... " >&6; }
10738if test "${ac_cv_header_time_altzone+set}" = set; then :
10739 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010740else
Matthias Kloseb9621712010-04-24 17:59:49 +000010741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010742/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010743#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010744int
10745main ()
10746{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010747return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010748 ;
10749 return 0;
10750}
10751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010752if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010753 ac_cv_header_time_altzone=yes
10754else
Matthias Kloseb9621712010-04-24 17:59:49 +000010755 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10758fi
10759
Matthias Kloseb9621712010-04-24 17:59:49 +000010760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10761$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010762if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010763
Matthias Kloseb9621712010-04-24 17:59:49 +000010764$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010765
10766fi
10767
Guido van Rossumda88dad1995-01-26 00:46:29 +000010768was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10770$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010772/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010773
10774#include <sys/types.h>
10775#include <sys/select.h>
10776#include <sys/time.h>
10777
Martin v. Löwis11437992002-04-12 09:54:03 +000010778int
10779main ()
10780{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010781;
Martin v. Löwis11437992002-04-12 09:54:03 +000010782 ;
10783 return 0;
10784}
10785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010786if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010787
10788
Matthias Kloseb9621712010-04-24 17:59:49 +000010789$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010790
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010791 was_it_defined=yes
10792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10796$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010797
Matthias Kloseb9621712010-04-24 17:59:49 +000010798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10799$as_echo_n "checking for addrinfo... " >&6; }
10800if test "${ac_cv_struct_addrinfo+set}" = set; then :
10801 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010802else
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010804/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010805
10806# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010807int
10808main ()
10809{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010810struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010811 ;
10812 return 0;
10813}
10814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010815if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010816 ac_cv_struct_addrinfo=yes
10817else
Matthias Kloseb9621712010-04-24 17:59:49 +000010818 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10821fi
10822
Matthias Kloseb9621712010-04-24 17:59:49 +000010823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10824$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010825if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010826
Matthias Kloseb9621712010-04-24 17:59:49 +000010827$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010828
10829fi
10830
Matthias Kloseb9621712010-04-24 17:59:49 +000010831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10832$as_echo_n "checking for sockaddr_storage... " >&6; }
10833if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10834 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010835else
Matthias Kloseb9621712010-04-24 17:59:49 +000010836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010837/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010838
10839# include <sys/types.h>
10840# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010841int
10842main ()
10843{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010844struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010845 ;
10846 return 0;
10847}
10848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010849if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010850 ac_cv_struct_sockaddr_storage=yes
10851else
Matthias Kloseb9621712010-04-24 17:59:49 +000010852 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10855fi
10856
Matthias Kloseb9621712010-04-24 17:59:49 +000010857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10858$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010859if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010860
Matthias Kloseb9621712010-04-24 17:59:49 +000010861$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010862
10863fi
10864
Guido van Rossum627b2d71993-12-24 10:39:16 +000010865# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010866
Matthias Kloseb9621712010-04-24 17:59:49 +000010867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10868$as_echo_n "checking whether char is unsigned... " >&6; }
10869if test "${ac_cv_c_char_unsigned+set}" = set; then :
10870 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010871else
Matthias Kloseb9621712010-04-24 17:59:49 +000010872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010874$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010875int
10876main ()
10877{
10878static int test_array [1 - 2 * !(((char) -1) < 0)];
10879test_array [0] = 0
10880
10881 ;
10882 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010883}
Martin v. Löwis11437992002-04-12 09:54:03 +000010884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010885if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010886 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010887else
Matthias Kloseb9621712010-04-24 17:59:49 +000010888 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10893$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010894if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010896
10897fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010898
Matthias Kloseb9621712010-04-24 17:59:49 +000010899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10900$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10901if test "${ac_cv_c_const+set}" = set; then :
10902 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010903else
Matthias Kloseb9621712010-04-24 17:59:49 +000010904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010905/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010906
Martin v. Löwis11437992002-04-12 09:54:03 +000010907int
10908main ()
10909{
10910/* FIXME: Include the comments suggested by Paul. */
10911#ifndef __cplusplus
10912 /* Ultrix mips cc rejects this. */
10913 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010914 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000010915 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010916 char const *const *pcpcc;
10917 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010918 /* NEC SVR4.0.2 mips cc rejects this. */
10919 struct point {int x, y;};
10920 static struct point const zero = {0,0};
10921 /* AIX XL C 1.02.0.0 rejects this.
10922 It does not let you subtract one const X* pointer from another in
10923 an arm of an if-expression whose if-part is not a constant
10924 expression */
10925 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010926 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010927 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010928 ++pcpcc;
10929 ppc = (char**) pcpcc;
10930 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010931 { /* SCO 3.2v4 cc rejects this. */
10932 char *t;
10933 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010934
Martin v. Löwis11437992002-04-12 09:54:03 +000010935 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010936 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010937 }
10938 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
10939 int x[] = {25, 17};
10940 const int *foo = &x[0];
10941 ++foo;
10942 }
10943 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10944 typedef const int *iptr;
10945 iptr p = 0;
10946 ++p;
10947 }
10948 { /* AIX XL C 1.02.0.0 rejects this saying
10949 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10950 struct s { int j; const int *ap[3]; };
10951 struct s *b; b->j = 5;
10952 }
10953 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10954 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010955 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010956 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010957 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000010958#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000010959
Martin v. Löwis11437992002-04-12 09:54:03 +000010960 ;
10961 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000010962}
Martin v. Löwis11437992002-04-12 09:54:03 +000010963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010964if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010965 ac_cv_c_const=yes
10966else
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
10972$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010973if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010974
Matthias Kloseb9621712010-04-24 17:59:49 +000010975$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010976
10977fi
10978
Michael W. Hudson54241132001-12-07 15:38:26 +000010979
Guido van Rossumda88dad1995-01-26 00:46:29 +000010980works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
10982$as_echo_n "checking for working volatile... " >&6; }
10983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010984/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010985
Martin v. Löwis11437992002-04-12 09:54:03 +000010986int
10987main ()
10988{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010989volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010990 ;
10991 return 0;
10992}
10993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010994if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000010995 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010996else
Skip Montanaro6dead952003-09-25 14:50:04 +000010997
Matthias Kloseb9621712010-04-24 17:59:49 +000010998$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010999
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011000
Guido van Rossum627b2d71993-12-24 10:39:16 +000011001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11004$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011005
Guido van Rossumda88dad1995-01-26 00:46:29 +000011006works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11008$as_echo_n "checking for working signed char... " >&6; }
11009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011010/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011011
Martin v. Löwis11437992002-04-12 09:54:03 +000011012int
11013main ()
11014{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011015signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011016 ;
11017 return 0;
11018}
11019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011020if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011021 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011022else
Skip Montanaro6dead952003-09-25 14:50:04 +000011023
Matthias Kloseb9621712010-04-24 17:59:49 +000011024$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011025
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011026
Guido van Rossum7f43da71994-08-01 12:15:30 +000011027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11030$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011031
Guido van Rossumda88dad1995-01-26 00:46:29 +000011032have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11034$as_echo_n "checking for prototypes... " >&6; }
11035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011036/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011037int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011038int
11039main ()
11040{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011041return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011042 ;
11043 return 0;
11044}
11045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011046if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011047
11048
Matthias Kloseb9621712010-04-24 17:59:49 +000011049$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011050
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011051 have_prototypes=yes
11052
Guido van Rossum7f43da71994-08-01 12:15:30 +000011053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11056$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011057
Guido van Rossumda88dad1995-01-26 00:46:29 +000011058works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11060$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011062/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011063
11064#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011065int foo(int x, ...) {
11066 va_list va;
11067 va_start(va, x);
11068 va_arg(va, int);
11069 va_arg(va, char *);
11070 va_arg(va, double);
11071 return 0;
11072}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011073
Martin v. Löwis11437992002-04-12 09:54:03 +000011074int
11075main ()
11076{
Guido van Rossum90eea071996-08-30 20:58:57 +000011077return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011078 ;
11079 return 0;
11080}
11081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011082if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011083
11084
Matthias Kloseb9621712010-04-24 17:59:49 +000011085$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011086
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011087 works=yes
11088
Guido van Rossum627b2d71993-12-24 10:39:16 +000011089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11092$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011093
Martin v. Löwisd6320502004-08-12 13:45:08 +000011094# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11096$as_echo_n "checking for socketpair... " >&6; }
11097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011098/* end confdefs.h. */
11099
11100#include <sys/types.h>
11101#include <sys/socket.h>
11102
11103int
11104main ()
11105{
11106void *x=socketpair
11107 ;
11108 return 0;
11109}
11110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011111if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011112
Matthias Kloseb9621712010-04-24 17:59:49 +000011113$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011114
Matthias Kloseb9621712010-04-24 17:59:49 +000011115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11116$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011117else
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11119$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011120
11121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011123
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011124# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11126$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011128/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011129#include <sys/types.h>
11130#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011131int
11132main ()
11133{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011134struct sockaddr x;
11135x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011136 ;
11137 return 0;
11138}
11139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011140if ac_fn_c_try_compile "$LINENO"; then :
11141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11142$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011143
Matthias Kloseb9621712010-04-24 17:59:49 +000011144$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011145
11146else
Matthias Kloseb9621712010-04-24 17:59:49 +000011147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11148$as_echo "no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011151
Guido van Rossumda88dad1995-01-26 00:46:29 +000011152va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11154$as_echo_n "checking whether va_list is an array... " >&6; }
11155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011156/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011157
11158#ifdef HAVE_STDARG_PROTOTYPES
11159#include <stdarg.h>
11160#else
11161#include <varargs.h>
11162#endif
11163
Martin v. Löwis11437992002-04-12 09:54:03 +000011164int
11165main ()
11166{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011167va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011168 ;
11169 return 0;
11170}
11171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011172if ac_fn_c_try_compile "$LINENO"; then :
11173
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011174else
Skip Montanaro6dead952003-09-25 14:50:04 +000011175
Martin v. Löwis11437992002-04-12 09:54:03 +000011176
Matthias Kloseb9621712010-04-24 17:59:49 +000011177$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011178
Guido van Rossumda88dad1995-01-26 00:46:29 +000011179 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011180
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11184$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011185
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011186# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011187
11188
Matthias Kloseb9621712010-04-24 17:59:49 +000011189ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11190if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011191
Matthias Kloseb9621712010-04-24 17:59:49 +000011192 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011193
Matthias Kloseb9621712010-04-24 17:59:49 +000011194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11195$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011196 OLD_CFLAGS=$CFLAGS
11197 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011199/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011200
11201# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011202
Martin v. Löwis11437992002-04-12 09:54:03 +000011203int
11204main ()
11205{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011206
11207 char *name;
11208 struct hostent *he, *res;
11209 char buffer[2048];
11210 int buflen = 2048;
11211 int h_errnop;
11212
11213 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011214
11215 ;
11216 return 0;
11217}
11218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011219if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011220
Matthias Kloseb9621712010-04-24 17:59:49 +000011221 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011222
Martin v. Löwis11437992002-04-12 09:54:03 +000011223
Matthias Kloseb9621712010-04-24 17:59:49 +000011224$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011225
Matthias Kloseb9621712010-04-24 17:59:49 +000011226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11227$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011228
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011229else
Skip Montanaro6dead952003-09-25 14:50:04 +000011230
Matthias Kloseb9621712010-04-24 17:59:49 +000011231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11232$as_echo "no" >&6; }
11233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11234$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011236/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011237
11238# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011239
Martin v. Löwis11437992002-04-12 09:54:03 +000011240int
11241main ()
11242{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011243
11244 char *name;
11245 struct hostent *he;
11246 char buffer[2048];
11247 int buflen = 2048;
11248 int h_errnop;
11249
11250 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011251
11252 ;
11253 return 0;
11254}
11255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011256if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011257
Matthias Kloseb9621712010-04-24 17:59:49 +000011258 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011259
Martin v. Löwis11437992002-04-12 09:54:03 +000011260
Matthias Kloseb9621712010-04-24 17:59:49 +000011261$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011262
Matthias Kloseb9621712010-04-24 17:59:49 +000011263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11264$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011265
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011266else
Skip Montanaro6dead952003-09-25 14:50:04 +000011267
Matthias Kloseb9621712010-04-24 17:59:49 +000011268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11269$as_echo "no" >&6; }
11270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11271$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011273/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011274
11275# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011276
Martin v. Löwis11437992002-04-12 09:54:03 +000011277int
11278main ()
11279{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011280
11281 char *name;
11282 struct hostent *he;
11283 struct hostent_data data;
11284
11285 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000011286
11287 ;
11288 return 0;
11289}
11290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011291if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011292
Matthias Kloseb9621712010-04-24 17:59:49 +000011293 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011294
Martin v. Löwis11437992002-04-12 09:54:03 +000011295
Matthias Kloseb9621712010-04-24 17:59:49 +000011296$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011297
Matthias Kloseb9621712010-04-24 17:59:49 +000011298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11299$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011300
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011301else
Skip Montanaro6dead952003-09-25 14:50:04 +000011302
Matthias Kloseb9621712010-04-24 17:59:49 +000011303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11304$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011305
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011308
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011311
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011314 CFLAGS=$OLD_CFLAGS
11315
11316else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011317
Matthias Kloseb9621712010-04-24 17:59:49 +000011318 for ac_func in gethostbyname
11319do :
11320 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11321if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011322 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011323#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011324_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011325
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011326fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011327done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011328
Michael W. Hudson54241132001-12-07 15:38:26 +000011329
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011330fi
11331
Michael W. Hudson54241132001-12-07 15:38:26 +000011332
11333
11334
11335
11336
11337
Guido van Rossum627b2d71993-12-24 10:39:16 +000011338# checks for system services
11339# (none yet)
11340
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011341# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011342ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11343if test "x$ac_cv_func___fpu_control" = x""yes; then :
11344
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011345else
Matthias Kloseb9621712010-04-24 17:59:49 +000011346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11347$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11348if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11349 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011350else
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011352LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011356/* Override any GCC internal prototype to avoid an error.
11357 Use char because int might match the return type of a GCC
11358 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011359#ifdef __cplusplus
11360extern "C"
11361#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011362char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011363int
11364main ()
11365{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011366return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011367 ;
11368 return 0;
11369}
11370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011371if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011372 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011373else
Matthias Kloseb9621712010-04-24 17:59:49 +000011374 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011376rm -f core conftest.err conftest.$ac_objext \
11377 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011378LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11381$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11382if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 cat >>confdefs.h <<_ACEOF
11384#define HAVE_LIBIEEE 1
11385_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011386
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011387 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011388
Guido van Rossum627b2d71993-12-24 10:39:16 +000011389fi
11390
Michael W. Hudson54241132001-12-07 15:38:26 +000011391
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011392fi
11393
Michael W. Hudson54241132001-12-07 15:38:26 +000011394
Guido van Rossum7f253911997-05-09 02:42:48 +000011395# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11397$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011399# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011400if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011401 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011402if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011403then
11404
Matthias Kloseb9621712010-04-24 17:59:49 +000011405$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011406
Matthias Kloseb9621712010-04-24 17:59:49 +000011407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11408$as_echo "yes" >&6; }
11409else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11410$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011411fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011412else
Matthias Kloseb9621712010-04-24 17:59:49 +000011413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11414$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011415fi
11416
Guido van Rossum7f253911997-05-09 02:42:48 +000011417
Guido van Rossum7f43da71994-08-01 12:15:30 +000011418# check for --with-libm=...
11419
Guido van Rossum563e7081996-09-10 18:20:48 +000011420case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011421Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011422*) LIBM=-lm
11423esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11425$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011427# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011428if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011429 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011430if test "$withval" = no
11431then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11433$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011434elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011435then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11437$as_echo "set LIBM=\"$withval\"" >&6; }
11438else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011439fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011440else
Matthias Kloseb9621712010-04-24 17:59:49 +000011441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11442$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011443fi
11444
Guido van Rossum7f43da71994-08-01 12:15:30 +000011445
11446# check for --with-libc=...
11447
Matthias Kloseb9621712010-04-24 17:59:49 +000011448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11449$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011450
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011451# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011452if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011453 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011454if test "$withval" = no
11455then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11457$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011458elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011459then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11461$as_echo "set LIBC=\"$withval\"" >&6; }
11462else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011463fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011464else
Matthias Kloseb9621712010-04-24 17:59:49 +000011465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11466$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011467fi
11468
Guido van Rossum7f43da71994-08-01 12:15:30 +000011469
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011470# **************************************************
11471# * Check for various properties of floating point *
11472# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011473
Matthias Kloseb9621712010-04-24 17:59:49 +000011474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11475$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11476if test "${ac_cv_little_endian_double+set}" = set; then :
11477 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011478else
11479
Matthias Kloseb9621712010-04-24 17:59:49 +000011480if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011481 ac_cv_little_endian_double=no
11482else
Matthias Kloseb9621712010-04-24 17:59:49 +000011483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011484/* end confdefs.h. */
11485
11486#include <string.h>
11487int main() {
11488 double x = 9006104071832581.0;
11489 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11490 return 0;
11491 else
11492 return 1;
11493}
11494
11495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011496if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011497 ac_cv_little_endian_double=yes
11498else
Matthias Kloseb9621712010-04-24 17:59:49 +000011499 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011501rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11502 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011503fi
11504
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011505fi
11506
Matthias Kloseb9621712010-04-24 17:59:49 +000011507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11508$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011509if test "$ac_cv_little_endian_double" = yes
11510then
11511
Matthias Kloseb9621712010-04-24 17:59:49 +000011512$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011513
11514fi
11515
Matthias Kloseb9621712010-04-24 17:59:49 +000011516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11517$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11518if test "${ac_cv_big_endian_double+set}" = set; then :
11519 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011520else
11521
Matthias Kloseb9621712010-04-24 17:59:49 +000011522if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011523 ac_cv_big_endian_double=no
11524else
Matthias Kloseb9621712010-04-24 17:59:49 +000011525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011526/* end confdefs.h. */
11527
11528#include <string.h>
11529int main() {
11530 double x = 9006104071832581.0;
11531 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11532 return 0;
11533 else
11534 return 1;
11535}
11536
11537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011538if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011539 ac_cv_big_endian_double=yes
11540else
Matthias Kloseb9621712010-04-24 17:59:49 +000011541 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011542fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011543rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11544 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011545fi
11546
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011547fi
11548
Matthias Kloseb9621712010-04-24 17:59:49 +000011549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11550$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011551if test "$ac_cv_big_endian_double" = yes
11552then
11553
Matthias Kloseb9621712010-04-24 17:59:49 +000011554$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011555
11556fi
11557
11558# Some ARM platforms use a mixed-endian representation for doubles.
11559# While Python doesn't currently have full support for these platforms
11560# (see e.g., issue 1762561), we can at least make sure that float <-> string
11561# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11563$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11564if test "${ac_cv_mixed_endian_double+set}" = set; then :
11565 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011566else
11567
Matthias Kloseb9621712010-04-24 17:59:49 +000011568if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011569 ac_cv_mixed_endian_double=no
11570else
Matthias Kloseb9621712010-04-24 17:59:49 +000011571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011572/* end confdefs.h. */
11573
11574#include <string.h>
11575int main() {
11576 double x = 9006104071832581.0;
11577 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11578 return 0;
11579 else
11580 return 1;
11581}
11582
11583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011584if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011585 ac_cv_mixed_endian_double=yes
11586else
Matthias Kloseb9621712010-04-24 17:59:49 +000011587 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011588fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11590 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011591fi
11592
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011593fi
11594
Matthias Kloseb9621712010-04-24 17:59:49 +000011595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11596$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011597if test "$ac_cv_mixed_endian_double" = yes
11598then
11599
Matthias Kloseb9621712010-04-24 17:59:49 +000011600$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011601
11602fi
11603
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011604# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011605# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011606# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011607# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011608# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011609# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011610
11611# This inline assembler syntax may also work for suncc and icc,
11612# so we try it on all platforms.
11613
Matthias Kloseb9621712010-04-24 17:59:49 +000011614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11615$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011617/* end confdefs.h. */
11618
11619int
11620main ()
11621{
11622
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011623 unsigned short cw;
11624 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11625 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011626
11627 ;
11628 return 0;
11629}
11630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011631if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011632 have_gcc_asm_for_x87=yes
11633else
Matthias Kloseb9621712010-04-24 17:59:49 +000011634 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011635fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11638$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011639if test "$have_gcc_asm_for_x87" = yes
11640then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011641
Matthias Kloseb9621712010-04-24 17:59:49 +000011642$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011643
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011644fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011645
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011646# Detect whether system arithmetic is subject to x87-style double
11647# rounding issues. The result of this test has little meaning on non
11648# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11649# mode is round-to-nearest and double rounding issues are present, and
11650# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11652$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011653# $BASECFLAGS may affect the result
11654ac_save_cc="$CC"
11655CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011656if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011657 ac_cv_x87_double_rounding=no
11658else
Matthias Kloseb9621712010-04-24 17:59:49 +000011659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011660/* end confdefs.h. */
11661
11662#include <stdlib.h>
11663#include <math.h>
11664int main() {
11665 volatile double x, y, z;
11666 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11667 x = 0.99999999999999989; /* 1-2**-53 */
11668 y = 1./x;
11669 if (y != 1.)
11670 exit(0);
11671 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11672 x = 1e16;
11673 y = 2.99999;
11674 z = x + y;
11675 if (z != 1e16+4.)
11676 exit(0);
11677 /* both tests show evidence of double rounding */
11678 exit(1);
11679}
11680
11681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011682if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011683 ac_cv_x87_double_rounding=no
11684else
Matthias Kloseb9621712010-04-24 17:59:49 +000011685 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011686fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11688 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011689fi
11690
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011691CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11693$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011694if test "$ac_cv_x87_double_rounding" = yes
11695then
11696
Matthias Kloseb9621712010-04-24 17:59:49 +000011697$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011698
11699fi
11700
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011701# ************************************
11702# * Check for mathematical functions *
11703# ************************************
11704
11705LIBS_SAVE=$LIBS
11706LIBS="$LIBS $LIBM"
11707
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011708# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11709# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11711$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11712if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11713 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011714else
11715
Matthias Kloseb9621712010-04-24 17:59:49 +000011716if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011717 ac_cv_tanh_preserves_zero_sign=no
11718else
Matthias Kloseb9621712010-04-24 17:59:49 +000011719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011720/* end confdefs.h. */
11721
11722#include <math.h>
11723#include <stdlib.h>
11724int main() {
11725 /* return 0 if either negative zeros don't exist
11726 on this platform or if negative zeros exist
11727 and tanh(-0.) == -0. */
11728 if (atan2(0., -1.) == atan2(-0., -1.) ||
11729 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11730 else exit(1);
11731}
11732
11733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011734if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011735 ac_cv_tanh_preserves_zero_sign=yes
11736else
Matthias Kloseb9621712010-04-24 17:59:49 +000011737 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011739rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11740 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011741fi
11742
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011743fi
11744
Matthias Kloseb9621712010-04-24 17:59:49 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11746$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011747if test "$ac_cv_tanh_preserves_zero_sign" = yes
11748then
11749
Matthias Kloseb9621712010-04-24 17:59:49 +000011750$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011751
11752fi
11753
Mark Dickinson9c113362009-09-05 10:36:23 +000011754for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011755do :
11756 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11757ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11758eval as_val=\$$as_ac_var
11759 if test "x$as_val" = x""yes; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011760 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011761#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011762_ACEOF
11763
11764fi
11765done
11766
Mark Dickinson9c113362009-09-05 10:36:23 +000011767for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011768do :
11769 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11770ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11771eval as_val=\$$as_ac_var
11772 if test "x$as_val" = x""yes; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011773 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011774#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011775_ACEOF
11776
11777fi
11778done
11779
Matthias Kloseb9621712010-04-24 17:59:49 +000011780ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11781"
11782if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11783 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011784else
Matthias Kloseb9621712010-04-24 17:59:49 +000011785 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011786fi
11787
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011788cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011789#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011791ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11792"
11793if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11794 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011795else
Matthias Kloseb9621712010-04-24 17:59:49 +000011796 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011797fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011798
11799cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011800#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011802ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11803"
11804if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11805 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011806else
Matthias Kloseb9621712010-04-24 17:59:49 +000011807 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011808fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011809
11810cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011811#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011812_ACEOF
11813
11814
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011815LIBS=$LIBS_SAVE
11816
Mark Dickinsona614f042009-11-28 12:48:43 +000011817# For multiprocessing module, check that sem_open
11818# actually works. For FreeBSD versions <= 7.2,
11819# the kernel module that provides POSIX semaphores
11820# isn't loaded by default, so an attempt to call
11821# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11823$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11824if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11825 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011826else
Matthias Kloseb9621712010-04-24 17:59:49 +000011827 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011828 ac_cv_posix_semaphores_enabled=yes
11829else
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011831/* end confdefs.h. */
11832
11833#include <unistd.h>
11834#include <fcntl.h>
11835#include <stdio.h>
11836#include <semaphore.h>
11837#include <sys/stat.h>
11838
11839int main(void) {
11840 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11841 if (a == SEM_FAILED) {
11842 perror("sem_open");
11843 return 1;
11844 }
11845 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011846 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011847 return 0;
11848}
11849
11850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011851if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011852 ac_cv_posix_semaphores_enabled=yes
11853else
Matthias Kloseb9621712010-04-24 17:59:49 +000011854 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011855fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11857 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011858fi
11859
11860
Mark Dickinsona614f042009-11-28 12:48:43 +000011861fi
11862
Matthias Kloseb9621712010-04-24 17:59:49 +000011863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11864$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011865if test $ac_cv_posix_semaphores_enabled = no
11866then
11867
Matthias Kloseb9621712010-04-24 17:59:49 +000011868$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011869
11870fi
11871
Mark Dickinson10683072009-04-18 21:18:19 +000011872# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11874$as_echo_n "checking for broken sem_getvalue... " >&6; }
11875if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11876 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011877else
Matthias Kloseb9621712010-04-24 17:59:49 +000011878 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011879 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000011880else
Matthias Kloseb9621712010-04-24 17:59:49 +000011881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011882/* end confdefs.h. */
11883
11884#include <unistd.h>
11885#include <fcntl.h>
11886#include <stdio.h>
11887#include <semaphore.h>
11888#include <sys/stat.h>
11889
11890int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000011891 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000011892 int count;
11893 int res;
11894 if(a==SEM_FAILED){
11895 perror("sem_open");
11896 return 1;
11897
11898 }
11899 res = sem_getvalue(a, &count);
11900 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011901 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000011902 return res==-1 ? 1 : 0;
11903}
11904
Mark Dickinson10683072009-04-18 21:18:19 +000011905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011906if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011907 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000011908else
Matthias Kloseb9621712010-04-24 17:59:49 +000011909 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011911rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11912 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011913fi
11914
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011915
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011916fi
11917
Matthias Kloseb9621712010-04-24 17:59:49 +000011918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
11919$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011920if test $ac_cv_broken_sem_getvalue = yes
11921then
11922
Matthias Kloseb9621712010-04-24 17:59:49 +000011923$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011924
11925fi
11926
Mark Dickinsonbd792642009-03-18 20:06:12 +000011927# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000011928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
11929$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011930# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011931if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000011932 enableval=$enable_big_digits; case $enable_big_digits in
11933yes)
11934 enable_big_digits=30 ;;
11935no)
11936 enable_big_digits=15 ;;
1193715|30)
11938 ;;
11939*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011940 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 +000011941esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
11943$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011944
11945cat >>confdefs.h <<_ACEOF
11946#define PYLONG_BITS_IN_DIGIT $enable_big_digits
11947_ACEOF
11948
11949
11950else
Matthias Kloseb9621712010-04-24 17:59:49 +000011951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
11952$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011953fi
11954
11955
Guido van Rossumef2255b2000-03-10 22:30:29 +000011956# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011957ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
11958if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011959
11960
Matthias Kloseb9621712010-04-24 17:59:49 +000011961$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011962
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011963 wchar_h="yes"
11964
Guido van Rossumef2255b2000-03-10 22:30:29 +000011965else
Martin v. Löwis11437992002-04-12 09:54:03 +000011966 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000011967
11968fi
11969
Michael W. Hudson54241132001-12-07 15:38:26 +000011970
Martin v. Löwis11437992002-04-12 09:54:03 +000011971
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000011972# determine wchar_t size
11973if test "$wchar_h" = yes
11974then
Matthias Kloseb9621712010-04-24 17:59:49 +000011975 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011976# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11977# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11978# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000011979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
11980$as_echo_n "checking size of wchar_t... " >&6; }
11981if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
11982 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011983else
Matthias Kloseb9621712010-04-24 17:59:49 +000011984 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
11985"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011986
Martin v. Löwis11437992002-04-12 09:54:03 +000011987else
Matthias Kloseb9621712010-04-24 17:59:49 +000011988 if test "$ac_cv_type_wchar_t" = yes; then
11989 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11991{ as_fn_set_status 77
11992as_fn_error "cannot compute sizeof (wchar_t)
11993See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011994 else
11995 ac_cv_sizeof_wchar_t=0
11996 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011998
Martin v. Löwis11437992002-04-12 09:54:03 +000011999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12001$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012002
12003
12004
Martin v. Löwis11437992002-04-12 09:54:03 +000012005cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012006#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012007_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012008
Michael W. Hudson54241132001-12-07 15:38:26 +000012009
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012010fi
12011
Matthias Kloseb9621712010-04-24 17:59:49 +000012012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12013$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012014have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012016/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012017
12018#include <tcl.h>
12019#if TCL_UTF_MAX != 6
12020# error "NOT UCS4_TCL"
12021#endif
12022int
12023main ()
12024{
12025
12026 ;
12027 return 0;
12028}
12029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012030if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012031
12032
Matthias Kloseb9621712010-04-24 17:59:49 +000012033$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012034
12035 have_ucs4_tcl=yes
12036
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12040$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012041
Skip Montanaro6dead952003-09-25 14:50:04 +000012042# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012043if test "$wchar_h" = yes
12044then
12045 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12047$as_echo_n "checking whether wchar_t is signed... " >&6; }
12048 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12049 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012050else
12051
Matthias Kloseb9621712010-04-24 17:59:49 +000012052 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012053 ac_cv_wchar_t_signed=yes
12054else
Matthias Kloseb9621712010-04-24 17:59:49 +000012055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012056/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012057
12058 #include <wchar.h>
12059 int main()
12060 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012061 /* Success: exit code 0 */
12062 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012063 }
12064
12065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012066if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012067 ac_cv_wchar_t_signed=yes
12068else
Matthias Kloseb9621712010-04-24 17:59:49 +000012069 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012070fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12072 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012073fi
12074
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012075fi
12076
Matthias Kloseb9621712010-04-24 17:59:49 +000012077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12078$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012079fi
12080
Matthias Kloseb9621712010-04-24 17:59:49 +000012081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12082$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012083
12084# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012085if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012086 withval=$with_wide_unicode;
12087if test "$withval" != no
12088then unicode_size="4"
12089else unicode_size="2"
12090fi
12091
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012092else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012093
Georg Brandl52d168a2008-01-07 18:10:24 +000012094case "$have_ucs4_tcl" in
12095 yes) unicode_size="4" ;;
12096 *) unicode_size="2" ;;
12097esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012098
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012099fi
12100
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012101
12102
Georg Brandl52d168a2008-01-07 18:10:24 +000012103case "$unicode_size" in
Matthias Kloseb9621712010-04-24 17:59:49 +000012104 4) $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012105 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012106 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012107 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012108esac
12109
Michael W. Hudson54241132001-12-07 15:38:26 +000012110
Martin v. Löwis11437992002-04-12 09:54:03 +000012111
Georg Brandl52d168a2008-01-07 18:10:24 +000012112# wchar_t is only usable if it maps to an unsigned type
12113if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012114 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012115then
12116 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012117
Matthias Kloseb9621712010-04-24 17:59:49 +000012118$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012119
Matthias Kloseb9621712010-04-24 17:59:49 +000012120 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012121
Georg Brandl52d168a2008-01-07 18:10:24 +000012122elif test "$ac_cv_sizeof_short" = "$unicode_size"
12123then
12124 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012125 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012126
Georg Brandl52d168a2008-01-07 18:10:24 +000012127elif test "$ac_cv_sizeof_long" = "$unicode_size"
12128then
12129 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012131
Georg Brandl52d168a2008-01-07 18:10:24 +000012132else
12133 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012134fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12136$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012137
12138# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12140$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12141if test "${ac_cv_c_bigendian+set}" = set; then :
12142 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012143else
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 ac_cv_c_bigendian=unknown
12145 # See if we're dealing with a universal compiler.
12146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12147/* end confdefs.h. */
12148#ifndef __APPLE_CC__
12149 not a universal capable compiler
12150 #endif
12151 typedef int dummy;
12152
Skip Montanaro6dead952003-09-25 14:50:04 +000012153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012154if ac_fn_c_try_compile "$LINENO"; then :
12155
12156 # Check for potential -arch flags. It is not universal unless
12157 # there are at least two -arch flags with different values.
12158 ac_arch=
12159 ac_prev=
12160 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12161 if test -n "$ac_prev"; then
12162 case $ac_word in
12163 i?86 | x86_64 | ppc | ppc64)
12164 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12165 ac_arch=$ac_word
12166 else
12167 ac_cv_c_bigendian=universal
12168 break
12169 fi
12170 ;;
12171 esac
12172 ac_prev=
12173 elif test "x$ac_word" = "x-arch"; then
12174 ac_prev=arch
12175 fi
12176 done
12177fi
12178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12179 if test $ac_cv_c_bigendian = unknown; then
12180 # See if sys/param.h defines the BYTE_ORDER macro.
12181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012182/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012183#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012185
Martin v. Löwis11437992002-04-12 09:54:03 +000012186int
12187main ()
12188{
Matthias Kloseb9621712010-04-24 17:59:49 +000012189#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12190 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12191 && LITTLE_ENDIAN)
12192 bogus endian macros
12193 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012194
12195 ;
12196 return 0;
12197}
12198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012199if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012200 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012202/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012203#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012205
Martin v. Löwis11437992002-04-12 09:54:03 +000012206int
12207main ()
12208{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012209#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 not big endian
12211 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012212
12213 ;
12214 return 0;
12215}
12216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012217if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012218 ac_cv_c_bigendian=yes
12219else
Matthias Kloseb9621712010-04-24 17:59:49 +000012220 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012223fi
12224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12225 fi
12226 if test $ac_cv_c_bigendian = unknown; then
12227 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012229/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012230#include <limits.h>
12231
Martin v. Löwis11437992002-04-12 09:54:03 +000012232int
12233main ()
12234{
Matthias Kloseb9621712010-04-24 17:59:49 +000012235#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12236 bogus endian macros
12237 #endif
12238
Martin v. Löwis11437992002-04-12 09:54:03 +000012239 ;
12240 return 0;
12241}
12242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012243if ac_fn_c_try_compile "$LINENO"; then :
12244 # It does; now see whether it defined to _BIG_ENDIAN or not.
12245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12246/* end confdefs.h. */
12247#include <limits.h>
12248
12249int
12250main ()
12251{
12252#ifndef _BIG_ENDIAN
12253 not big endian
12254 #endif
12255
12256 ;
12257 return 0;
12258}
12259_ACEOF
12260if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012261 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012262else
Matthias Kloseb9621712010-04-24 17:59:49 +000012263 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12266fi
12267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12268 fi
12269 if test $ac_cv_c_bigendian = unknown; then
12270 # Compile a test program.
12271 if test "$cross_compiling" = yes; then :
12272 # Try to guess by grepping values from an object file.
12273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12274/* end confdefs.h. */
12275short int ascii_mm[] =
12276 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12277 short int ascii_ii[] =
12278 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12279 int use_ascii (int i) {
12280 return ascii_mm[i] + ascii_ii[i];
12281 }
12282 short int ebcdic_ii[] =
12283 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12284 short int ebcdic_mm[] =
12285 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12286 int use_ebcdic (int i) {
12287 return ebcdic_mm[i] + ebcdic_ii[i];
12288 }
12289 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012290
Matthias Kloseb9621712010-04-24 17:59:49 +000012291int
12292main ()
12293{
12294return use_ascii (foo) == use_ebcdic (foo);
12295 ;
12296 return 0;
12297}
12298_ACEOF
12299if ac_fn_c_try_compile "$LINENO"; then :
12300 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12301 ac_cv_c_bigendian=yes
12302 fi
12303 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12304 if test "$ac_cv_c_bigendian" = unknown; then
12305 ac_cv_c_bigendian=no
12306 else
12307 # finding both strings is unlikely to happen, but who knows?
12308 ac_cv_c_bigendian=unknown
12309 fi
12310 fi
12311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012313else
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012315/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012316$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012317int
12318main ()
12319{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320
Matthias Kloseb9621712010-04-24 17:59:49 +000012321 /* Are we little or big endian? From Harbison&Steele. */
12322 union
12323 {
12324 long int l;
12325 char c[sizeof (long int)];
12326 } u;
12327 u.l = 1;
12328 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012329
12330 ;
12331 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012332}
Martin v. Löwis11437992002-04-12 09:54:03 +000012333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012334if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012335 ac_cv_c_bigendian=no
12336else
Matthias Kloseb9621712010-04-24 17:59:49 +000012337 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12340 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012342
Matthias Kloseb9621712010-04-24 17:59:49 +000012343 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012344fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12346$as_echo "$ac_cv_c_bigendian" >&6; }
12347 case $ac_cv_c_bigendian in #(
12348 yes)
12349 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12350;; #(
12351 no)
12352 ;; #(
12353 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012354
Matthias Kloseb9621712010-04-24 17:59:49 +000012355$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012356
Matthias Kloseb9621712010-04-24 17:59:49 +000012357 ;; #(
12358 *)
12359 as_fn_error "unknown endianness
12360 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12361 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012362
Michael W. Hudson54241132001-12-07 15:38:26 +000012363
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012364# Check whether right shifting a negative integer extends the sign bit
12365# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12367$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12368if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12369 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012370else
Martin v. Löwis11437992002-04-12 09:54:03 +000012371
Matthias Kloseb9621712010-04-24 17:59:49 +000012372if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012373 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012374else
Matthias Kloseb9621712010-04-24 17:59:49 +000012375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012376/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012377
12378int main()
12379{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012380 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012381}
12382
Martin v. Löwis11437992002-04-12 09:54:03 +000012383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012384if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012385 ac_cv_rshift_extends_sign=yes
12386else
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012388fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012389rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12390 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012391fi
12392
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012393fi
12394
Matthias Kloseb9621712010-04-24 17:59:49 +000012395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12396$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012397if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012398then
Martin v. Löwis11437992002-04-12 09:54:03 +000012399
Matthias Kloseb9621712010-04-24 17:59:49 +000012400$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012401
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012402fi
12403
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012404# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12406$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12407if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12408 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012409else
Martin v. Löwis11437992002-04-12 09:54:03 +000012410
Matthias Kloseb9621712010-04-24 17:59:49 +000012411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012412/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012413#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012414int
12415main ()
12416{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012417
12418 FILE *f = fopen("/dev/null", "r");
12419 flockfile(f);
12420 getc_unlocked(f);
12421 funlockfile(f);
12422
Martin v. Löwis11437992002-04-12 09:54:03 +000012423 ;
12424 return 0;
12425}
12426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012427if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012428 ac_cv_have_getc_unlocked=yes
12429else
Matthias Kloseb9621712010-04-24 17:59:49 +000012430 ac_cv_have_getc_unlocked=no
12431fi
12432rm -f core conftest.err conftest.$ac_objext \
12433 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012435
Matthias Kloseb9621712010-04-24 17:59:49 +000012436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12437$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012438if test "$ac_cv_have_getc_unlocked" = yes
12439then
Martin v. Löwis11437992002-04-12 09:54:03 +000012440
Matthias Kloseb9621712010-04-24 17:59:49 +000012441$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012442
12443fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012444
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012445# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012446# save the value of LIBS so we don't actually link Python with readline
12447LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012448
Gregory P. Smith18820942008-09-07 06:24:49 +000012449# On some systems we need to link readline to a termcap compatible
12450# library. NOTE: Keep the precedence of listed libraries synchronised
12451# with setup.py.
12452py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12454$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012455for py_libtermcap in "" ncursesw ncurses curses termcap; do
12456 if test -z "$py_libtermcap"; then
12457 READLINE_LIBS="-lreadline"
12458 else
12459 READLINE_LIBS="-lreadline -l$py_libtermcap"
12460 fi
12461 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012463/* end confdefs.h. */
12464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465/* Override any GCC internal prototype to avoid an error.
12466 Use char because int might match the return type of a GCC
12467 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012468#ifdef __cplusplus
12469extern "C"
12470#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012471char readline ();
12472int
12473main ()
12474{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012475return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012476 ;
12477 return 0;
12478}
12479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012480if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012481 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012482fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012483rm -f core conftest.err conftest.$ac_objext \
12484 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012485 if test $py_cv_lib_readline = yes; then
12486 break
12487 fi
12488done
12489# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12490#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012491if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12493$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012494else
Matthias Kloseb9621712010-04-24 17:59:49 +000012495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12496$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012497
Matthias Kloseb9621712010-04-24 17:59:49 +000012498$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012499
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012500fi
12501
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012502# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12504$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12505if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12506 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012507else
12508 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012509LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012511/* end confdefs.h. */
12512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012513/* Override any GCC internal prototype to avoid an error.
12514 Use char because int might match the return type of a GCC
12515 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012516#ifdef __cplusplus
12517extern "C"
12518#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012519char rl_callback_handler_install ();
12520int
12521main ()
12522{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012523return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012524 ;
12525 return 0;
12526}
12527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012528if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012529 ac_cv_lib_readline_rl_callback_handler_install=yes
12530else
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012533rm -f core conftest.err conftest.$ac_objext \
12534 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012535LIBS=$ac_check_lib_save_LIBS
12536fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12538$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12539if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012540
Matthias Kloseb9621712010-04-24 17:59:49 +000012541$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012542
12543fi
12544
12545
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012546# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012548/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012549#include <readline/readline.h>
12550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012551if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012552 have_readline=yes
12553else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012554 have_readline=no
12555fi
12556rm -f conftest.err conftest.$ac_ext
12557if test $have_readline = yes
12558then
Matthias Kloseb9621712010-04-24 17:59:49 +000012559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012560/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012561#include <readline/readline.h>
12562
12563_ACEOF
12564if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012565 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012566
Matthias Kloseb9621712010-04-24 17:59:49 +000012567$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012568
12569fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012570rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012571
Matthias Kloseb9621712010-04-24 17:59:49 +000012572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012573/* end confdefs.h. */
12574#include <readline/readline.h>
12575
12576_ACEOF
12577if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012578 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012579
Matthias Kloseb9621712010-04-24 17:59:49 +000012580$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012581
12582fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012583rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012584
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012585fi
12586
Martin v. Löwis0daad592001-09-30 21:09:59 +000012587# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12589$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12590if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12591 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012592else
Martin v. Löwis11437992002-04-12 09:54:03 +000012593 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012594LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012598/* Override any GCC internal prototype to avoid an error.
12599 Use char because int might match the return type of a GCC
12600 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012601#ifdef __cplusplus
12602extern "C"
12603#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012604char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012605int
12606main ()
12607{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012608return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012609 ;
12610 return 0;
12611}
12612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012613if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012614 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012615else
Matthias Kloseb9621712010-04-24 17:59:49 +000012616 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012618rm -f core conftest.err conftest.$ac_objext \
12619 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012620LIBS=$ac_check_lib_save_LIBS
12621fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12623$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12624if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012625
Matthias Kloseb9621712010-04-24 17:59:49 +000012626$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012627
Martin v. Löwis0daad592001-09-30 21:09:59 +000012628fi
12629
Michael W. Hudson54241132001-12-07 15:38:26 +000012630
Thomas Wouters89d996e2007-09-08 17:39:28 +000012631# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12633$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12634if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12635 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012636else
12637 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012638LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012640/* end confdefs.h. */
12641
12642/* Override any GCC internal prototype to avoid an error.
12643 Use char because int might match the return type of a GCC
12644 builtin and then its argument prototype would still apply. */
12645#ifdef __cplusplus
12646extern "C"
12647#endif
12648char rl_completion_display_matches_hook ();
12649int
12650main ()
12651{
12652return rl_completion_display_matches_hook ();
12653 ;
12654 return 0;
12655}
12656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012657if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012658 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12659else
Matthias Kloseb9621712010-04-24 17:59:49 +000012660 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012662rm -f core conftest.err conftest.$ac_objext \
12663 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012664LIBS=$ac_check_lib_save_LIBS
12665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12667$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12668if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012669
Matthias Kloseb9621712010-04-24 17:59:49 +000012670$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012671
12672fi
12673
12674
Martin v. Löwis0daad592001-09-30 21:09:59 +000012675# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12677$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12678if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12679 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012680else
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012682LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012684/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012686/* Override any GCC internal prototype to avoid an error.
12687 Use char because int might match the return type of a GCC
12688 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012689#ifdef __cplusplus
12690extern "C"
12691#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012692char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012693int
12694main ()
12695{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012696return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012697 ;
12698 return 0;
12699}
12700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012701if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012702 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012703else
Matthias Kloseb9621712010-04-24 17:59:49 +000012704 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012706rm -f core conftest.err conftest.$ac_objext \
12707 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012708LIBS=$ac_check_lib_save_LIBS
12709fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12711$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12712if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012713
Matthias Kloseb9621712010-04-24 17:59:49 +000012714$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012715
Guido van Rossum353ae582001-07-10 16:45:32 +000012716fi
12717
Jack Jansendd19cf82001-12-06 22:36:17 +000012718
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012719# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012721/* end confdefs.h. */
12722#include <readline/readline.h>
12723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012724if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012725 have_readline=yes
12726else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012727 have_readline=no
12728fi
12729rm -f conftest.err conftest.$ac_ext
12730if test $have_readline = yes
12731then
Matthias Kloseb9621712010-04-24 17:59:49 +000012732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012733/* end confdefs.h. */
12734#include <readline/readline.h>
12735
12736_ACEOF
12737if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012739
Matthias Kloseb9621712010-04-24 17:59:49 +000012740$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012741
12742fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012743rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012744
12745fi
12746
Martin v. Löwis82bca632006-02-10 20:49:30 +000012747# End of readline checks: restore LIBS
12748LIBS=$LIBS_no_readline
12749
Matthias Kloseb9621712010-04-24 17:59:49 +000012750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12751$as_echo_n "checking for broken nice()... " >&6; }
12752if test "${ac_cv_broken_nice+set}" = set; then :
12753 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012754else
Martin v. Löwis11437992002-04-12 09:54:03 +000012755
Matthias Kloseb9621712010-04-24 17:59:49 +000012756if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012757 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012758else
Matthias Kloseb9621712010-04-24 17:59:49 +000012759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012760/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012761
12762int main()
12763{
12764 int val1 = nice(1);
12765 if (val1 != -1 && val1 == nice(2))
12766 exit(0);
12767 exit(1);
12768}
12769
Martin v. Löwis11437992002-04-12 09:54:03 +000012770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012771if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012772 ac_cv_broken_nice=yes
12773else
Matthias Kloseb9621712010-04-24 17:59:49 +000012774 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012775fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12777 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012778fi
12779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780fi
12781
Matthias Kloseb9621712010-04-24 17:59:49 +000012782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12783$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012784if test "$ac_cv_broken_nice" = yes
12785then
Martin v. Löwis11437992002-04-12 09:54:03 +000012786
Matthias Kloseb9621712010-04-24 17:59:49 +000012787$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012788
12789fi
12790
Matthias Kloseb9621712010-04-24 17:59:49 +000012791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12792$as_echo_n "checking for broken poll()... " >&6; }
12793if test "${ac_cv_broken_poll+set}" = set; then :
12794 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012795else
Matthias Kloseb9621712010-04-24 17:59:49 +000012796 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012797 ac_cv_broken_poll=no
12798else
Matthias Kloseb9621712010-04-24 17:59:49 +000012799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012800/* end confdefs.h. */
12801
12802#include <poll.h>
12803
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012804int main()
12805{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012806 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012807 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012808
12809 close (42);
12810
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012811 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012812 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012813 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012814 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012815 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012816 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012817 return 1;
12818}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012819
12820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012821if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012822 ac_cv_broken_poll=yes
12823else
Matthias Kloseb9621712010-04-24 17:59:49 +000012824 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12827 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012829
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012830fi
12831
Matthias Kloseb9621712010-04-24 17:59:49 +000012832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
12833$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012834if test "$ac_cv_broken_poll" = yes
12835then
12836
Matthias Kloseb9621712010-04-24 17:59:49 +000012837$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012838
12839fi
12840
Brett Cannon43802422005-02-10 20:48:03 +000012841# 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 +000012842# (which is not required by ISO C or UNIX spec) and/or if we support
12843# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000012844ac_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 +000012845#include <$ac_cv_struct_tm>
12846
Matthias Kloseb9621712010-04-24 17:59:49 +000012847"
12848if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000012849
12850cat >>confdefs.h <<_ACEOF
12851#define HAVE_STRUCT_TM_TM_ZONE 1
12852_ACEOF
12853
12854
12855fi
12856
12857if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12858
Matthias Kloseb9621712010-04-24 17:59:49 +000012859$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012860
12861else
Matthias Kloseb9621712010-04-24 17:59:49 +000012862 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12863"
12864if test "x$ac_cv_have_decl_tzname" = x""yes; then :
12865 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012866else
Matthias Kloseb9621712010-04-24 17:59:49 +000012867 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012868fi
12869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012870cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012871#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012872_ACEOF
12873
Matthias Kloseb9621712010-04-24 17:59:49 +000012874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12875$as_echo_n "checking for tzname... " >&6; }
12876if test "${ac_cv_var_tzname+set}" = set; then :
12877 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012878else
Matthias Kloseb9621712010-04-24 17:59:49 +000012879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012880/* end confdefs.h. */
12881#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012882#if !HAVE_DECL_TZNAME
12883extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000012884#endif
12885
12886int
12887main ()
12888{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012889return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000012890 ;
12891 return 0;
12892}
12893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012894if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000012895 ac_cv_var_tzname=yes
12896else
Matthias Kloseb9621712010-04-24 17:59:49 +000012897 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000012898fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012899rm -f core conftest.err conftest.$ac_objext \
12900 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12903$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000012904 if test $ac_cv_var_tzname = yes; then
12905
Matthias Kloseb9621712010-04-24 17:59:49 +000012906$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012907
12908 fi
12909fi
12910
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012911
Martin v. Löwis1d459062005-03-14 21:23:33 +000012912# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000012913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
12914$as_echo_n "checking for working tzset()... " >&6; }
12915if test "${ac_cv_working_tzset+set}" = set; then :
12916 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012917else
12918
Matthias Kloseb9621712010-04-24 17:59:49 +000012919if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012920 ac_cv_working_tzset=no
12921else
Matthias Kloseb9621712010-04-24 17:59:49 +000012922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012923/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012924
12925#include <stdlib.h>
12926#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000012927#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000012928
12929#if HAVE_TZNAME
12930extern char *tzname[];
12931#endif
12932
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012933int main()
12934{
Brett Cannon18367812003-09-19 00:59:16 +000012935 /* Note that we need to ensure that not only does tzset(3)
12936 do 'something' with localtime, but it works as documented
12937 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000012938 This includes making sure that tzname is set properly if
12939 tm->tm_zone does not exist since it is the alternative way
12940 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000012941
12942 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000012943 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000012944 */
12945
Martin v. Löwis1d459062005-03-14 21:23:33 +000012946 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000012947 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
12948
Neal Norwitz7f2588c2003-04-11 15:35:53 +000012949 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012950 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000012951 if (localtime(&groundhogday)->tm_hour != 0)
12952 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012953#if HAVE_TZNAME
12954 /* For UTC, tzname[1] is sometimes "", sometimes " " */
12955 if (strcmp(tzname[0], "UTC") ||
12956 (tzname[1][0] != 0 && tzname[1][0] != ' '))
12957 exit(1);
12958#endif
Brett Cannon18367812003-09-19 00:59:16 +000012959
Neal Norwitz7f2588c2003-04-11 15:35:53 +000012960 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012961 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000012962 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012963 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012964#if HAVE_TZNAME
12965 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
12966 exit(1);
12967#endif
Brett Cannon18367812003-09-19 00:59:16 +000012968
12969 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
12970 tzset();
12971 if (localtime(&groundhogday)->tm_hour != 11)
12972 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012973#if HAVE_TZNAME
12974 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
12975 exit(1);
12976#endif
12977
12978#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000012979 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
12980 exit(1);
12981 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
12982 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012983#endif
Brett Cannon18367812003-09-19 00:59:16 +000012984
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012985 exit(0);
12986}
12987
12988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012989if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012990 ac_cv_working_tzset=yes
12991else
Matthias Kloseb9621712010-04-24 17:59:49 +000012992 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12995 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012996fi
12997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012998fi
12999
Matthias Kloseb9621712010-04-24 17:59:49 +000013000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13001$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013002if test "$ac_cv_working_tzset" = yes
13003then
13004
Matthias Kloseb9621712010-04-24 17:59:49 +000013005$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013006
13007fi
13008
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013009# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13011$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13012if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13013 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013014else
Matthias Kloseb9621712010-04-24 17:59:49 +000013015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013016/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013017#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013018int
13019main ()
13020{
13021
13022struct stat st;
13023st.st_mtim.tv_nsec = 1;
13024
13025 ;
13026 return 0;
13027}
13028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013029if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013030 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013031else
Matthias Kloseb9621712010-04-24 17:59:49 +000013032 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13035fi
13036
Matthias Kloseb9621712010-04-24 17:59:49 +000013037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13038$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013039if test "$ac_cv_stat_tv_nsec" = yes
13040then
13041
Matthias Kloseb9621712010-04-24 17:59:49 +000013042$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013043
13044fi
13045
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013046# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13048$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13049if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13050 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013051else
Matthias Kloseb9621712010-04-24 17:59:49 +000013052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013053/* end confdefs.h. */
13054#include <sys/stat.h>
13055int
13056main ()
13057{
13058
13059struct stat st;
13060st.st_mtimespec.tv_nsec = 1;
13061
13062 ;
13063 return 0;
13064}
13065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013066if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013067 ac_cv_stat_tv_nsec2=yes
13068else
Matthias Kloseb9621712010-04-24 17:59:49 +000013069 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13072fi
13073
Matthias Kloseb9621712010-04-24 17:59:49 +000013074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13075$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013076if test "$ac_cv_stat_tv_nsec2" = yes
13077then
13078
Matthias Kloseb9621712010-04-24 17:59:49 +000013079$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013080
13081fi
13082
Jack Jansen666b1e72001-10-31 12:11:48 +000013083# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13085$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13086if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13087 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013088else
Matthias Kloseb9621712010-04-24 17:59:49 +000013089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013090/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013091#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013092int
13093main ()
13094{
Jack Jansen666b1e72001-10-31 12:11:48 +000013095
13096 int rtn;
13097 rtn = mvwdelch(0,0,0);
13098
Martin v. Löwis11437992002-04-12 09:54:03 +000013099 ;
13100 return 0;
13101}
13102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013103if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013104 ac_cv_mvwdelch_is_expression=yes
13105else
Matthias Kloseb9621712010-04-24 17:59:49 +000013106 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13109fi
13110
Matthias Kloseb9621712010-04-24 17:59:49 +000013111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13112$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013113
13114if test "$ac_cv_mvwdelch_is_expression" = yes
13115then
Martin v. Löwis11437992002-04-12 09:54:03 +000013116
Matthias Kloseb9621712010-04-24 17:59:49 +000013117$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013118
13119fi
13120
Matthias Kloseb9621712010-04-24 17:59:49 +000013121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13122$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13123if test "${ac_cv_window_has_flags+set}" = set; then :
13124 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013125else
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013127/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013128#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013129int
13130main ()
13131{
Jack Jansen666b1e72001-10-31 12:11:48 +000013132
13133 WINDOW *w;
13134 w->_flags = 0;
13135
Martin v. Löwis11437992002-04-12 09:54:03 +000013136 ;
13137 return 0;
13138}
13139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013140if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013141 ac_cv_window_has_flags=yes
13142else
Matthias Kloseb9621712010-04-24 17:59:49 +000013143 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13146fi
13147
Matthias Kloseb9621712010-04-24 17:59:49 +000013148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13149$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013150
Jack Jansen666b1e72001-10-31 12:11:48 +000013151
13152if test "$ac_cv_window_has_flags" = yes
13153then
Martin v. Löwis11437992002-04-12 09:54:03 +000013154
Matthias Kloseb9621712010-04-24 17:59:49 +000013155$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013156
13157fi
13158
Matthias Kloseb9621712010-04-24 17:59:49 +000013159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13160$as_echo_n "checking for is_term_resized... " >&6; }
13161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013162/* end confdefs.h. */
13163#include <curses.h>
13164int
13165main ()
13166{
13167void *x=is_term_resized
13168 ;
13169 return 0;
13170}
13171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013172if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013175
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13177$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013178else
Matthias Kloseb9621712010-04-24 17:59:49 +000013179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13180$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013181
13182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13184
Matthias Kloseb9621712010-04-24 17:59:49 +000013185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13186$as_echo_n "checking for resize_term... " >&6; }
13187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013188/* end confdefs.h. */
13189#include <curses.h>
13190int
13191main ()
13192{
13193void *x=resize_term
13194 ;
13195 return 0;
13196}
13197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013198if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013199
Matthias Kloseb9621712010-04-24 17:59:49 +000013200$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013201
Matthias Kloseb9621712010-04-24 17:59:49 +000013202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13203$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013204else
Matthias Kloseb9621712010-04-24 17:59:49 +000013205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13206$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013207
13208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13210
Matthias Kloseb9621712010-04-24 17:59:49 +000013211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13212$as_echo_n "checking for resizeterm... " >&6; }
13213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013214/* end confdefs.h. */
13215#include <curses.h>
13216int
13217main ()
13218{
13219void *x=resizeterm
13220 ;
13221 return 0;
13222}
13223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013224if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013225
Matthias Kloseb9621712010-04-24 17:59:49 +000013226$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013227
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13229$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013230else
Matthias Kloseb9621712010-04-24 17:59:49 +000013231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13232$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013233
13234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13236
Matthias Kloseb9621712010-04-24 17:59:49 +000013237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13238$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013239
13240if test -r /dev/ptmx
13241then
Matthias Kloseb9621712010-04-24 17:59:49 +000013242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13243$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013244
Matthias Kloseb9621712010-04-24 17:59:49 +000013245$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013246
Thomas Wouters89f507f2006-12-13 04:49:30 +000013247else
Matthias Kloseb9621712010-04-24 17:59:49 +000013248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13249$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013250fi
13251
Matthias Kloseb9621712010-04-24 17:59:49 +000013252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13253$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013254
13255if test -r /dev/ptc
13256then
Matthias Kloseb9621712010-04-24 17:59:49 +000013257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13258$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013259
Matthias Kloseb9621712010-04-24 17:59:49 +000013260$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013261
Thomas Wouters89f507f2006-12-13 04:49:30 +000013262else
Matthias Kloseb9621712010-04-24 17:59:49 +000013263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13264$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013265fi
13266
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013267if test "$have_long_long" = yes
13268then
Matthias Kloseb9621712010-04-24 17:59:49 +000013269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13270$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13271 if test "${ac_cv_have_long_long_format+set}" = set; then :
13272 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013273else
Matthias Kloseb9621712010-04-24 17:59:49 +000013274 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013275 ac_cv_have_long_long_format=no
13276else
Matthias Kloseb9621712010-04-24 17:59:49 +000013277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013278/* end confdefs.h. */
13279
13280 #include <stdio.h>
13281 #include <stddef.h>
13282 #include <string.h>
13283
13284 #ifdef HAVE_SYS_TYPES_H
13285 #include <sys/types.h>
13286 #endif
13287
13288 int main()
13289 {
13290 char buffer[256];
13291
13292 if (sprintf(buffer, "%lld", (long long)123) < 0)
13293 return 1;
13294 if (strcmp(buffer, "123"))
13295 return 1;
13296
13297 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13298 return 1;
13299 if (strcmp(buffer, "-123"))
13300 return 1;
13301
13302 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13303 return 1;
13304 if (strcmp(buffer, "123"))
13305 return 1;
13306
13307 return 0;
13308 }
13309
13310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013311if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013312 ac_cv_have_long_long_format=yes
13313else
Matthias Kloseb9621712010-04-24 17:59:49 +000013314 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13317 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013318fi
13319
13320
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013321fi
13322
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13324$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013325fi
13326
Mark Dickinson89d7d412009-12-31 20:50:59 +000013327if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013328then
13329
Matthias Kloseb9621712010-04-24 17:59:49 +000013330$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013331
13332fi
13333
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013334if test $ac_sys_system = Darwin
13335then
13336 LIBS="$LIBS -framework CoreFoundation"
13337fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013338
Matthias Kloseb9621712010-04-24 17:59:49 +000013339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13340$as_echo_n "checking for %zd printf() format support... " >&6; }
13341if test "${ac_cv_have_size_t_format+set}" = set; then :
13342 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013343else
Matthias Kloseb9621712010-04-24 17:59:49 +000013344 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013345 ac_cv_have_size_t_format="cross -- assuming yes"
13346
Thomas Wouters477c8d52006-05-27 19:21:47 +000013347else
Matthias Kloseb9621712010-04-24 17:59:49 +000013348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013349/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013350
Thomas Wouters477c8d52006-05-27 19:21:47 +000013351#include <stdio.h>
13352#include <stddef.h>
13353#include <string.h>
13354
Christian Heimes2c181612007-12-17 20:04:13 +000013355#ifdef HAVE_SYS_TYPES_H
13356#include <sys/types.h>
13357#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013358
13359#ifdef HAVE_SSIZE_T
13360typedef ssize_t Py_ssize_t;
13361#elif SIZEOF_VOID_P == SIZEOF_LONG
13362typedef long Py_ssize_t;
13363#else
13364typedef int Py_ssize_t;
13365#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013366
Christian Heimes2c181612007-12-17 20:04:13 +000013367int main()
13368{
13369 char buffer[256];
13370
Thomas Wouters477c8d52006-05-27 19:21:47 +000013371 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13372 return 1;
13373
Thomas Wouters89f507f2006-12-13 04:49:30 +000013374 if (strcmp(buffer, "123"))
13375 return 1;
13376
13377 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13378 return 1;
13379
13380 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013381 return 1;
13382
13383 return 0;
13384}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013385
Thomas Wouters477c8d52006-05-27 19:21:47 +000013386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013387if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013388 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013389else
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013392rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13393 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013394fi
13395
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013396fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13398$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013399if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013400
Matthias Kloseb9621712010-04-24 17:59:49 +000013401$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013402
13403fi
13404
Matthias Kloseb9621712010-04-24 17:59:49 +000013405ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013406#ifdef HAVE_SYS_TYPES_H
13407#include <sys/types.h>
13408#endif
13409#ifdef HAVE_SYS_SOCKET_H
13410#include <sys/socket.h>
13411#endif
13412
Matthias Kloseb9621712010-04-24 17:59:49 +000013413"
13414if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013415
Martin v. Löwis11437992002-04-12 09:54:03 +000013416else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013417
Matthias Kloseb9621712010-04-24 17:59:49 +000013418$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013419
13420fi
13421
Michael W. Hudson54241132001-12-07 15:38:26 +000013422
Matthias Kloseb9621712010-04-24 17:59:49 +000013423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13424$as_echo_n "checking for broken mbstowcs... " >&6; }
13425if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13426 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013427else
Matthias Kloseb9621712010-04-24 17:59:49 +000013428 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013429 ac_cv_broken_mbstowcs=no
13430else
Matthias Kloseb9621712010-04-24 17:59:49 +000013431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013432/* end confdefs.h. */
13433
13434#include<stdlib.h>
13435int main() {
13436 size_t len = -1;
13437 const char *str = "text";
13438 len = mbstowcs(NULL, str, 0);
13439 return (len != 4);
13440}
13441
13442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013443if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013444 ac_cv_broken_mbstowcs=no
13445else
Matthias Kloseb9621712010-04-24 17:59:49 +000013446 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013448rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13449 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013450fi
13451
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013452fi
13453
Matthias Kloseb9621712010-04-24 17:59:49 +000013454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13455$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013456if test "$ac_cv_broken_mbstowcs" = yes
13457then
13458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013460
13461fi
13462
Antoine Pitroub52ec782009-01-25 16:34:23 +000013463# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13465$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013466
13467# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013468if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013469 withval=$with_computed_gotos;
13470if test "$withval" != no
13471then
13472
Matthias Kloseb9621712010-04-24 17:59:49 +000013473$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013474
Matthias Kloseb9621712010-04-24 17:59:49 +000013475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13476$as_echo "yes" >&6; }
13477else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13478$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013479fi
13480else
Matthias Kloseb9621712010-04-24 17:59:49 +000013481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13482$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013483fi
13484
13485
13486
Michael W. Hudson54241132001-12-07 15:38:26 +000013487
13488
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013489for h in `(cd $srcdir;echo Python/thread_*.h)`
13490do
13491 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13492done
13493
Michael W. Hudson54241132001-12-07 15:38:26 +000013494
Neal Norwitzd24499d2005-12-18 21:36:39 +000013495SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13497$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013498for dir in $SRCDIRS; do
13499 if test ! -d $dir; then
13500 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013501 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013502done
Matthias Kloseb9621712010-04-24 17:59:49 +000013503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13504$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013505
Guido van Rossum627b2d71993-12-24 10:39:16 +000013506# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013507ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013508
Martin v. Löwis11437992002-04-12 09:54:03 +000013509cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013510# This file is a shell script that caches the results of configure
13511# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013512# scripts and configure runs, see configure's option --config-cache.
13513# It is not useful on other systems. If it contains results you don't
13514# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013515#
Martin v. Löwis11437992002-04-12 09:54:03 +000013516# config.status only pays attention to the cache file if you give it
13517# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013518#
Skip Montanaro6dead952003-09-25 14:50:04 +000013519# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013520# loading this file, other *unset* `ac_cv_foo' will be assigned the
13521# following values.
13522
13523_ACEOF
13524
Guido van Rossumf78abae1997-01-21 22:02:36 +000013525# The following way of writing the cache mishandles newlines in values,
13526# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013527# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013528# Ultrix sh set writes to stderr and can't be redirected directly,
13529# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013530(
13531 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13532 eval ac_val=\$$ac_var
13533 case $ac_val in #(
13534 *${as_nl}*)
13535 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013536 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13537$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013538 esac
13539 case $ac_var in #(
13540 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013541 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13542 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013543 esac ;;
13544 esac
13545 done
13546
Martin v. Löwis11437992002-04-12 09:54:03 +000013547 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013548 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13549 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 # `set' does not quote correctly, so add quotes: double-quote
13551 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013552 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013553 "s/'/'\\\\''/g;
13554 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013555 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013556 *)
13557 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013558 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013559 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013560 esac |
13561 sort
13562) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013563 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013564 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013565 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013566 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013567 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13568 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013569 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13570 :end' >>confcache
13571if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13572 if test -w "$cache_file"; then
13573 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13575$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013576 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013577 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013578 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13579$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013580 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013581fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013582rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013583
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013584test "x$prefix" = xNONE && prefix=$ac_default_prefix
13585# Let make expand exec_prefix.
13586test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013587
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013588DEFS=-DHAVE_CONFIG_H
13589
Skip Montanaro6dead952003-09-25 14:50:04 +000013590ac_libobjs=
13591ac_ltlibobjs=
13592for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13593 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013594 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013595 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013596 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13597 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013598 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13599 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013600done
13601LIBOBJS=$ac_libobjs
13602
13603LTLIBOBJS=$ac_ltlibobjs
13604
13605
Martin v. Löwis11437992002-04-12 09:54:03 +000013606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013608: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013609ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013610ac_clean_files_save=$ac_clean_files
13611ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013612{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13613$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13614as_write_fail=0
13615cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013616#! $SHELL
13617# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013618# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013619# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013620# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013621
Martin v. Löwis11437992002-04-12 09:54:03 +000013622debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013623ac_cs_recheck=false
13624ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013625
Matthias Kloseb9621712010-04-24 17:59:49 +000013626SHELL=\${CONFIG_SHELL-$SHELL}
13627export SHELL
13628_ASEOF
13629cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13630## -------------------- ##
13631## M4sh Initialization. ##
13632## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013633
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013634# Be more Bourne compatible
13635DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013636if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013637 emulate sh
13638 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013639 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013640 # is contrary to our usage. Disable this feature.
13641 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013642 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013643else
Matthias Kloseb9621712010-04-24 17:59:49 +000013644 case `(set -o) 2>/dev/null` in #(
13645 *posix*) :
13646 set -o posix ;; #(
13647 *) :
13648 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013649esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013650fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013651
13652
Matthias Kloseb9621712010-04-24 17:59:49 +000013653as_nl='
13654'
13655export as_nl
13656# Printing a long string crashes Solaris 7 /usr/bin/printf.
13657as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13658as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13659as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13660# Prefer a ksh shell builtin over an external printf program on Solaris,
13661# but without wasting forks for bash or zsh.
13662if test -z "$BASH_VERSION$ZSH_VERSION" \
13663 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13664 as_echo='print -r --'
13665 as_echo_n='print -rn --'
13666elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13667 as_echo='printf %s\n'
13668 as_echo_n='printf %s'
13669else
13670 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13671 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13672 as_echo_n='/usr/ucb/echo -n'
13673 else
13674 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13675 as_echo_n_body='eval
13676 arg=$1;
13677 case $arg in #(
13678 *"$as_nl"*)
13679 expr "X$arg" : "X\\(.*\\)$as_nl";
13680 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13681 esac;
13682 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13683 '
13684 export as_echo_n_body
13685 as_echo_n='sh -c $as_echo_n_body as_echo'
13686 fi
13687 export as_echo_body
13688 as_echo='sh -c $as_echo_body as_echo'
13689fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013690
13691# The user is always right.
13692if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 PATH_SEPARATOR=:
13694 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13695 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13696 PATH_SEPARATOR=';'
13697 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013698fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013700
13701# IFS
13702# We need space, tab and new line, in precisely that order. Quoting is
13703# there to prevent editors from complaining about space-tab.
13704# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13705# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013706IFS=" "" $as_nl"
13707
13708# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013709case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013710 *[\\/]* ) as_myself=$0 ;;
13711 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013712for as_dir in $PATH
13713do
13714 IFS=$as_save_IFS
13715 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13717 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013718IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013720 ;;
13721esac
13722# We did not find ourselves, most probably we were run as `sh COMMAND'
13723# in which case we are not to be found in the path.
13724if test "x$as_myself" = x; then
13725 as_myself=$0
13726fi
13727if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13729 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013730fi
13731
Matthias Kloseb9621712010-04-24 17:59:49 +000013732# Unset variables that we do not need and which cause bugs (e.g. in
13733# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13734# suppresses any "Segmentation fault" message there. '((' could
13735# trigger a bug in pdksh 5.2.14.
13736for as_var in BASH_ENV ENV MAIL MAILPATH
13737do eval test x\${$as_var+set} = xset \
13738 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013739done
13740PS1='$ '
13741PS2='> '
13742PS4='+ '
13743
13744# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013745LC_ALL=C
13746export LC_ALL
13747LANGUAGE=C
13748export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013749
Matthias Kloseb9621712010-04-24 17:59:49 +000013750# CDPATH.
13751(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13752
13753
13754# as_fn_error ERROR [LINENO LOG_FD]
13755# ---------------------------------
13756# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13757# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13758# script with status $?, using 1 if that was 0.
13759as_fn_error ()
13760{
13761 as_status=$?; test $as_status -eq 0 && as_status=1
13762 if test "$3"; then
13763 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13764 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
13765 fi
13766 $as_echo "$as_me: error: $1" >&2
13767 as_fn_exit $as_status
13768} # as_fn_error
13769
13770
13771# as_fn_set_status STATUS
13772# -----------------------
13773# Set $? to STATUS, without forking.
13774as_fn_set_status ()
13775{
13776 return $1
13777} # as_fn_set_status
13778
13779# as_fn_exit STATUS
13780# -----------------
13781# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13782as_fn_exit ()
13783{
13784 set +e
13785 as_fn_set_status $1
13786 exit $1
13787} # as_fn_exit
13788
13789# as_fn_unset VAR
13790# ---------------
13791# Portably unset VAR.
13792as_fn_unset ()
13793{
13794 { eval $1=; unset $1;}
13795}
13796as_unset=as_fn_unset
13797# as_fn_append VAR VALUE
13798# ----------------------
13799# Append the text in VALUE to the end of the definition contained in VAR. Take
13800# advantage of any shell optimizations that allow amortized linear growth over
13801# repeated appends, instead of the typical quadratic growth present in naive
13802# implementations.
13803if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13804 eval 'as_fn_append ()
13805 {
13806 eval $1+=\$2
13807 }'
13808else
13809 as_fn_append ()
13810 {
13811 eval $1=\$$1\$2
13812 }
13813fi # as_fn_append
13814
13815# as_fn_arith ARG...
13816# ------------------
13817# Perform arithmetic evaluation on the ARGs, and store the result in the
13818# global $as_val. Take advantage of shells that can avoid forks. The arguments
13819# must be portable across $(()) and expr.
13820if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13821 eval 'as_fn_arith ()
13822 {
13823 as_val=$(( $* ))
13824 }'
13825else
13826 as_fn_arith ()
13827 {
13828 as_val=`expr "$@" || test $? -eq 1`
13829 }
13830fi # as_fn_arith
13831
13832
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013833if expr a : '\(a\)' >/dev/null 2>&1 &&
13834 test "X`expr 00001 : '.*\(...\)'`" = X001; then
13835 as_expr=expr
13836else
13837 as_expr=false
13838fi
13839
13840if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13841 as_basename=basename
13842else
13843 as_basename=false
13844fi
13845
Matthias Kloseb9621712010-04-24 17:59:49 +000013846if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13847 as_dirname=dirname
13848else
13849 as_dirname=false
13850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013852as_me=`$as_basename -- "$0" ||
13853$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13854 X"$0" : 'X\(//\)$' \| \
13855 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000013856$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013857 sed '/^.*\/\([^/][^/]*\)\/*$/{
13858 s//\1/
13859 q
13860 }
13861 /^X\/\(\/\/\)$/{
13862 s//\1/
13863 q
13864 }
13865 /^X\/\(\/\).*/{
13866 s//\1/
13867 q
13868 }
13869 s/.*/./; q'`
13870
Matthias Kloseb9621712010-04-24 17:59:49 +000013871# Avoid depending upon Character Ranges.
13872as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13873as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13874as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13875as_cr_digits='0123456789'
13876as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013877
13878ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000013879case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013880-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013882 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000013883 xy) ECHO_C='\c';;
13884 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13885 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013886 esac;;
13887*)
13888 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000013889esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013890
Martin v. Löwis11437992002-04-12 09:54:03 +000013891rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892if test -d conf$$.dir; then
13893 rm -f conf$$.dir/conf$$.file
13894else
13895 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013898if (echo >conf$$.file) 2>/dev/null; then
13899 if ln -s conf$$.file conf$$ 2>/dev/null; then
13900 as_ln_s='ln -s'
13901 # ... but there are two gotchas:
13902 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13903 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13904 # In both cases, we have to default to `cp -p'.
13905 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13906 as_ln_s='cp -p'
13907 elif ln conf$$.file conf$$ 2>/dev/null; then
13908 as_ln_s=ln
13909 else
Martin v. Löwis11437992002-04-12 09:54:03 +000013910 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000013911 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013912else
13913 as_ln_s='cp -p'
13914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013915rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13916rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000013917
Matthias Kloseb9621712010-04-24 17:59:49 +000013918
13919# as_fn_mkdir_p
13920# -------------
13921# Create "$as_dir" as a directory, including parents if necessary.
13922as_fn_mkdir_p ()
13923{
13924
13925 case $as_dir in #(
13926 -*) as_dir=./$as_dir;;
13927 esac
13928 test -d "$as_dir" || eval $as_mkdir_p || {
13929 as_dirs=
13930 while :; do
13931 case $as_dir in #(
13932 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13933 *) as_qdir=$as_dir;;
13934 esac
13935 as_dirs="'$as_qdir' $as_dirs"
13936 as_dir=`$as_dirname -- "$as_dir" ||
13937$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13938 X"$as_dir" : 'X\(//\)[^/]' \| \
13939 X"$as_dir" : 'X\(//\)$' \| \
13940 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13941$as_echo X"$as_dir" |
13942 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13943 s//\1/
13944 q
13945 }
13946 /^X\(\/\/\)[^/].*/{
13947 s//\1/
13948 q
13949 }
13950 /^X\(\/\/\)$/{
13951 s//\1/
13952 q
13953 }
13954 /^X\(\/\).*/{
13955 s//\1/
13956 q
13957 }
13958 s/.*/./; q'`
13959 test -d "$as_dir" && break
13960 done
13961 test -z "$as_dirs" || eval "mkdir $as_dirs"
13962 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
13963
13964
13965} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000013966if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013967 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000013968else
Skip Montanarof0d5f792004-08-15 14:08:23 +000013969 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000013970 as_mkdir_p=false
13971fi
13972
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013973if test -x / >/dev/null 2>&1; then
13974 as_test_x='test -x'
13975else
13976 if ls -dL / >/dev/null 2>&1; then
13977 as_ls_L_option=L
13978 else
13979 as_ls_L_option=
13980 fi
13981 as_test_x='
13982 eval sh -c '\''
13983 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013984 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013985 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 case $1 in #(
13987 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013988 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000013989 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013990 ???[sx]*):;;*)false;;esac;fi
13991 '\'' sh
13992 '
13993fi
13994as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000013995
13996# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000013997as_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 +000013998
13999# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014000as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014001
14002
Martin v. Löwis11437992002-04-12 09:54:03 +000014003exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014004## ----------------------------------- ##
14005## Main body of $CONFIG_STATUS script. ##
14006## ----------------------------------- ##
14007_ASEOF
14008test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014009
Matthias Kloseb9621712010-04-24 17:59:49 +000014010cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14011# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014012# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014013# values after options handling.
14014ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014015This file was extended by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +000014016generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014017
14018 CONFIG_FILES = $CONFIG_FILES
14019 CONFIG_HEADERS = $CONFIG_HEADERS
14020 CONFIG_LINKS = $CONFIG_LINKS
14021 CONFIG_COMMANDS = $CONFIG_COMMANDS
14022 $ $0 $@
14023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014024on `(hostname || uname -n) 2>/dev/null | sed 1q`
14025"
14026
Martin v. Löwis11437992002-04-12 09:54:03 +000014027_ACEOF
14028
Matthias Kloseb9621712010-04-24 17:59:49 +000014029case $ac_config_files in *"
14030"*) set x $ac_config_files; shift; ac_config_files=$*;;
14031esac
14032
14033case $ac_config_headers in *"
14034"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14035esac
14036
14037
14038cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014039# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000014040config_files="$ac_config_files"
14041config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014043_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014044
Matthias Kloseb9621712010-04-24 17:59:49 +000014045cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014046ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014047\`$as_me' instantiates files and other configuration actions
14048from templates according to the current configuration. Unless the files
14049and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014050
Matthias Kloseb9621712010-04-24 17:59:49 +000014051Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014052
14053 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014054 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014055 --config print configuration, then exit
14056 -q, --quiet, --silent
14057 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014058 -d, --debug don't remove temporary files
14059 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014060 --file=FILE[:TEMPLATE]
14061 instantiate the configuration file FILE
14062 --header=FILE[:TEMPLATE]
14063 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014064
14065Configuration files:
14066$config_files
14067
14068Configuration headers:
14069$config_headers
14070
Matthias Kloseb9621712010-04-24 17:59:49 +000014071Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014074cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14075ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014076ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014077python config.status 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014078configured by $0, generated by GNU Autoconf 2.65,
14079 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014080
Matthias Kloseb9621712010-04-24 17:59:49 +000014081Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014082This config.status script is free software; the Free Software Foundation
14083gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014084
14085ac_pwd='$ac_pwd'
14086srcdir='$srcdir'
14087INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014088test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014089_ACEOF
14090
Matthias Kloseb9621712010-04-24 17:59:49 +000014091cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14092# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014093ac_need_defaults=:
14094while test $# != 0
14095do
14096 case $1 in
14097 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014098 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14099 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014100 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014101 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014102 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014103 ac_option=$1
14104 ac_optarg=$2
14105 ac_shift=shift
14106 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014107 esac
14108
Skip Montanaro6dead952003-09-25 14:50:04 +000014109 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014110 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014111 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14112 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014113 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014114 $as_echo "$ac_cs_version"; exit ;;
14115 --config | --confi | --conf | --con | --co | --c )
14116 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014117 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014118 debug=: ;;
14119 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014120 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014121 case $ac_optarg in
14122 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14123 esac
14124 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014125 ac_need_defaults=false;;
14126 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014127 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014128 case $ac_optarg in
14129 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14130 esac
14131 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014132 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014133 --he | --h)
14134 # Conflict between --help and --header
Matthias Kloseb9621712010-04-24 17:59:49 +000014135 as_fn_error "ambiguous option: \`$1'
14136Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014137 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014138 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014139 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14140 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14141 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014142
14143 # This is an error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014144 -*) as_fn_error "unrecognized option: \`$1'
14145Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014146
Matthias Kloseb9621712010-04-24 17:59:49 +000014147 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014148 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014149
14150 esac
14151 shift
14152done
14153
Skip Montanaro6dead952003-09-25 14:50:04 +000014154ac_configure_extra_args=
14155
14156if $ac_cs_silent; then
14157 exec 6>/dev/null
14158 ac_configure_extra_args="$ac_configure_extra_args --silent"
14159fi
14160
14161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014162cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014163if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14165 shift
14166 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14167 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014168 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014169 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014170fi
14171
Martin v. Löwis11437992002-04-12 09:54:03 +000014172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014173cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014174exec 5>>config.log
14175{
14176 echo
14177 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14178## Running $as_me. ##
14179_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014180 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014181} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014184cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014185_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014186
Matthias Kloseb9621712010-04-24 17:59:49 +000014187cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014188
14189# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014190for ac_config_target in $ac_config_targets
14191do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014192 case $ac_config_target in
14193 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14194 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14195 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014196 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14197 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14199 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014200 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014201
Matthias Kloseb9621712010-04-24 17:59:49 +000014202 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014203 esac
14204done
14205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014206
Martin v. Löwis11437992002-04-12 09:54:03 +000014207# If the user did not use the arguments to specify the items to instantiate,
14208# then the envvar interface is used. Set only those that are not.
14209# We use the long form for the default assignment because of an extremely
14210# bizarre bug on SunOS 4.1.3.
14211if $ac_need_defaults; then
14212 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14213 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14214fi
14215
Skip Montanaro6dead952003-09-25 14:50:04 +000014216# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014217# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014218# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014219# Hook for its removal unless debugging.
14220# Note that there is a small window in which the directory will not be cleaned:
14221# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014222$debug ||
14223{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014224 tmp=
14225 trap 'exit_status=$?
14226 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14227' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014228 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014229}
Martin v. Löwis11437992002-04-12 09:54:03 +000014230# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014231
Martin v. Löwis11437992002-04-12 09:54:03 +000014232{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014233 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014234 test -n "$tmp" && test -d "$tmp"
14235} ||
14236{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014237 tmp=./conf$$-$RANDOM
14238 (umask 077 && mkdir "$tmp")
Matthias Kloseb9621712010-04-24 17:59:49 +000014239} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014240
Matthias Kloseb9621712010-04-24 17:59:49 +000014241# Set up the scripts for CONFIG_FILES section.
14242# No need to generate them if there are no CONFIG_FILES.
14243# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014244if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014245
Matthias Kloseb9621712010-04-24 17:59:49 +000014246
14247ac_cr=`echo X | tr X '\015'`
14248# On cygwin, bash can eat \r inside `` if the user requested igncr.
14249# But we know of no other shell where ac_cr would be empty at this
14250# point, so we can use a bashism as a fallback.
14251if test "x$ac_cr" = x; then
14252 eval ac_cr=\$\'\\r\'
14253fi
14254ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14255if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14256 ac_cs_awk_cr='\r'
14257else
14258 ac_cs_awk_cr=$ac_cr
14259fi
14260
14261echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014262_ACEOF
14263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014264
Matthias Kloseb9621712010-04-24 17:59:49 +000014265{
14266 echo "cat >conf$$subs.awk <<_ACEOF" &&
14267 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14268 echo "_ACEOF"
14269} >conf$$subs.sh ||
14270 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14271ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014272ac_delim='%!_!# '
14273for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014274 . ./conf$$subs.sh ||
14275 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014276
Matthias Kloseb9621712010-04-24 17:59:49 +000014277 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14278 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014279 break
14280 elif $ac_last_try; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014281 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014282 else
14283 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014284 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014285done
Matthias Kloseb9621712010-04-24 17:59:49 +000014286rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287
Matthias Kloseb9621712010-04-24 17:59:49 +000014288cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14289cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014291sed -n '
14292h
14293s/^/S["/; s/!.*/"]=/
14294p
14295g
14296s/^[^!]*!//
14297:repl
14298t repl
14299s/'"$ac_delim"'$//
14300t delim
14301:nl
14302h
14303s/\(.\{148\}\)..*/\1/
14304t more1
14305s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14306p
14307n
14308b repl
14309:more1
14310s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14311p
14312g
14313s/.\{148\}//
14314t nl
14315:delim
14316h
14317s/\(.\{148\}\)..*/\1/
14318t more2
14319s/["\\]/\\&/g; s/^/"/; s/$/"/
14320p
14321b
14322:more2
14323s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14324p
14325g
14326s/.\{148\}//
14327t delim
14328' <conf$$subs.awk | sed '
14329/^[^""]/{
14330 N
14331 s/\n//
14332}
14333' >>$CONFIG_STATUS || ac_write_fail=1
14334rm -f conf$$subs.awk
14335cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14336_ACAWK
14337cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14338 for (key in S) S_is_set[key] = 1
14339 FS = ""
14340
14341}
14342{
14343 line = $ 0
14344 nfields = split(line, field, "@")
14345 substed = 0
14346 len = length(field[1])
14347 for (i = 2; i < nfields; i++) {
14348 key = field[i]
14349 keylen = length(key)
14350 if (S_is_set[key]) {
14351 value = S[key]
14352 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14353 len += length(value) + length(field[++i])
14354 substed = 1
14355 } else
14356 len += 1 + keylen
14357 }
14358
14359 print line
14360}
14361
14362_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014364cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14365if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14366 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14367else
14368 cat
14369fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14370 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014371_ACEOF
14372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014373# VPATH may cause trouble with some makes, so we remove $(srcdir),
14374# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14375# trailing colons and then remove the whole line if VPATH becomes empty
14376# (actually we leave an empty line to preserve line numbers).
14377if test "x$srcdir" = x.; then
14378 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14379s/:*\$(srcdir):*/:/
14380s/:*\${srcdir}:*/:/
14381s/:*@srcdir@:*/:/
14382s/^\([^=]*=[ ]*\):*/\1/
14383s/:*$//
14384s/^[^=]*=[ ]*$//
14385}'
14386fi
14387
Matthias Kloseb9621712010-04-24 17:59:49 +000014388cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014389fi # test -n "$CONFIG_FILES"
14390
Matthias Kloseb9621712010-04-24 17:59:49 +000014391# Set up the scripts for CONFIG_HEADERS section.
14392# No need to generate them if there are no CONFIG_HEADERS.
14393# This happens for instance with `./config.status Makefile'.
14394if test -n "$CONFIG_HEADERS"; then
14395cat >"$tmp/defines.awk" <<\_ACAWK ||
14396BEGIN {
14397_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014398
Matthias Kloseb9621712010-04-24 17:59:49 +000014399# Transform confdefs.h into an awk script `defines.awk', embedded as
14400# here-document in config.status, that substitutes the proper values into
14401# config.h.in to produce config.h.
14402
14403# Create a delimiter string that does not exist in confdefs.h, to ease
14404# handling of long lines.
14405ac_delim='%!_!# '
14406for ac_last_try in false false :; do
14407 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14408 if test -z "$ac_t"; then
14409 break
14410 elif $ac_last_try; then
14411 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14412 else
14413 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14414 fi
14415done
14416
14417# For the awk script, D is an array of macro values keyed by name,
14418# likewise P contains macro parameters if any. Preserve backslash
14419# newline sequences.
14420
14421ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14422sed -n '
14423s/.\{148\}/&'"$ac_delim"'/g
14424t rset
14425:rset
14426s/^[ ]*#[ ]*define[ ][ ]*/ /
14427t def
14428d
14429:def
14430s/\\$//
14431t bsnl
14432s/["\\]/\\&/g
14433s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14434D["\1"]=" \3"/p
14435s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14436d
14437:bsnl
14438s/["\\]/\\&/g
14439s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14440D["\1"]=" \3\\\\\\n"\\/p
14441t cont
14442s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14443t cont
14444d
14445:cont
14446n
14447s/.\{148\}/&'"$ac_delim"'/g
14448t clear
14449:clear
14450s/\\$//
14451t bsnlc
14452s/["\\]/\\&/g; s/^/"/; s/$/"/p
14453d
14454:bsnlc
14455s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14456b cont
14457' <confdefs.h | sed '
14458s/'"$ac_delim"'/"\\\
14459"/g' >>$CONFIG_STATUS || ac_write_fail=1
14460
14461cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14462 for (key in D) D_is_set[key] = 1
14463 FS = ""
14464}
14465/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14466 line = \$ 0
14467 split(line, arg, " ")
14468 if (arg[1] == "#") {
14469 defundef = arg[2]
14470 mac1 = arg[3]
14471 } else {
14472 defundef = substr(arg[1], 2)
14473 mac1 = arg[2]
14474 }
14475 split(mac1, mac2, "(") #)
14476 macro = mac2[1]
14477 prefix = substr(line, 1, index(line, defundef) - 1)
14478 if (D_is_set[macro]) {
14479 # Preserve the white space surrounding the "#".
14480 print prefix "define", macro P[macro] D[macro]
14481 next
14482 } else {
14483 # Replace #undef with comments. This is necessary, for example,
14484 # in the case of _POSIX_SOURCE, which is predefined and required
14485 # on some systems where configure will not decide to define it.
14486 if (defundef == "undef") {
14487 print "/*", prefix defundef, macro, "*/"
14488 next
14489 }
14490 }
14491}
14492{ print }
14493_ACAWK
14494_ACEOF
14495cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14496 as_fn_error "could not setup config headers machinery" "$LINENO" 5
14497fi # test -n "$CONFIG_HEADERS"
14498
14499
14500eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14501shift
14502for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014503do
14504 case $ac_tag in
14505 :[FHLC]) ac_mode=$ac_tag; continue;;
14506 esac
14507 case $ac_mode$ac_tag in
14508 :[FHL]*:*);;
Matthias Kloseb9621712010-04-24 17:59:49 +000014509 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014510 :[FH]-) ac_tag=-:-;;
14511 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14512 esac
14513 ac_save_IFS=$IFS
14514 IFS=:
14515 set x $ac_tag
14516 IFS=$ac_save_IFS
14517 shift
14518 ac_file=$1
14519 shift
14520
14521 case $ac_mode in
14522 :L) ac_source=$1;;
14523 :[FH])
14524 ac_file_inputs=
14525 for ac_f
14526 do
14527 case $ac_f in
14528 -) ac_f="$tmp/stdin";;
14529 *) # Look for the file first in the build tree, then in the source tree
14530 # (if the path is not absolute). The absolute path cannot be DOS-style,
14531 # because $ac_f cannot contain `:'.
14532 test -f "$ac_f" ||
14533 case $ac_f in
14534 [\\/$]*) false;;
14535 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14536 esac ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014538 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014539 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14540 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014541 done
14542
14543 # Let's still pretend it is `configure' which instantiates (i.e., don't
14544 # use $as_me), people would be surprised to read:
14545 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014546 configure_input='Generated from '`
14547 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14548 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014549 if test x"$ac_file" != x-; then
14550 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014551 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14552$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014553 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014554 # Neutralize special characters interpreted by sed in replacement strings.
14555 case $configure_input in #(
14556 *\&* | *\|* | *\\* )
14557 ac_sed_conf_input=`$as_echo "$configure_input" |
14558 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14559 *) ac_sed_conf_input=$configure_input;;
14560 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014561
14562 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014563 *:-:* | *:-) cat >"$tmp/stdin" \
14564 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014565 esac
14566 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014567 esac
14568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014569 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014570$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014571 X"$ac_file" : 'X\(//\)[^/]' \| \
14572 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014574$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014575 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14576 s//\1/
14577 q
14578 }
14579 /^X\(\/\/\)[^/].*/{
14580 s//\1/
14581 q
14582 }
14583 /^X\(\/\/\)$/{
14584 s//\1/
14585 q
14586 }
14587 /^X\(\/\).*/{
14588 s//\1/
14589 q
14590 }
14591 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014592 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014593 ac_builddir=.
14594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595case "$ac_dir" in
14596.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14597*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014598 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014599 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014600 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014601 case $ac_top_builddir_sub in
14602 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14603 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14604 esac ;;
14605esac
14606ac_abs_top_builddir=$ac_pwd
14607ac_abs_builddir=$ac_pwd$ac_dir_suffix
14608# for backward compatibility:
14609ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014610
14611case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014612 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014613 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014614 ac_top_srcdir=$ac_top_builddir_sub
14615 ac_abs_top_srcdir=$ac_pwd ;;
14616 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014617 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014618 ac_top_srcdir=$srcdir
14619 ac_abs_top_srcdir=$srcdir ;;
14620 *) # Relative name.
14621 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14622 ac_top_srcdir=$ac_top_build_prefix$srcdir
14623 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014624esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014626
Martin v. Löwis11437992002-04-12 09:54:03 +000014627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014628 case $ac_mode in
14629 :F)
14630 #
14631 # CONFIG_FILE
14632 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014633
14634 case $INSTALL in
14635 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014636 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014637 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014638_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014639
Matthias Kloseb9621712010-04-24 17:59:49 +000014640cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014641# If the template does not know about datarootdir, expand it.
14642# FIXME: This hack should be removed a few years after 2.60.
14643ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014644ac_sed_dataroot='
14645/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014646 p
14647 q
14648}
14649/@datadir@/p
14650/@docdir@/p
14651/@infodir@/p
14652/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014653/@mandir@/p'
14654case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014655*datarootdir*) ac_datarootdir_seen=yes;;
14656*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014657 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14658$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014660cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014661 ac_datarootdir_hack='
14662 s&@datadir@&$datadir&g
14663 s&@docdir@&$docdir&g
14664 s&@infodir@&$infodir&g
14665 s&@localedir@&$localedir&g
14666 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014667 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668esac
14669_ACEOF
14670
14671# Neutralize VPATH when `$srcdir' = `.'.
14672# Shell code in configure.ac might set extrasub.
14673# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014674cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14675ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014676$extrasub
14677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014678cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014679:t
14680/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014681s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014683s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014684s&@srcdir@&$ac_srcdir&;t t
14685s&@abs_srcdir@&$ac_abs_srcdir&;t t
14686s&@top_srcdir@&$ac_top_srcdir&;t t
14687s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14688s&@builddir@&$ac_builddir&;t t
14689s&@abs_builddir@&$ac_abs_builddir&;t t
14690s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14691s&@INSTALL@&$ac_INSTALL&;t t
14692$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014693"
14694eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
14695 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014697test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14698 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14699 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014700 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014701which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014702$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014703which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014705 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014706 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014707 -) cat "$tmp/out" && rm -f "$tmp/out";;
14708 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14709 esac \
14710 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014711 ;;
14712 :H)
14713 #
14714 # CONFIG_HEADER
14715 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014716 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014717 {
14718 $as_echo "/* $configure_input */" \
14719 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14720 } >"$tmp/config.h" \
14721 || as_fn_error "could not create $ac_file" "$LINENO" 5
14722 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14723 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14724$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014725 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014726 rm -f "$ac_file"
14727 mv "$tmp/config.h" "$ac_file" \
14728 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014729 fi
14730 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014731 $as_echo "/* $configure_input */" \
14732 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
14733 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014734 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014735 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014737
14738 esac
14739
14740done # for ac_tag
14741
Guido van Rossum627b2d71993-12-24 10:39:16 +000014742
Matthias Kloseb9621712010-04-24 17:59:49 +000014743as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014744_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014745ac_clean_files=$ac_clean_files_save
14746
Matthias Kloseb9621712010-04-24 17:59:49 +000014747test $ac_write_fail = 0 ||
14748 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14749
Martin v. Löwis11437992002-04-12 09:54:03 +000014750
14751# configure is writing to config.log, and then calls config.status.
14752# config.status does its own redirection, appending to config.log.
14753# Unfortunately, on DOS this fails, as config.log is still kept open
14754# by configure, so config.status won't be able to write to it; its
14755# output is simply discarded. So we exec the FD to /dev/null,
14756# effectively closing config.log, so it can be properly (re)opened and
14757# appended to by config.status. When coming back to configure, we
14758# need to make the FD available again.
14759if test "$no_create" != yes; then
14760 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014761 ac_config_status_args=
14762 test "$silent" = yes &&
14763 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000014764 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000014765 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000014766 exec 5>>config.log
14767 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14768 # would make configure fail if this is the last instruction.
Matthias Kloseb9621712010-04-24 17:59:49 +000014769 $ac_cs_success || as_fn_exit $?
14770fi
14771if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14772 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14773$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014774fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014775
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014776
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014777echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014778if test ! -f Modules/Setup
14779then
14780 cp $srcdir/Modules/Setup.dist Modules/Setup
14781fi
14782
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014783echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014784if test ! -f Modules/Setup.local
14785then
14786 echo "# Edit this file for local setup changes" >Modules/Setup.local
14787fi
14788
14789echo "creating Makefile"
14790$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
14791 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000014792 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014793mv config.c Modules