blob: f94b125bbdf37f93c300f5a11de02426fba64b77 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Antoine Pitrou33a29942010-08-30 14:52:00 +00002# From configure.in Revision: 83986 .
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
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000641USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000642GNULD
643LINKCC
644RUNSHARED
645INSTSONAME
646LDLIBRARYDIR
647BLDLIBRARY
648DLLLIBRARY
649LDLIBRARY
650LIBRARY
651BUILDEXEEXT
652EGREP
653GREP
654CPP
655MAINCC
656CXX
657OBJEXT
658EXEEXT
659ac_ct_CC
660CPPFLAGS
661LDFLAGS
662CFLAGS
663CC
664EXPORT_MACOSX_DEPLOYMENT_TARGET
665CONFIGURE_MACOSX_DEPLOYMENT_TARGET
666SGI_ABI
667MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000668FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000669FRAMEWORKUNIXTOOLSPREFIX
670FRAMEWORKALTINSTALLLAST
671FRAMEWORKALTINSTALLFIRST
672FRAMEWORKINSTALLLAST
673FRAMEWORKINSTALLFIRST
674PYTHONFRAMEWORKINSTALLDIR
675PYTHONFRAMEWORKPREFIX
676PYTHONFRAMEWORKDIR
677PYTHONFRAMEWORKIDENTIFIER
678PYTHONFRAMEWORK
679LIPO_32BIT_FLAGS
680ARCH_RUN_32BIT
681UNIVERSALSDK
682CONFIG_ARGS
683SOVERSION
684VERSION
685target_alias
686host_alias
687build_alias
688LIBS
689ECHO_T
690ECHO_N
691ECHO_C
692DEFS
693mandir
694localedir
695libdir
696psdir
697pdfdir
698dvidir
699htmldir
700infodir
701docdir
702oldincludedir
703includedir
704localstatedir
705sharedstatedir
706sysconfdir
707datadir
708datarootdir
709libexecdir
710sbindir
711bindir
712program_transform_name
713prefix
714exec_prefix
715PACKAGE_URL
716PACKAGE_BUGREPORT
717PACKAGE_STRING
718PACKAGE_VERSION
719PACKAGE_TARNAME
720PACKAGE_NAME
721PATH_SEPARATOR
722SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000723ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000724ac_user_opts='
725enable_option_checking
726enable_universalsdk
727with_universal_archs
728with_framework_name
729enable_framework
730with_gcc
731with_cxx_main
732with_suffix
733enable_shared
734enable_profiling
735with_pydebug
736with_libs
737with_system_expat
738with_system_ffi
739with_dbmliborder
740with_signal_module
741with_dec_threads
742with_threads
743with_thread
744enable_ipv6
745with_doc_strings
746with_tsc
747with_pymalloc
748with_valgrind
749with_wctype_functions
750with_fpectl
751with_libm
752with_libc
753enable_big_digits
754with_wide_unicode
755with_computed_gotos
756'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000757 ac_precious_vars='build_alias
758host_alias
759target_alias
760CC
761CFLAGS
762LDFLAGS
763LIBS
764CPPFLAGS
765CPP'
766
Guido van Rossum627b2d71993-12-24 10:39:16 +0000767
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000769ac_init_help=
770ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000771ac_unrecognized_opts=
772ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000773# The variables have the same names as the options, with
774# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000775cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000776exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000777no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000778no_recursion=
779prefix=NONE
780program_prefix=NONE
781program_suffix=NONE
782program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000783silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000784site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000786verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787x_includes=NONE
788x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000789
790# Installation directory options.
791# These are left unexpanded so users can "make install exec_prefix=/foo"
792# and all the variables that are supposed to be based on exec_prefix
793# by default will actually change.
794# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000795# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000796bindir='${exec_prefix}/bin'
797sbindir='${exec_prefix}/sbin'
798libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799datarootdir='${prefix}/share'
800datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000801sysconfdir='${prefix}/etc'
802sharedstatedir='${prefix}/com'
803localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000804includedir='${prefix}/include'
805oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
807infodir='${datarootdir}/info'
808htmldir='${docdir}'
809dvidir='${docdir}'
810pdfdir='${docdir}'
811psdir='${docdir}'
812libdir='${exec_prefix}/lib'
813localedir='${datarootdir}/locale'
814mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000817ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000819do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820 # If the previous option needs an argument, assign it.
821 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823 ac_prev=
824 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000825 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000827 case $ac_option in
828 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
829 *) ac_optarg=yes ;;
830 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000832 # Accept the important Cygnus configure options, so we can diagnose typos.
833
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834 case $ac_dashdash$ac_option in
835 --)
836 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838 -bindir | --bindir | --bindi | --bind | --bin | --bi)
839 ac_prev=bindir ;;
840 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000841 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842
843 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000844 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000846 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848 -cache-file | --cache-file | --cache-fil | --cache-fi \
849 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
850 ac_prev=cache_file ;;
851 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
852 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853 cache_file=$ac_optarg ;;
854
855 --config-cache | -C)
856 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
864 | --dataroo | --dataro | --datar)
865 ac_prev=datarootdir ;;
866 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
867 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
868 datarootdir=$ac_optarg ;;
869
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000871 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000873 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
874 as_fn_error "invalid feature name: $ac_useropt"
875 ac_useropt_orig=$ac_useropt
876 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
877 case $ac_user_opts in
878 *"
879"enable_$ac_useropt"
880"*) ;;
881 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
882 ac_unrecognized_sep=', ';;
883 esac
884 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885
886 -docdir | --docdir | --docdi | --doc | --do)
887 ac_prev=docdir ;;
888 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
889 docdir=$ac_optarg ;;
890
891 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
892 ac_prev=dvidir ;;
893 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
894 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895
896 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000897 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000898 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000899 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
900 as_fn_error "invalid feature name: $ac_useropt"
901 ac_useropt_orig=$ac_useropt
902 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
903 case $ac_user_opts in
904 *"
905"enable_$ac_useropt"
906"*) ;;
907 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
908 ac_unrecognized_sep=', ';;
909 esac
910 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
913 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
914 | --exec | --exe | --ex)
915 ac_prev=exec_prefix ;;
916 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
917 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
918 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
921 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000922 # Obsolete; use --with-gas.
923 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 -help | --help | --hel | --he | -h)
926 ac_init_help=long ;;
927 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
928 ac_init_help=recursive ;;
929 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
930 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
932 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000937 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
938 ac_prev=htmldir ;;
939 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
940 | --ht=*)
941 htmldir=$ac_optarg ;;
942
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 -includedir | --includedir | --includedi | --included | --include \
944 | --includ | --inclu | --incl | --inc)
945 ac_prev=includedir ;;
946 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
947 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
950 -infodir | --infodir | --infodi | --infod | --info | --inf)
951 ac_prev=infodir ;;
952 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954
955 -libdir | --libdir | --libdi | --libd)
956 ac_prev=libdir ;;
957 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959
960 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
961 | --libexe | --libex | --libe)
962 ac_prev=libexecdir ;;
963 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
964 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000967 -localedir | --localedir | --localedi | --localed | --locale)
968 ac_prev=localedir ;;
969 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
970 localedir=$ac_optarg ;;
971
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000973 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000974 ac_prev=localstatedir ;;
975 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000978
979 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
980 ac_prev=mandir ;;
981 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985 # Obsolete; use --without-fp.
986 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990 no_create=yes ;;
991
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
993 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
994 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
997 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
998 | --oldin | --oldi | --old | --ol | --o)
999 ac_prev=oldincludedir ;;
1000 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1001 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1002 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1006 ac_prev=prefix ;;
1007 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
1010 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1011 | --program-pre | --program-pr | --program-p)
1012 ac_prev=program_prefix ;;
1013 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1014 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
1017 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1018 | --program-suf | --program-su | --program-s)
1019 ac_prev=program_suffix ;;
1020 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1021 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
1024 -program-transform-name | --program-transform-name \
1025 | --program-transform-nam | --program-transform-na \
1026 | --program-transform-n | --program-transform- \
1027 | --program-transform | --program-transfor \
1028 | --program-transfo | --program-transf \
1029 | --program-trans | --program-tran \
1030 | --progr-tra | --program-tr | --program-t)
1031 ac_prev=program_transform_name ;;
1032 -program-transform-name=* | --program-transform-name=* \
1033 | --program-transform-nam=* | --program-transform-na=* \
1034 | --program-transform-n=* | --program-transform-=* \
1035 | --program-transform=* | --program-transfor=* \
1036 | --program-transfo=* | --program-transf=* \
1037 | --program-trans=* | --program-tran=* \
1038 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001041 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1042 ac_prev=pdfdir ;;
1043 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1044 pdfdir=$ac_optarg ;;
1045
1046 -psdir | --psdir | --psdi | --psd | --ps)
1047 ac_prev=psdir ;;
1048 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1049 psdir=$ac_optarg ;;
1050
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1052 | -silent | --silent | --silen | --sile | --sil)
1053 silent=yes ;;
1054
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1056 ac_prev=sbindir ;;
1057 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1058 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
1061 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1062 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1063 | --sharedst | --shareds | --shared | --share | --shar \
1064 | --sha | --sh)
1065 ac_prev=sharedstatedir ;;
1066 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1067 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1068 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1069 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001072 -site | --site | --sit)
1073 ac_prev=site ;;
1074 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1078 ac_prev=srcdir ;;
1079 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1083 | --syscon | --sysco | --sysc | --sys | --sy)
1084 ac_prev=sysconfdir ;;
1085 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1086 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
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 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1095 verbose=yes ;;
1096
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 -version | --version | --versio | --versi | --vers | -V)
1098 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001101 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001102 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001103 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1104 as_fn_error "invalid package name: $ac_useropt"
1105 ac_useropt_orig=$ac_useropt
1106 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1107 case $ac_user_opts in
1108 *"
1109"with_$ac_useropt"
1110"*) ;;
1111 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1112 ac_unrecognized_sep=', ';;
1113 esac
1114 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001117 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001119 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1120 as_fn_error "invalid package name: $ac_useropt"
1121 ac_useropt_orig=$ac_useropt
1122 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1123 case $ac_user_opts in
1124 *"
1125"with_$ac_useropt"
1126"*) ;;
1127 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1128 ac_unrecognized_sep=', ';;
1129 esac
1130 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001132 --x)
1133 # Obsolete; use --with-x.
1134 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
1136 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1137 | --x-incl | --x-inc | --x-in | --x-i)
1138 ac_prev=x_includes ;;
1139 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1140 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142
1143 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1144 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1145 ac_prev=x_libraries ;;
1146 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1147 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149
Matthias Kloseb9621712010-04-24 17:59:49 +00001150 -*) as_fn_error "unrecognized option: \`$ac_option'
1151Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152 ;;
1153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 *=*)
1155 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1156 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001157 case $ac_envvar in #(
1158 '' | [0-9]* | *[!_$as_cr_alnum]* )
1159 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1160 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001161 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 export $ac_envvar ;;
1163
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001166 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001168 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170 ;;
1171
1172 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173done
1174
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178fi
1179
Matthias Kloseb9621712010-04-24 17:59:49 +00001180if test -n "$ac_unrecognized_opts"; then
1181 case $enable_option_checking in
1182 no) ;;
1183 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1184 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1185 esac
1186fi
1187
1188# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001189for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1190 datadir sysconfdir sharedstatedir localstatedir includedir \
1191 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1192 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001193do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001194 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 # Remove trailing slashes.
1196 case $ac_val in
1197 */ )
1198 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1199 eval $ac_var=\$ac_val;;
1200 esac
1201 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001203 [\\/$]* | ?:[\\/]* ) continue;;
1204 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001207done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209# There might be people who depend on the old broken behavior: `$host'
1210# used to hold the argument of --host etc.
1211# FIXME: To remove some day.
1212build=$build_alias
1213host=$host_alias
1214target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215
Martin v. Löwis11437992002-04-12 09:54:03 +00001216# FIXME: To remove some day.
1217if test "x$host_alias" != x; then
1218 if test "x$build_alias" = x; then
1219 cross_compiling=maybe
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 $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 +00001221 If a cross compiler is detected then cross compile mode will be used." >&2
1222 elif test "x$build_alias" != "x$host_alias"; then
1223 cross_compiling=yes
1224 fi
1225fi
1226
1227ac_tool_prefix=
1228test -n "$host_alias" && ac_tool_prefix=$host_alias-
1229
1230test "$silent" = yes && exec 6>/dev/null
1231
Guido van Rossum627b2d71993-12-24 10:39:16 +00001232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001233ac_pwd=`pwd` && test -n "$ac_pwd" &&
1234ac_ls_di=`ls -di .` &&
1235ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Matthias Kloseb9621712010-04-24 17:59:49 +00001236 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001237test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Matthias Kloseb9621712010-04-24 17:59:49 +00001238 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001239
1240
Guido van Rossum627b2d71993-12-24 10:39:16 +00001241# Find the source files, if location was not specified.
1242if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001244 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001245 ac_confdir=`$as_dirname -- "$as_myself" ||
1246$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1247 X"$as_myself" : 'X\(//\)[^/]' \| \
1248 X"$as_myself" : 'X\(//\)$' \| \
1249 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1250$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001251 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1252 s//\1/
1253 q
1254 }
1255 /^X\(\/\/\)[^/].*/{
1256 s//\1/
1257 q
1258 }
1259 /^X\(\/\/\)$/{
1260 s//\1/
1261 q
1262 }
1263 /^X\(\/\).*/{
1264 s//\1/
1265 q
1266 }
1267 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001269 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270 srcdir=..
1271 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272else
1273 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001275if test ! -r "$srcdir/$ac_unique_file"; then
1276 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Matthias Kloseb9621712010-04-24 17:59:49 +00001277 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1280ac_abs_confdir=`(
Matthias Kloseb9621712010-04-24 17:59:49 +00001281 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001282 pwd)`
1283# When building in place, set srcdir=.
1284if test "$ac_abs_confdir" = "$ac_pwd"; then
1285 srcdir=.
1286fi
1287# Remove unnecessary trailing slashes from srcdir.
1288# Double slashes in file names in object file debugging info
1289# mess up M-x gdb in Emacs.
1290case $srcdir in
1291*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1292esac
1293for ac_var in $ac_precious_vars; do
1294 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1295 eval ac_env_${ac_var}_value=\$${ac_var}
1296 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1297 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1298done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001299
Martin v. Löwis11437992002-04-12 09:54:03 +00001300#
1301# Report the --help message.
1302#
1303if test "$ac_init_help" = "long"; then
1304 # Omit some internal or obsolete options to make the list less imposing.
1305 # This message is too long to be a string in the A/UX 3.1 sh.
1306 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001307\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001308
1309Usage: $0 [OPTION]... [VAR=VALUE]...
1310
1311To assign environment variables (e.g., CC, CFLAGS...), specify them as
1312VAR=VALUE. See below for descriptions of some of the useful variables.
1313
1314Defaults for the options are specified in brackets.
1315
1316Configuration:
1317 -h, --help display this help and exit
1318 --help=short display options specific to this package
1319 --help=recursive display the short help of all the included packages
1320 -V, --version display version information and exit
1321 -q, --quiet, --silent do not print \`checking...' messages
1322 --cache-file=FILE cache test results in FILE [disabled]
1323 -C, --config-cache alias for \`--cache-file=config.cache'
1324 -n, --no-create do not create output files
1325 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1326
Martin v. Löwis11437992002-04-12 09:54:03 +00001327Installation directories:
1328 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001329 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001330 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001331 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001332
1333By default, \`make install' will install all the files in
1334\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1335an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1336for instance \`--prefix=\$HOME'.
1337
1338For better control, use the options below.
1339
1340Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001341 --bindir=DIR user executables [EPREFIX/bin]
1342 --sbindir=DIR system admin executables [EPREFIX/sbin]
1343 --libexecdir=DIR program executables [EPREFIX/libexec]
1344 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1345 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1346 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1347 --libdir=DIR object code libraries [EPREFIX/lib]
1348 --includedir=DIR C header files [PREFIX/include]
1349 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1350 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1351 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1352 --infodir=DIR info documentation [DATAROOTDIR/info]
1353 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1354 --mandir=DIR man documentation [DATAROOTDIR/man]
1355 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1356 --htmldir=DIR html documentation [DOCDIR]
1357 --dvidir=DIR dvi documentation [DOCDIR]
1358 --pdfdir=DIR pdf documentation [DOCDIR]
1359 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001360_ACEOF
1361
1362 cat <<\_ACEOF
1363_ACEOF
1364fi
1365
1366if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001367 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001368 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001369 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001370 cat <<\_ACEOF
1371
1372Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001373 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001374 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1375 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001376 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001377 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001378 --enable-framework[=INSTALLDIR]
1379 Build (MacOSX|Darwin) framework
1380 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001381 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001382 --enable-ipv6 Enable ipv6 (with ipv4) support
1383 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001384 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001385 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001386
1387Optional Packages:
1388 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1389 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001390 --with-universal-archs=ARCH
1391 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001392 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001393 --with-framework-name=FRAMEWORK
1394 specify an alternate name of the framework built
1395 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001396 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001397 --with-cxx-main=<compiler>
1398 compile main() and link python executable with C++
1399 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001400 --with-suffix=.exe set executable suffix
1401 --with-pydebug build with Py_DEBUG defined
1402 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001403 --with-system-expat build pyexpat module using an installed expat
1404 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001405 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001406 --with-dbmliborder=db1:db2:...
1407 order to check db backends for dbm. Valid value is a
1408 colon separated string with the backend names
1409 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001410 --with-signal-module disable/enable signal module
1411 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1412 --with(out)-threads[=DIRECTORY]
1413 disable/enable thread support
1414 --with(out)-thread[=DIRECTORY]
1415 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001416 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001417 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001419 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with-fpectl enable SIGFPE catching
1422 --with-libm=STRING math library
1423 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001424 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001425 --with(out)-computed-gotos
1426 Use computed gotos in evaluation loop (enabled by
1427 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001428
1429Some influential environment variables:
1430 CC C compiler command
1431 CFLAGS C compiler flags
1432 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1433 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001434 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001436 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001437 CPP C preprocessor
1438
1439Use these variables to override the choices made by `configure' or to help
1440it to find libraries and programs with nonstandard names/locations.
1441
Georg Brandle2e15612009-05-20 18:25:10 +00001442Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001443_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001444ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001445fi
1446
1447if test "$ac_init_help" = "recursive"; then
1448 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001449 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001450 test -d "$ac_dir" ||
1451 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1452 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001453 ac_builddir=.
1454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001455case "$ac_dir" in
1456.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1457*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001458 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001459 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001460 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461 case $ac_top_builddir_sub in
1462 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1463 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1464 esac ;;
1465esac
1466ac_abs_top_builddir=$ac_pwd
1467ac_abs_builddir=$ac_pwd$ac_dir_suffix
1468# for backward compatibility:
1469ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001470
1471case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001472 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001474 ac_top_srcdir=$ac_top_builddir_sub
1475 ac_abs_top_srcdir=$ac_pwd ;;
1476 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001477 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001478 ac_top_srcdir=$srcdir
1479 ac_abs_top_srcdir=$srcdir ;;
1480 *) # Relative name.
1481 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1482 ac_top_srcdir=$ac_top_build_prefix$srcdir
1483 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001484esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001486
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001487 cd "$ac_dir" || { ac_status=$?; continue; }
1488 # Check for guested configure.
1489 if test -f "$ac_srcdir/configure.gnu"; then
1490 echo &&
1491 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1492 elif test -f "$ac_srcdir/configure"; then
1493 echo &&
1494 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001495 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001496 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001497 fi || ac_status=$?
1498 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001499 done
1500fi
1501
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001503if $ac_init_version; then
1504 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001505python configure 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +00001506generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001507
Matthias Kloseb9621712010-04-24 17:59:49 +00001508Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001509This configure script is free software; the Free Software Foundation
1510gives unlimited permission to copy, distribute and modify it.
1511_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001512 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001514
1515## ------------------------ ##
1516## Autoconf initialization. ##
1517## ------------------------ ##
1518
1519# ac_fn_c_try_compile LINENO
1520# --------------------------
1521# Try to compile conftest.$ac_ext, and return whether this succeeded.
1522ac_fn_c_try_compile ()
1523{
1524 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1525 rm -f conftest.$ac_objext
1526 if { { ac_try="$ac_compile"
1527case "(($ac_try" in
1528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1529 *) ac_try_echo=$ac_try;;
1530esac
1531eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1532$as_echo "$ac_try_echo"; } >&5
1533 (eval "$ac_compile") 2>conftest.err
1534 ac_status=$?
1535 if test -s conftest.err; then
1536 grep -v '^ *+' conftest.err >conftest.er1
1537 cat conftest.er1 >&5
1538 mv -f conftest.er1 conftest.err
1539 fi
1540 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1541 test $ac_status = 0; } && {
1542 test -z "$ac_c_werror_flag" ||
1543 test ! -s conftest.err
1544 } && test -s conftest.$ac_objext; then :
1545 ac_retval=0
1546else
1547 $as_echo "$as_me: failed program was:" >&5
1548sed 's/^/| /' conftest.$ac_ext >&5
1549
1550 ac_retval=1
1551fi
1552 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1553 as_fn_set_status $ac_retval
1554
1555} # ac_fn_c_try_compile
1556
1557# ac_fn_c_try_cpp LINENO
1558# ----------------------
1559# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1560ac_fn_c_try_cpp ()
1561{
1562 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1563 if { { ac_try="$ac_cpp conftest.$ac_ext"
1564case "(($ac_try" in
1565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1566 *) ac_try_echo=$ac_try;;
1567esac
1568eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1569$as_echo "$ac_try_echo"; } >&5
1570 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1571 ac_status=$?
1572 if test -s conftest.err; then
1573 grep -v '^ *+' conftest.err >conftest.er1
1574 cat conftest.er1 >&5
1575 mv -f conftest.er1 conftest.err
1576 fi
1577 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1578 test $ac_status = 0; } >/dev/null && {
1579 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1580 test ! -s conftest.err
1581 }; then :
1582 ac_retval=0
1583else
1584 $as_echo "$as_me: failed program was:" >&5
1585sed 's/^/| /' conftest.$ac_ext >&5
1586
1587 ac_retval=1
1588fi
1589 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1590 as_fn_set_status $ac_retval
1591
1592} # ac_fn_c_try_cpp
1593
1594# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1595# -------------------------------------------------------
1596# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1597# the include files in INCLUDES and setting the cache variable VAR
1598# accordingly.
1599ac_fn_c_check_header_mongrel ()
1600{
1601 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1602 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1604$as_echo_n "checking for $2... " >&6; }
1605if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1606 $as_echo_n "(cached) " >&6
1607fi
1608eval ac_res=\$$3
1609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1610$as_echo "$ac_res" >&6; }
1611else
1612 # Is the header compilable?
1613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1614$as_echo_n "checking $2 usability... " >&6; }
1615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1616/* end confdefs.h. */
1617$4
1618#include <$2>
1619_ACEOF
1620if ac_fn_c_try_compile "$LINENO"; then :
1621 ac_header_compiler=yes
1622else
1623 ac_header_compiler=no
1624fi
1625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1627$as_echo "$ac_header_compiler" >&6; }
1628
1629# Is the header present?
1630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1631$as_echo_n "checking $2 presence... " >&6; }
1632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1633/* end confdefs.h. */
1634#include <$2>
1635_ACEOF
1636if ac_fn_c_try_cpp "$LINENO"; then :
1637 ac_header_preproc=yes
1638else
1639 ac_header_preproc=no
1640fi
1641rm -f conftest.err conftest.$ac_ext
1642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1643$as_echo "$ac_header_preproc" >&6; }
1644
1645# So? What about this header?
1646case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1647 yes:no: )
1648 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1649$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1650 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1651$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1652 ;;
1653 no:yes:* )
1654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1655$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1657$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1659$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1661$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1663$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1664( cat <<\_ASBOX
1665## -------------------------------------- ##
1666## Report this to http://bugs.python.org/ ##
1667## -------------------------------------- ##
1668_ASBOX
1669 ) | sed "s/^/$as_me: WARNING: /" >&2
1670 ;;
1671esac
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1673$as_echo_n "checking for $2... " >&6; }
1674if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1675 $as_echo_n "(cached) " >&6
1676else
1677 eval "$3=\$ac_header_compiler"
1678fi
1679eval ac_res=\$$3
1680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1681$as_echo "$ac_res" >&6; }
1682fi
1683 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1684
1685} # ac_fn_c_check_header_mongrel
1686
1687# ac_fn_c_try_run LINENO
1688# ----------------------
1689# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1690# that executables *can* be run.
1691ac_fn_c_try_run ()
1692{
1693 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1694 if { { ac_try="$ac_link"
1695case "(($ac_try" in
1696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1697 *) ac_try_echo=$ac_try;;
1698esac
1699eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1700$as_echo "$ac_try_echo"; } >&5
1701 (eval "$ac_link") 2>&5
1702 ac_status=$?
1703 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1704 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1705 { { case "(($ac_try" in
1706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1707 *) ac_try_echo=$ac_try;;
1708esac
1709eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1710$as_echo "$ac_try_echo"; } >&5
1711 (eval "$ac_try") 2>&5
1712 ac_status=$?
1713 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1714 test $ac_status = 0; }; }; then :
1715 ac_retval=0
1716else
1717 $as_echo "$as_me: program exited with status $ac_status" >&5
1718 $as_echo "$as_me: failed program was:" >&5
1719sed 's/^/| /' conftest.$ac_ext >&5
1720
1721 ac_retval=$ac_status
1722fi
1723 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1724 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1725 as_fn_set_status $ac_retval
1726
1727} # ac_fn_c_try_run
1728
1729# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1730# -------------------------------------------------------
1731# Tests whether HEADER exists and can be compiled using the include files in
1732# INCLUDES, setting the cache variable VAR accordingly.
1733ac_fn_c_check_header_compile ()
1734{
1735 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1737$as_echo_n "checking for $2... " >&6; }
1738if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1739 $as_echo_n "(cached) " >&6
1740else
1741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1742/* end confdefs.h. */
1743$4
1744#include <$2>
1745_ACEOF
1746if ac_fn_c_try_compile "$LINENO"; then :
1747 eval "$3=yes"
1748else
1749 eval "$3=no"
1750fi
1751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1752fi
1753eval ac_res=\$$3
1754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1755$as_echo "$ac_res" >&6; }
1756 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1757
1758} # ac_fn_c_check_header_compile
1759
1760# ac_fn_c_try_link LINENO
1761# -----------------------
1762# Try to link conftest.$ac_ext, and return whether this succeeded.
1763ac_fn_c_try_link ()
1764{
1765 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1766 rm -f conftest.$ac_objext conftest$ac_exeext
1767 if { { ac_try="$ac_link"
1768case "(($ac_try" in
1769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1770 *) ac_try_echo=$ac_try;;
1771esac
1772eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1773$as_echo "$ac_try_echo"; } >&5
1774 (eval "$ac_link") 2>conftest.err
1775 ac_status=$?
1776 if test -s conftest.err; then
1777 grep -v '^ *+' conftest.err >conftest.er1
1778 cat conftest.er1 >&5
1779 mv -f conftest.er1 conftest.err
1780 fi
1781 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1782 test $ac_status = 0; } && {
1783 test -z "$ac_c_werror_flag" ||
1784 test ! -s conftest.err
1785 } && test -s conftest$ac_exeext && {
1786 test "$cross_compiling" = yes ||
1787 $as_test_x conftest$ac_exeext
1788 }; then :
1789 ac_retval=0
1790else
1791 $as_echo "$as_me: failed program was:" >&5
1792sed 's/^/| /' conftest.$ac_ext >&5
1793
1794 ac_retval=1
1795fi
1796 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1797 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1798 # interfere with the next link command; also delete a directory that is
1799 # left behind by Apple's compiler. We do this before executing the actions.
1800 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1801 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1802 as_fn_set_status $ac_retval
1803
1804} # ac_fn_c_try_link
1805
1806# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1807# -------------------------------------------
1808# Tests whether TYPE exists after having included INCLUDES, setting cache
1809# variable VAR accordingly.
1810ac_fn_c_check_type ()
1811{
1812 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1814$as_echo_n "checking for $2... " >&6; }
1815if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1816 $as_echo_n "(cached) " >&6
1817else
1818 eval "$3=no"
1819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1820/* end confdefs.h. */
1821$4
1822int
1823main ()
1824{
1825if (sizeof ($2))
1826 return 0;
1827 ;
1828 return 0;
1829}
1830_ACEOF
1831if ac_fn_c_try_compile "$LINENO"; then :
1832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1833/* end confdefs.h. */
1834$4
1835int
1836main ()
1837{
1838if (sizeof (($2)))
1839 return 0;
1840 ;
1841 return 0;
1842}
1843_ACEOF
1844if ac_fn_c_try_compile "$LINENO"; then :
1845
1846else
1847 eval "$3=yes"
1848fi
1849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1850fi
1851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1852fi
1853eval ac_res=\$$3
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855$as_echo "$ac_res" >&6; }
1856 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1857
1858} # ac_fn_c_check_type
1859
1860# ac_fn_c_find_uintX_t LINENO BITS VAR
1861# ------------------------------------
1862# Finds an unsigned integer type with width BITS, setting cache variable VAR
1863# accordingly.
1864ac_fn_c_find_uintX_t ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1868$as_echo_n "checking for uint$2_t... " >&6; }
1869if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1870 $as_echo_n "(cached) " >&6
1871else
1872 eval "$3=no"
1873 # Order is important - never check a type that is potentially smaller
1874 # than half of the expected target width.
1875 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1876 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1878/* end confdefs.h. */
1879$ac_includes_default
1880int
1881main ()
1882{
1883static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1884test_array [0] = 0
1885
1886 ;
1887 return 0;
1888}
1889_ACEOF
1890if ac_fn_c_try_compile "$LINENO"; then :
1891 case $ac_type in #(
1892 uint$2_t) :
1893 eval "$3=yes" ;; #(
1894 *) :
1895 eval "$3=\$ac_type" ;;
1896esac
1897fi
1898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1899 eval as_val=\$$3
1900 if test "x$as_val" = x""no; then :
1901
1902else
1903 break
1904fi
1905 done
1906fi
1907eval ac_res=\$$3
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1909$as_echo "$ac_res" >&6; }
1910 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1911
1912} # ac_fn_c_find_uintX_t
1913
1914# ac_fn_c_find_intX_t LINENO BITS VAR
1915# -----------------------------------
1916# Finds a signed integer type with width BITS, setting cache variable VAR
1917# accordingly.
1918ac_fn_c_find_intX_t ()
1919{
1920 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1922$as_echo_n "checking for int$2_t... " >&6; }
1923if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1924 $as_echo_n "(cached) " >&6
1925else
1926 eval "$3=no"
1927 # Order is important - never check a type that is potentially smaller
1928 # than half of the expected target width.
1929 for ac_type in int$2_t 'int' 'long int' \
1930 'long long int' 'short int' 'signed char'; do
1931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1932/* end confdefs.h. */
1933$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001934int
1935main ()
1936{
Antoine Pitrou042b1282010-08-13 21:15:58 +00001937static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1938 0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001939test_array [0] = 0
1940
1941 ;
1942 return 0;
1943}
1944_ACEOF
1945if ac_fn_c_try_compile "$LINENO"; then :
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001949int
1950main ()
1951{
Antoine Pitrou042b1282010-08-13 21:15:58 +00001952static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1953 ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001954 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1955test_array [0] = 0
1956
1957 ;
1958 return 0;
1959}
1960_ACEOF
1961if ac_fn_c_try_compile "$LINENO"; then :
1962
1963else
1964 case $ac_type in #(
1965 int$2_t) :
1966 eval "$3=yes" ;; #(
1967 *) :
1968 eval "$3=\$ac_type" ;;
1969esac
1970fi
1971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1972fi
1973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1974 eval as_val=\$$3
1975 if test "x$as_val" = x""no; then :
1976
1977else
1978 break
1979fi
1980 done
1981fi
1982eval ac_res=\$$3
1983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1984$as_echo "$ac_res" >&6; }
1985 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1986
1987} # ac_fn_c_find_intX_t
1988
1989# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1990# --------------------------------------------
1991# Tries to find the compile-time value of EXPR in a program that includes
1992# INCLUDES, setting VAR accordingly. Returns whether the value could be
1993# computed
1994ac_fn_c_compute_int ()
1995{
1996 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1997 if test "$cross_compiling" = yes; then
1998 # Depending upon the size, compute the lo and hi bounds.
1999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2000/* end confdefs.h. */
2001$4
2002int
2003main ()
2004{
2005static int test_array [1 - 2 * !(($2) >= 0)];
2006test_array [0] = 0
2007
2008 ;
2009 return 0;
2010}
2011_ACEOF
2012if ac_fn_c_try_compile "$LINENO"; then :
2013 ac_lo=0 ac_mid=0
2014 while :; do
2015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016/* end confdefs.h. */
2017$4
2018int
2019main ()
2020{
2021static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2022test_array [0] = 0
2023
2024 ;
2025 return 0;
2026}
2027_ACEOF
2028if ac_fn_c_try_compile "$LINENO"; then :
2029 ac_hi=$ac_mid; break
2030else
2031 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2032 if test $ac_lo -le $ac_mid; then
2033 ac_lo= ac_hi=
2034 break
2035 fi
2036 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2037fi
2038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039 done
2040else
2041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042/* end confdefs.h. */
2043$4
2044int
2045main ()
2046{
2047static int test_array [1 - 2 * !(($2) < 0)];
2048test_array [0] = 0
2049
2050 ;
2051 return 0;
2052}
2053_ACEOF
2054if ac_fn_c_try_compile "$LINENO"; then :
2055 ac_hi=-1 ac_mid=-1
2056 while :; do
2057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058/* end confdefs.h. */
2059$4
2060int
2061main ()
2062{
2063static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2064test_array [0] = 0
2065
2066 ;
2067 return 0;
2068}
2069_ACEOF
2070if ac_fn_c_try_compile "$LINENO"; then :
2071 ac_lo=$ac_mid; break
2072else
2073 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2074 if test $ac_mid -le $ac_hi; then
2075 ac_lo= ac_hi=
2076 break
2077 fi
2078 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2079fi
2080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2081 done
2082else
2083 ac_lo= ac_hi=
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088# Binary search between lo and hi bounds.
2089while test "x$ac_lo" != "x$ac_hi"; do
2090 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092/* end confdefs.h. */
2093$4
2094int
2095main ()
2096{
2097static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2098test_array [0] = 0
2099
2100 ;
2101 return 0;
2102}
2103_ACEOF
2104if ac_fn_c_try_compile "$LINENO"; then :
2105 ac_hi=$ac_mid
2106else
2107 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2108fi
2109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2110done
2111case $ac_lo in #((
2112?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2113'') ac_retval=1 ;;
2114esac
2115 else
2116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2117/* end confdefs.h. */
2118$4
2119static long int longval () { return $2; }
2120static unsigned long int ulongval () { return $2; }
2121#include <stdio.h>
2122#include <stdlib.h>
2123int
2124main ()
2125{
2126
2127 FILE *f = fopen ("conftest.val", "w");
2128 if (! f)
2129 return 1;
2130 if (($2) < 0)
2131 {
2132 long int i = longval ();
2133 if (i != ($2))
2134 return 1;
2135 fprintf (f, "%ld", i);
2136 }
2137 else
2138 {
2139 unsigned long int i = ulongval ();
2140 if (i != ($2))
2141 return 1;
2142 fprintf (f, "%lu", i);
2143 }
2144 /* Do not output a trailing newline, as this causes \r\n confusion
2145 on some platforms. */
2146 return ferror (f) || fclose (f) != 0;
2147
2148 ;
2149 return 0;
2150}
2151_ACEOF
2152if ac_fn_c_try_run "$LINENO"; then :
2153 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2154else
2155 ac_retval=1
2156fi
2157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2158 conftest.$ac_objext conftest.beam conftest.$ac_ext
2159rm -f conftest.val
2160
2161 fi
2162 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2163 as_fn_set_status $ac_retval
2164
2165} # ac_fn_c_compute_int
2166
2167# ac_fn_c_check_func LINENO FUNC VAR
2168# ----------------------------------
2169# Tests whether FUNC exists, setting the cache variable VAR accordingly
2170ac_fn_c_check_func ()
2171{
2172 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2174$as_echo_n "checking for $2... " >&6; }
2175if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2176 $as_echo_n "(cached) " >&6
2177else
2178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2179/* end confdefs.h. */
2180/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2181 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2182#define $2 innocuous_$2
2183
2184/* System header to define __stub macros and hopefully few prototypes,
2185 which can conflict with char $2 (); below.
2186 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2187 <limits.h> exists even on freestanding compilers. */
2188
2189#ifdef __STDC__
2190# include <limits.h>
2191#else
2192# include <assert.h>
2193#endif
2194
2195#undef $2
2196
2197/* Override any GCC internal prototype to avoid an error.
2198 Use char because int might match the return type of a GCC
2199 builtin and then its argument prototype would still apply. */
2200#ifdef __cplusplus
2201extern "C"
2202#endif
2203char $2 ();
2204/* The GNU C library defines this for functions which it implements
2205 to always fail with ENOSYS. Some functions are actually named
2206 something starting with __ and the normal name is an alias. */
2207#if defined __stub_$2 || defined __stub___$2
2208choke me
2209#endif
2210
2211int
2212main ()
2213{
2214return $2 ();
2215 ;
2216 return 0;
2217}
2218_ACEOF
2219if ac_fn_c_try_link "$LINENO"; then :
2220 eval "$3=yes"
2221else
2222 eval "$3=no"
2223fi
2224rm -f core conftest.err conftest.$ac_objext \
2225 conftest$ac_exeext conftest.$ac_ext
2226fi
2227eval ac_res=\$$3
2228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2229$as_echo "$ac_res" >&6; }
2230 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2231
2232} # ac_fn_c_check_func
2233
2234# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2235# ----------------------------------------------------
2236# Tries to find if the field MEMBER exists in type AGGR, after including
2237# INCLUDES, setting cache variable VAR accordingly.
2238ac_fn_c_check_member ()
2239{
2240 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2242$as_echo_n "checking for $2.$3... " >&6; }
2243if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2244 $as_echo_n "(cached) " >&6
2245else
2246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247/* end confdefs.h. */
2248$5
2249int
2250main ()
2251{
2252static $2 ac_aggr;
2253if (ac_aggr.$3)
2254return 0;
2255 ;
2256 return 0;
2257}
2258_ACEOF
2259if ac_fn_c_try_compile "$LINENO"; then :
2260 eval "$4=yes"
2261else
2262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2263/* end confdefs.h. */
2264$5
2265int
2266main ()
2267{
2268static $2 ac_aggr;
2269if (sizeof ac_aggr.$3)
2270return 0;
2271 ;
2272 return 0;
2273}
2274_ACEOF
2275if ac_fn_c_try_compile "$LINENO"; then :
2276 eval "$4=yes"
2277else
2278 eval "$4=no"
2279fi
2280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2281fi
2282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2283fi
2284eval ac_res=\$$4
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2286$as_echo "$ac_res" >&6; }
2287 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2288
2289} # ac_fn_c_check_member
2290
2291# ac_fn_c_check_decl LINENO SYMBOL VAR
2292# ------------------------------------
2293# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2294ac_fn_c_check_decl ()
2295{
2296 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2298$as_echo_n "checking whether $2 is declared... " >&6; }
2299if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2300 $as_echo_n "(cached) " >&6
2301else
2302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303/* end confdefs.h. */
2304$4
2305int
2306main ()
2307{
2308#ifndef $2
2309 (void) $2;
2310#endif
2311
2312 ;
2313 return 0;
2314}
2315_ACEOF
2316if ac_fn_c_try_compile "$LINENO"; then :
2317 eval "$3=yes"
2318else
2319 eval "$3=no"
2320fi
2321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2322fi
2323eval ac_res=\$$3
2324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2325$as_echo "$ac_res" >&6; }
2326 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2327
2328} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002329cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002330This file contains any messages produced by compilers while
2331running configure, to aid debugging if configure makes a mistake.
2332
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002333It was created by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +00002334generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002335
2336 $ $0 $@
2337
2338_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002340{
2341cat <<_ASUNAME
2342## --------- ##
2343## Platform. ##
2344## --------- ##
2345
2346hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2347uname -m = `(uname -m) 2>/dev/null || echo unknown`
2348uname -r = `(uname -r) 2>/dev/null || echo unknown`
2349uname -s = `(uname -s) 2>/dev/null || echo unknown`
2350uname -v = `(uname -v) 2>/dev/null || echo unknown`
2351
2352/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2353/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2354
2355/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2356/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2357/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002358/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002359/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2360/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2361/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2362
2363_ASUNAME
2364
2365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2366for as_dir in $PATH
2367do
2368 IFS=$as_save_IFS
2369 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002370 $as_echo "PATH: $as_dir"
2371 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002372IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002373
2374} >&5
2375
2376cat >&5 <<_ACEOF
2377
2378
2379## ----------- ##
2380## Core tests. ##
2381## ----------- ##
2382
2383_ACEOF
2384
2385
2386# Keep a trace of the command line.
2387# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002388# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002389# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002390# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002391ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002392ac_configure_args0=
2393ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002394ac_must_keep_next=false
2395for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002396do
Skip Montanaro6dead952003-09-25 14:50:04 +00002397 for ac_arg
2398 do
2399 case $ac_arg in
2400 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2401 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2402 | -silent | --silent | --silen | --sile | --sil)
2403 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002404 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002405 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 esac
2407 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002408 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002412 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002414 case $ac_arg in
2415 *=* | --config-cache | -C | -disable-* | --disable-* \
2416 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2417 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2418 | -with-* | --with-* | -without-* | --without-* | --x)
2419 case "$ac_configure_args0 " in
2420 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2421 esac
2422 ;;
2423 -* ) ac_must_keep_next=true ;;
2424 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 ;;
2428 esac
2429 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002430done
Matthias Kloseb9621712010-04-24 17:59:49 +00002431{ ac_configure_args0=; unset ac_configure_args0;}
2432{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002433
2434# When interrupted or exit'd, cleanup temporary files, and complete
2435# config.log. We remove comments because anyway the quotes in there
2436# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002437# WARNING: Use '\'' to represent an apostrophe within the trap.
2438# 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 +00002439trap 'exit_status=$?
2440 # Save into config.log some information that might help in debugging.
2441 {
2442 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002443
Martin v. Löwis11437992002-04-12 09:54:03 +00002444 cat <<\_ASBOX
2445## ---------------- ##
2446## Cache variables. ##
2447## ---------------- ##
2448_ASBOX
2449 echo
2450 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002451(
2452 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2453 eval ac_val=\$$ac_var
2454 case $ac_val in #(
2455 *${as_nl}*)
2456 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002457 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2458$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459 esac
2460 case $ac_var in #(
2461 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002462 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2463 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464 esac ;;
2465 esac
2466 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2469 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002470 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 "s/'\''/'\''\\\\'\'''\''/g;
2472 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2473 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002474 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002476 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 esac |
2478 sort
2479)
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002481
2482 cat <<\_ASBOX
2483## ----------------- ##
2484## Output variables. ##
2485## ----------------- ##
2486_ASBOX
2487 echo
2488 for ac_var in $ac_subst_vars
2489 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490 eval ac_val=\$$ac_var
2491 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002492 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002494 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002495 done | sort
2496 echo
2497
2498 if test -n "$ac_subst_files"; then
2499 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500## ------------------- ##
2501## File substitutions. ##
2502## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002503_ASBOX
2504 echo
2505 for ac_var in $ac_subst_files
2506 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 eval ac_val=\$$ac_var
2508 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 done | sort
2513 echo
2514 fi
2515
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 if test -s confdefs.h; then
2517 cat <<\_ASBOX
2518## ----------- ##
2519## confdefs.h. ##
2520## ----------- ##
2521_ASBOX
2522 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 echo
2525 fi
2526 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 $as_echo "$as_me: caught signal $ac_signal"
2528 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 rm -f core *.core core.conftest.* &&
2531 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002534for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002535 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002536done
2537ac_signal=0
2538
2539# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002541
Matthias Kloseb9621712010-04-24 17:59:49 +00002542$as_echo "/* confdefs.h */" > confdefs.h
2543
Martin v. Löwis11437992002-04-12 09:54:03 +00002544# Predefined preprocessor variables.
2545
2546cat >>confdefs.h <<_ACEOF
2547#define PACKAGE_NAME "$PACKAGE_NAME"
2548_ACEOF
2549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_VERSION "$PACKAGE_VERSION"
2556_ACEOF
2557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_STRING "$PACKAGE_STRING"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2564_ACEOF
2565
Matthias Kloseb9621712010-04-24 17:59:49 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_URL "$PACKAGE_URL"
2568_ACEOF
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570
2571# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002572# Prefer an explicitly selected file to automatically selected ones.
2573ac_site_file1=NONE
2574ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575if test -n "$CONFIG_SITE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002576 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 ac_site_file1=$prefix/share/config.site
2579 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580else
Matthias Kloseb9621712010-04-24 17:59:49 +00002581 ac_site_file1=$ac_default_prefix/share/config.site
2582 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002584for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585do
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 test "x$ac_site_file" = xNONE && continue
2587 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2588 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2589$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002591 . "$ac_site_file"
2592 fi
2593done
2594
2595if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 # Some versions of bash will fail to source /dev/null (special files
2597 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2598 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2599 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2600$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2603 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 esac
2605 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002606else
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2608$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 >$cache_file
2610fi
2611
2612# Check that the precious variables saved in the cache have kept the same
2613# value.
2614ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2617 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2619 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 case $ac_old_set,$ac_new_set in
2621 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2623$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 +00002624 ac_cache_corrupted=: ;;
2625 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2627$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 ac_cache_corrupted=: ;;
2629 ,);;
2630 *)
2631 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 # differences in whitespace do not lead to failure.
2633 ac_old_val_w=`echo x $ac_old_val`
2634 ac_new_val_w=`echo x $ac_new_val`
2635 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2636 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2637$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2638 ac_cache_corrupted=:
2639 else
2640 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2641$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2642 eval $ac_var=\$ac_old_val
2643 fi
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2645$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2647$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 fi;;
2649 esac
2650 # Pass precious variables to config.status.
2651 if test "$ac_new_set" = set; then
2652 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 *) ac_arg=$ac_var=$ac_new_val ;;
2655 esac
2656 case " $ac_configure_args " in
2657 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002658 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 esac
2660 fi
2661done
2662if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2666$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2667 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002669## -------------------- ##
2670## Main body of script. ##
2671## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002672
Guido van Rossum7f43da71994-08-01 12:15:30 +00002673ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002675ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2676ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2677ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678
Guido van Rossum627b2d71993-12-24 10:39:16 +00002679
Michael W. Hudson54241132001-12-07 15:38:26 +00002680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002681ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002682
2683
Martin v. Löwis11437992002-04-12 09:54:03 +00002684
Benjamin Petersond23f8222009-04-05 19:13:16 +00002685if test "$prefix" != "/"; then
2686 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2687fi
2688
2689
Martin v. Löwis11437992002-04-12 09:54:03 +00002690
2691
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002692# We don't use PACKAGE_ variables, and they cause conflicts
2693# with other autoconf-based packages that include Python.h
2694grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2695rm confdefs.h
2696mv confdefs.h.new confdefs.h
2697
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002698
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002699VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002700
Martin v. Löwis1142de32002-03-29 16:28:31 +00002701
2702SOVERSION=1.0
2703
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002704# The later defininition of _XOPEN_SOURCE disables certain features
2705# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2706
Matthias Kloseb9621712010-04-24 17:59:49 +00002707$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002708
2709
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002710# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2711# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2712# them.
2713
Matthias Kloseb9621712010-04-24 17:59:49 +00002714$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002715
2716
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002717# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2718# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2719# them.
2720
Matthias Kloseb9621712010-04-24 17:59:49 +00002721$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002722
2723
Martin v. Löwisd6320502004-08-12 13:45:08 +00002724# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2725# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2726
Matthias Kloseb9621712010-04-24 17:59:49 +00002727$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002728
2729
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002730# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2731# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2732# them.
2733
Matthias Kloseb9621712010-04-24 17:59:49 +00002734$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002735
2736
2737
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002738define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002739
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002740# Arguments passed to configure.
2741
2742CONFIG_ARGS="$ac_configure_args"
2743
Matthias Kloseb9621712010-04-24 17:59:49 +00002744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2745$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002746# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002747if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002748 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002749 case $enableval in
2750 yes)
2751 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002752 if test ! -d "${enableval}"
2753 then
2754 enableval=/
2755 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002756 ;;
2757 esac
2758 case $enableval in
2759 no)
2760 UNIVERSALSDK=
2761 enable_universalsdk=
2762 ;;
2763 *)
2764 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002765 if test ! -d "${UNIVERSALSDK}"
2766 then
Matthias Kloseb9621712010-04-24 17:59:49 +00002767 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002768 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002769 ;;
2770 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002771
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002772
Thomas Wouters477c8d52006-05-27 19:21:47 +00002773else
2774
2775 UNIVERSALSDK=
2776 enable_universalsdk=
2777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002778fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002779
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002780if test -n "${UNIVERSALSDK}"
2781then
Matthias Kloseb9621712010-04-24 17:59:49 +00002782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2783$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002784else
Matthias Kloseb9621712010-04-24 17:59:49 +00002785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2786$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002787fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002788
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002789
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002790
2791
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002792UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002793
Matthias Kloseb9621712010-04-24 17:59:49 +00002794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2795$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002796
2797# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002798if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002799 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2801$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002802 UNIVERSAL_ARCHS="$withval"
2803
2804else
2805
Matthias Kloseb9621712010-04-24 17:59:49 +00002806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2807$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002808
2809fi
2810
2811
2812
2813
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002814
2815# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002816if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002817 withval=$with_framework_name;
2818 PYTHONFRAMEWORK=${withval}
2819 PYTHONFRAMEWORKDIR=${withval}.framework
2820 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2821
2822else
2823
2824 PYTHONFRAMEWORK=Python
2825 PYTHONFRAMEWORKDIR=Python.framework
2826 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2827
2828fi
2829
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002830# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002831if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002832 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002833 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002834 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002835 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002836 esac
2837 case $enableval in
2838 no)
2839 PYTHONFRAMEWORK=
2840 PYTHONFRAMEWORKDIR=no-framework
2841 PYTHONFRAMEWORKPREFIX=
2842 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002843 FRAMEWORKINSTALLFIRST=
2844 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002845 FRAMEWORKALTINSTALLFIRST=
2846 FRAMEWORKALTINSTALLLAST=
2847 if test "x${prefix}" = "xNONE"; then
2848 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2849 else
2850 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2851 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002852 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002853 ;;
2854 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002855 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002856 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002857 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002858 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002859 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2860 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002861 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002862
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002863 if test "x${prefix}" = "xNONE" ; then
2864 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002865
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002866 else
2867 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2868 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002869
2870 case "${enableval}" in
2871 /System*)
2872 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2873 if test "${prefix}" = "NONE" ; then
2874 # See below
2875 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2876 fi
2877 ;;
2878
2879 /Library*)
2880 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2881 ;;
2882
2883 */Library/Frameworks)
2884 MDIR="`dirname "${enableval}"`"
2885 MDIR="`dirname "${MDIR}"`"
2886 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2887
2888 if test "${prefix}" = "NONE"; then
2889 # User hasn't specified the
2890 # --prefix option, but wants to install
2891 # the framework in a non-default location,
2892 # ensure that the compatibility links get
2893 # installed relative to that prefix as well
2894 # instead of in /usr/local.
2895 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2896 fi
2897 ;;
2898
2899 *)
2900 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2901 ;;
2902 esac
2903
Jack Jansen127e56e2001-09-11 14:41:54 +00002904 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002905
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002906 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002907 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002908 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002911
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002912 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2913
2914 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2915
Jack Jansene578a632001-08-15 01:27:14 +00002916 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002917
Guido van Rossum563e7081996-09-10 18:20:48 +00002918else
Martin v. Löwis11437992002-04-12 09:54:03 +00002919
Jack Jansene578a632001-08-15 01:27:14 +00002920 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002921 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002922 PYTHONFRAMEWORKPREFIX=
2923 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002924 FRAMEWORKINSTALLFIRST=
2925 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002926 FRAMEWORKALTINSTALLFIRST=
2927 FRAMEWORKALTINSTALLLAST=
2928 if test "x${prefix}" = "xNONE" ; then
2929 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2930 else
2931 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2932 fi
Jack Jansene578a632001-08-15 01:27:14 +00002933 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002934
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002936fi
2937
Thomas Wouters477c8d52006-05-27 19:21:47 +00002938
2939
Michael W. Hudson54241132001-12-07 15:38:26 +00002940
2941
2942
2943
Jack Jansene578a632001-08-15 01:27:14 +00002944
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002945
2946
2947
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002948
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002949
Jack Jansene578a632001-08-15 01:27:14 +00002950##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002951## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002952## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002953##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002954# Set name for machine-dependent library files
2955
Matthias Kloseb9621712010-04-24 17:59:49 +00002956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2957$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002958if test -z "$MACHDEP"
2959then
Guido van Rossum563e7081996-09-10 18:20:48 +00002960 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002961 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002962 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002963 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002964 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002965 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002966 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002967 ac_md_system=`echo $ac_sys_system |
2968 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2969 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002970 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002971 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002972
Guido van Rossum07397971997-04-29 21:49:50 +00002973 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002974 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002975 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002976 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002977 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002978 esac
2979fi
Guido van Rossum91922671997-10-09 20:24:13 +00002980
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002981# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2982# disable features if it is defined, without any means to access these
2983# features as extensions. For these systems, we skip the definition of
2984# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2985# some feature, make sure there is no alternative way to access this
2986# feature. Also, when using wildcards, make sure you have verified the
2987# need for not defining _XOPEN_SOURCE on all systems matching the
2988# wildcard, and that the wildcard does not include future systems
2989# (which may remove their limitations).
2990case $ac_sys_system/$ac_sys_release in
2991 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2992 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002993 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002994 # In addition, Stefan Krah confirms that issue #1244610 exists through
2995 # OpenBSD 4.6, but is fixed in 4.7.
2996 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002997 define_xopen_source=no
2998 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2999 # also defined. This can be overridden by defining _BSD_SOURCE
3000 # As this has a different meaning on Linux, only define it on OpenBSD
3001
Matthias Kloseb9621712010-04-24 17:59:49 +00003002$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003003
3004 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003005 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003006 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3007 # also defined. This can be overridden by defining _BSD_SOURCE
3008 # As this has a different meaning on Linux, only define it on OpenBSD
3009
Matthias Kloseb9621712010-04-24 17:59:49 +00003010$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003011
3012 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003013 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3014 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3015 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003016 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 +00003017 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003018 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3019 # request to enable features supported by the standard as a request
3020 # to disable features not supported by the standard. The best way
3021 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3022 # entirely and define __EXTENSIONS__ instead.
3023 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003024 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003025 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3026 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003027 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003028 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003029 define_xopen_source=no;;
3030 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003031 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003032 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003033 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003034 # On FreeBSD 4, the math functions C89 does not cover are never defined
3035 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3036 FreeBSD/4.*)
3037 define_xopen_source=no;;
3038 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3039 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3040 # identifies itself as Darwin/7.*
3041 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3042 # disables platform specific features beyond repair.
3043 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3044 # has no effect, don't bother defining them
3045 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003046 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003047 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003048 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003049 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3050 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3051 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003052 AIX/4)
3053 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003054 AIX/5)
3055 if test `uname -r` -eq 1; then
3056 define_xopen_source=no
3057 fi
3058 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003059 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3060 # defining NI_NUMERICHOST.
3061 QNX/6.3.2)
3062 define_xopen_source=no
3063 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003064
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003065esac
3066
3067if test $define_xopen_source = yes
3068then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003069
Matthias Kloseb9621712010-04-24 17:59:49 +00003070$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003071
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003072
3073 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3074 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3075 # several APIs are not declared. Since this is also needed in some
3076 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003077
Matthias Kloseb9621712010-04-24 17:59:49 +00003078$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003079
3080
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003081
Matthias Kloseb9621712010-04-24 17:59:49 +00003082$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003083
3084
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003085fi
3086
Guido van Rossum91922671997-10-09 20:24:13 +00003087#
3088# SGI compilers allow the specification of the both the ABI and the
3089# ISA on the command line. Depending on the values of these switches,
3090# different and often incompatable code will be generated.
3091#
3092# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3093# thus supply support for various ABI/ISA combinations. The MACHDEP
3094# variable is also adjusted.
3095#
3096
3097if test ! -z "$SGI_ABI"
3098then
3099 CC="cc $SGI_ABI"
3100 LDFLAGS="$SGI_ABI $LDFLAGS"
3101 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3104$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003105
Jack Jansen6b08a402004-06-03 12:41:45 +00003106# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3107# it may influence the way we can build extensions, so distutils
3108# needs to check it
3109
Thomas Wouters477c8d52006-05-27 19:21:47 +00003110
Jack Jansen6b08a402004-06-03 12:41:45 +00003111CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003112EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003113
Matthias Kloseb9621712010-04-24 17:59:49 +00003114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3115$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003116ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3118$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003119
Guido van Rossum627b2d71993-12-24 10:39:16 +00003120# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003121
3122# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3123# for debug/optimization stuff. BASECFLAGS is for flags that are required
3124# just to get things to compile and link. Users are free to override OPT
3125# when running configure or make. The build should not break if they do.
3126# BASECFLAGS should generally not be messed with, however.
3127
3128# XXX shouldn't some/most/all of this code be merged with the stuff later
3129# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3131$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003133# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003134if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003135 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003136 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003137 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003138 without_gcc=yes;;
3139 yes) CC=gcc
3140 without_gcc=no;;
3141 *) CC=$withval
3142 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003143 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003144else
Martin v. Löwis11437992002-04-12 09:54:03 +00003145
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003146 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003147 AIX*) CC=cc_r
3148 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003149 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003150 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003151fi
3152
Matthias Kloseb9621712010-04-24 17:59:49 +00003153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3154$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003155
Guido van Rossum8b131c51995-03-09 14:10:13 +00003156# If the user switches compilers, we can't believe the cache
3157if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3158then
Matthias Kloseb9621712010-04-24 17:59:49 +00003159 as_fn_error "cached CC is different -- throw away $cache_file
3160(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003161fi
3162
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003163# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3164# when the compiler supports them, but we don't always want -O2, and
3165# we set -g later.
3166if test -z "$CFLAGS"; then
3167 CFLAGS=
3168fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003169ac_ext=c
3170ac_cpp='$CPP $CPPFLAGS'
3171ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3172ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3173ac_compiler_gnu=$ac_cv_c_compiler_gnu
3174if test -n "$ac_tool_prefix"; then
3175 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3176set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3178$as_echo_n "checking for $ac_word... " >&6; }
3179if test "${ac_cv_prog_CC+set}" = set; then :
3180 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003181else
3182 if test -n "$CC"; then
3183 ac_cv_prog_CC="$CC" # Let the user override the test.
3184else
Martin v. Löwis11437992002-04-12 09:54:03 +00003185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3186for as_dir in $PATH
3187do
3188 IFS=$as_save_IFS
3189 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003190 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003191 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 +00003192 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003193 $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 +00003194 break 2
3195 fi
3196done
Matthias Kloseb9621712010-04-24 17:59:49 +00003197 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003199
Jack Jansendd19cf82001-12-06 22:36:17 +00003200fi
3201fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003202CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003203if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3205$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003206else
Matthias Kloseb9621712010-04-24 17:59:49 +00003207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3208$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003209fi
3210
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003211
Martin v. Löwis11437992002-04-12 09:54:03 +00003212fi
3213if test -z "$ac_cv_prog_CC"; then
3214 ac_ct_CC=$CC
3215 # Extract the first word of "gcc", so it can be a program name with args.
3216set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3218$as_echo_n "checking for $ac_word... " >&6; }
3219if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3220 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003221else
3222 if test -n "$ac_ct_CC"; then
3223 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3224else
3225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3226for as_dir in $PATH
3227do
3228 IFS=$as_save_IFS
3229 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003230 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231 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 +00003232 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003233 $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 +00003234 break 2
3235 fi
3236done
Matthias Kloseb9621712010-04-24 17:59:49 +00003237 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003238IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003239
3240fi
3241fi
3242ac_ct_CC=$ac_cv_prog_ac_ct_CC
3243if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3245$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003246else
Matthias Kloseb9621712010-04-24 17:59:49 +00003247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3248$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003249fi
3250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003251 if test "x$ac_ct_CC" = x; then
3252 CC=""
3253 else
3254 case $cross_compiling:$ac_tool_warned in
3255yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003256{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3257$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003258ac_tool_warned=yes ;;
3259esac
3260 CC=$ac_ct_CC
3261 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003262else
3263 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003264fi
3265
Jack Jansendd19cf82001-12-06 22:36:17 +00003266if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003267 if test -n "$ac_tool_prefix"; then
3268 # 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 +00003269set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3271$as_echo_n "checking for $ac_word... " >&6; }
3272if test "${ac_cv_prog_CC+set}" = set; then :
3273 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003274else
3275 if test -n "$CC"; then
3276 ac_cv_prog_CC="$CC" # Let the user override the test.
3277else
Martin v. Löwis11437992002-04-12 09:54:03 +00003278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3279for as_dir in $PATH
3280do
3281 IFS=$as_save_IFS
3282 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003283 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003284 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 +00003285 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003286 $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 +00003287 break 2
3288 fi
3289done
Matthias Kloseb9621712010-04-24 17:59:49 +00003290 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003291IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003292
3293fi
3294fi
3295CC=$ac_cv_prog_CC
3296if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3298$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003299else
Matthias Kloseb9621712010-04-24 17:59:49 +00003300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3301$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003302fi
3303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003304
Martin v. Löwis11437992002-04-12 09:54:03 +00003305 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003306fi
3307if test -z "$CC"; then
3308 # Extract the first word of "cc", so it can be a program name with args.
3309set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3311$as_echo_n "checking for $ac_word... " >&6; }
3312if test "${ac_cv_prog_CC+set}" = set; then :
3313 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003314else
3315 if test -n "$CC"; then
3316 ac_cv_prog_CC="$CC" # Let the user override the test.
3317else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003318 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3320for as_dir in $PATH
3321do
3322 IFS=$as_save_IFS
3323 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003324 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003325 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 +00003326 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3327 ac_prog_rejected=yes
3328 continue
3329 fi
3330 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003331 $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 +00003332 break 2
3333 fi
3334done
Matthias Kloseb9621712010-04-24 17:59:49 +00003335 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003336IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003337
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003338if test $ac_prog_rejected = yes; then
3339 # We found a bogon in the path, so make sure we never use it.
3340 set dummy $ac_cv_prog_CC
3341 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003342 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003343 # We chose a different compiler from the bogus one.
3344 # However, it has the same basename, so the bogon will be chosen
3345 # first if we set CC to just the basename; use the full file name.
3346 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003347 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003348 fi
3349fi
3350fi
3351fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003352CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003353if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3355$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003356else
Matthias Kloseb9621712010-04-24 17:59:49 +00003357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3358$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003359fi
3360
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003361
Martin v. Löwis11437992002-04-12 09:54:03 +00003362fi
3363if test -z "$CC"; then
3364 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003365 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 do
3367 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3368set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3370$as_echo_n "checking for $ac_word... " >&6; }
3371if test "${ac_cv_prog_CC+set}" = set; then :
3372 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003373else
3374 if test -n "$CC"; then
3375 ac_cv_prog_CC="$CC" # Let the user override the test.
3376else
Martin v. Löwis11437992002-04-12 09:54:03 +00003377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3378for as_dir in $PATH
3379do
3380 IFS=$as_save_IFS
3381 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003382 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003383 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 +00003384 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003385 $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 +00003386 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003387 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003388done
Matthias Kloseb9621712010-04-24 17:59:49 +00003389 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003390IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003391
3392fi
3393fi
3394CC=$ac_cv_prog_CC
3395if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3397$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003398else
Matthias Kloseb9621712010-04-24 17:59:49 +00003399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3400$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003401fi
3402
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003403
Martin v. Löwis11437992002-04-12 09:54:03 +00003404 test -n "$CC" && break
3405 done
3406fi
3407if test -z "$CC"; then
3408 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003409 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003410do
3411 # Extract the first word of "$ac_prog", so it can be a program name with args.
3412set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3414$as_echo_n "checking for $ac_word... " >&6; }
3415if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3416 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003417else
3418 if test -n "$ac_ct_CC"; then
3419 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3420else
3421as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3422for as_dir in $PATH
3423do
3424 IFS=$as_save_IFS
3425 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003426 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003427 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 +00003428 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003429 $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 +00003430 break 2
3431 fi
3432done
Matthias Kloseb9621712010-04-24 17:59:49 +00003433 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003434IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003435
Martin v. Löwis11437992002-04-12 09:54:03 +00003436fi
3437fi
3438ac_ct_CC=$ac_cv_prog_ac_ct_CC
3439if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3441$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003442else
Matthias Kloseb9621712010-04-24 17:59:49 +00003443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3444$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003445fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447
Martin v. Löwis11437992002-04-12 09:54:03 +00003448 test -n "$ac_ct_CC" && break
3449done
Michael W. Hudson54241132001-12-07 15:38:26 +00003450
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003451 if test "x$ac_ct_CC" = x; then
3452 CC=""
3453 else
3454 case $cross_compiling:$ac_tool_warned in
3455yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003456{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3457$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458ac_tool_warned=yes ;;
3459esac
3460 CC=$ac_ct_CC
3461 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003462fi
3463
3464fi
3465
3466
Matthias Kloseb9621712010-04-24 17:59:49 +00003467test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3468$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3469as_fn_error "no acceptable C compiler found in \$PATH
3470See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003471
3472# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003473$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3474set X $ac_compile
3475ac_compiler=$2
3476for ac_option in --version -v -V -qversion; do
3477 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478case "(($ac_try" in
3479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3480 *) ac_try_echo=$ac_try;;
3481esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003482eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3483$as_echo "$ac_try_echo"; } >&5
3484 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003486 if test -s conftest.err; then
3487 sed '10a\
3488... rest of stderr output deleted ...
3489 10q' conftest.err >conftest.er1
3490 cat conftest.er1 >&5
3491 fi
3492 rm -f conftest.er1 conftest.err
3493 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3494 test $ac_status = 0; }
3495done
Martin v. Löwis11437992002-04-12 09:54:03 +00003496
Matthias Kloseb9621712010-04-24 17:59:49 +00003497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003498/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003499
Martin v. Löwis11437992002-04-12 09:54:03 +00003500int
3501main ()
3502{
3503
3504 ;
3505 return 0;
3506}
3507_ACEOF
3508ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003509ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003510# Try to create an executable without -o first, disregard a.out.
3511# It will help us diagnose broken compilers, and finding out an intuition
3512# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3514$as_echo_n "checking whether the C compiler works... " >&6; }
3515ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3516
3517# The possible output files:
3518ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003520ac_rmfiles=
3521for ac_file in $ac_files
3522do
3523 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003524 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3526 esac
3527done
3528rm -f $ac_rmfiles
3529
Matthias Kloseb9621712010-04-24 17:59:49 +00003530if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531case "(($ac_try" in
3532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3533 *) ac_try_echo=$ac_try;;
3534esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003535eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3536$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003537 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003539 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3540 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003541 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3542# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3543# in a Makefile. We should not override ac_cv_exeext if it was cached,
3544# so that the user can short-circuit this test for compilers unknown to
3545# Autoconf.
3546for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003547do
3548 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003549 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003550 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003551 ;;
3552 [ab].out )
3553 # We found the default executable, but exeext='' is most
3554 # certainly right.
3555 break;;
3556 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558 then :; else
3559 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3560 fi
3561 # We set ac_cv_exeext here because the later test for it is not
3562 # safe: cross compilers may not add the suffix if given an `-o'
3563 # argument, so we may need to know it at that point already.
3564 # Even if this section looks crufty: it has the advantage of
3565 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003566 break;;
3567 * )
3568 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 esac
3570done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003571test "$ac_cv_exeext" = no && ac_cv_exeext=
3572
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003573else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574 ac_file=''
3575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003576if test -z "$ac_file"; then :
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3578$as_echo "no" >&6; }
3579$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003580sed 's/^/| /' conftest.$ac_ext >&5
3581
Matthias Kloseb9621712010-04-24 17:59:49 +00003582{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3584{ as_fn_set_status 77
3585as_fn_error "C compiler cannot create executables
3586See \`config.log' for more details." "$LINENO" 5; }; }
3587else
3588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3589$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3592$as_echo_n "checking for C compiler default output file name... " >&6; }
3593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3594$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003595ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003596
Matthias Kloseb9621712010-04-24 17:59:49 +00003597rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003598ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3600$as_echo_n "checking for suffix of executables... " >&6; }
3601if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003602case "(($ac_try" in
3603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3604 *) ac_try_echo=$ac_try;;
3605esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003606eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3607$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003608 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3611 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003612 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3613# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3614# work properly (i.e., refer to `conftest.exe'), while it won't with
3615# `rm'.
3616for ac_file in conftest.exe conftest conftest.*; do
3617 test -f "$ac_file" || continue
3618 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003619 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003620 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3621 break;;
3622 * ) break;;
3623 esac
3624done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003625else
Matthias Kloseb9621712010-04-24 17:59:49 +00003626 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3627$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3628as_fn_error "cannot compute suffix of executables: cannot compile and link
3629See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003631rm -f conftest conftest$ac_cv_exeext
3632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3633$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003634
3635rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003636EXEEXT=$ac_cv_exeext
3637ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3639/* end confdefs.h. */
3640#include <stdio.h>
3641int
3642main ()
3643{
3644FILE *f = fopen ("conftest.out", "w");
3645 return ferror (f) || fclose (f) != 0;
3646
3647 ;
3648 return 0;
3649}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003651ac_clean_files="$ac_clean_files conftest.out"
3652# Check that the compiler produces executables we can run. If not, either
3653# the compiler is broken, or we cross compile.
3654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3655$as_echo_n "checking whether we are cross compiling... " >&6; }
3656if test "$cross_compiling" != yes; then
3657 { { ac_try="$ac_link"
3658case "(($ac_try" in
3659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3660 *) ac_try_echo=$ac_try;;
3661esac
3662eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3663$as_echo "$ac_try_echo"; } >&5
3664 (eval "$ac_link") 2>&5
3665 ac_status=$?
3666 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3667 test $ac_status = 0; }
3668 if { ac_try='./conftest$ac_cv_exeext'
3669 { { case "(($ac_try" in
3670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3671 *) ac_try_echo=$ac_try;;
3672esac
3673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3674$as_echo "$ac_try_echo"; } >&5
3675 (eval "$ac_try") 2>&5
3676 ac_status=$?
3677 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3678 test $ac_status = 0; }; }; then
3679 cross_compiling=no
3680 else
3681 if test "$cross_compiling" = maybe; then
3682 cross_compiling=yes
3683 else
3684 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3686as_fn_error "cannot run C compiled programs.
3687If you meant to cross compile, use \`--host'.
3688See \`config.log' for more details." "$LINENO" 5; }
3689 fi
3690 fi
3691fi
3692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3693$as_echo "$cross_compiling" >&6; }
3694
3695rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3696ac_clean_files=$ac_clean_files_save
3697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3698$as_echo_n "checking for suffix of object files... " >&6; }
3699if test "${ac_cv_objext+set}" = set; then :
3700 $as_echo_n "(cached) " >&6
3701else
3702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003703/* end confdefs.h. */
3704
3705int
3706main ()
3707{
3708
3709 ;
3710 return 0;
3711}
3712_ACEOF
3713rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003714if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003715case "(($ac_try" in
3716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3717 *) ac_try_echo=$ac_try;;
3718esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003719eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3720$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003722 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3724 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725 for ac_file in conftest.o conftest.obj conftest.*; do
3726 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3730 break;;
3731 esac
3732done
3733else
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003735sed 's/^/| /' conftest.$ac_ext >&5
3736
Matthias Kloseb9621712010-04-24 17:59:49 +00003737{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3738$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3739as_fn_error "cannot compute suffix of object files: cannot compile
3740See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003741fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003742rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3745$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003746OBJEXT=$ac_cv_objext
3747ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3749$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3750if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3751 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003752else
Matthias Kloseb9621712010-04-24 17:59:49 +00003753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003755
Martin v. Löwis11437992002-04-12 09:54:03 +00003756int
3757main ()
3758{
3759#ifndef __GNUC__
3760 choke me
3761#endif
3762
3763 ;
3764 return 0;
3765}
3766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003767if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003768 ac_compiler_gnu=yes
3769else
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003773ac_cv_c_compiler_gnu=$ac_compiler_gnu
3774
3775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3777$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3778if test $ac_compiler_gnu = yes; then
3779 GCC=yes
3780else
3781 GCC=
3782fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003783ac_test_CFLAGS=${CFLAGS+set}
3784ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3786$as_echo_n "checking whether $CC accepts -g... " >&6; }
3787if test "${ac_cv_prog_cc_g+set}" = set; then :
3788 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003789else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790 ac_save_c_werror_flag=$ac_c_werror_flag
3791 ac_c_werror_flag=yes
3792 ac_cv_prog_cc_g=no
3793 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003796
Martin v. Löwis11437992002-04-12 09:54:03 +00003797int
3798main ()
3799{
3800
3801 ;
3802 return 0;
3803}
3804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003805if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003806 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003807else
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 CFLAGS=""
3809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810/* end confdefs.h. */
3811
3812int
3813main ()
3814{
3815
3816 ;
3817 return 0;
3818}
3819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003820if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821
Matthias Kloseb9621712010-04-24 17:59:49 +00003822else
3823 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826/* end confdefs.h. */
3827
3828int
3829main ()
3830{
3831
3832 ;
3833 return 0;
3834}
3835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003836if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3844 ac_c_werror_flag=$ac_save_c_werror_flag
3845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3847$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003848if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003850elif test $ac_cv_prog_cc_g = yes; then
3851 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003852 CFLAGS="-g -O2"
3853 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003854 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003855 fi
3856else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003857 if test "$GCC" = yes; then
3858 CFLAGS="-O2"
3859 else
3860 CFLAGS=
3861 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3864$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3865if test "${ac_cv_prog_cc_c89+set}" = set; then :
3866 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003867else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003869ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003871/* end confdefs.h. */
3872#include <stdarg.h>
3873#include <stdio.h>
3874#include <sys/types.h>
3875#include <sys/stat.h>
3876/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3877struct buf { int x; };
3878FILE * (*rcsopen) (struct buf *, struct stat *, int);
3879static char *e (p, i)
3880 char **p;
3881 int i;
3882{
3883 return p[i];
3884}
3885static char *f (char * (*g) (char **, int), char **p, ...)
3886{
3887 char *s;
3888 va_list v;
3889 va_start (v,p);
3890 s = g (p, va_arg (v,int));
3891 va_end (v);
3892 return s;
3893}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003894
3895/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3896 function prototypes and stuff, but not '\xHH' hex character constants.
3897 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003898 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003899 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3900 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003902int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3905 inside strings and character constants. */
3906#define FOO(x) 'x'
3907int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3908
Skip Montanaro6dead952003-09-25 14:50:04 +00003909int test (int i, double x);
3910struct s1 {int (*f) (int a);};
3911struct s2 {int (*f) (double a);};
3912int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3913int argc;
3914char **argv;
3915int
3916main ()
3917{
3918return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3919 ;
3920 return 0;
3921}
3922_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3924 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003925do
3926 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930rm -f core conftest.err conftest.$ac_objext
3931 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003932done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003934CC=$ac_save_CC
3935
3936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003937# AC_CACHE_VAL
3938case "x$ac_cv_prog_cc_c89" in
3939 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3941$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3944$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003945 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3948$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003949esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003950if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003951
Matthias Kloseb9621712010-04-24 17:59:49 +00003952fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003953
Martin v. Löwis11437992002-04-12 09:54:03 +00003954ac_ext=c
3955ac_cpp='$CPP $CPPFLAGS'
3956ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3957ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3958ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003959
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003960
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003961
3962
Matthias Kloseb9621712010-04-24 17:59:49 +00003963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3964$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003965
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003967if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003969
3970 case $withval in
3971 no) with_cxx_main=no
3972 MAINCC='$(CC)';;
3973 yes) with_cxx_main=yes
3974 MAINCC='$(CXX)';;
3975 *) with_cxx_main=yes
3976 MAINCC=$withval
3977 if test -z "$CXX"
3978 then
3979 CXX=$withval
3980 fi;;
3981 esac
3982else
3983
3984 with_cxx_main=no
3985 MAINCC='$(CC)'
3986
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987fi
3988
Matthias Kloseb9621712010-04-24 17:59:49 +00003989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3990$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003991
3992preset_cxx="$CXX"
3993if test -z "$CXX"
3994then
3995 case "$CC" in
3996 gcc) # Extract the first word of "g++", so it can be a program name with args.
3997set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3999$as_echo_n "checking for $ac_word... " >&6; }
4000if test "${ac_cv_path_CXX+set}" = set; then :
4001 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004002else
4003 case $CXX in
4004 [\\/]* | ?:[\\/]*)
4005 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4006 ;;
4007 *)
4008 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4009for as_dir in notfound
4010do
4011 IFS=$as_save_IFS
4012 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004013 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004014 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 +00004015 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004017 break 2
4018 fi
4019done
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004022
4023 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4024 ;;
4025esac
4026fi
4027CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004028if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4030$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004031else
Matthias Kloseb9621712010-04-24 17:59:49 +00004032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4033$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004035
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004036 ;;
4037 cc) # Extract the first word of "c++", so it can be a program name with args.
4038set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4040$as_echo_n "checking for $ac_word... " >&6; }
4041if test "${ac_cv_path_CXX+set}" = set; then :
4042 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004043else
4044 case $CXX in
4045 [\\/]* | ?:[\\/]*)
4046 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4047 ;;
4048 *)
4049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4050for as_dir in notfound
4051do
4052 IFS=$as_save_IFS
4053 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004054 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004055 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 +00004056 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004057 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004058 break 2
4059 fi
4060done
Matthias Kloseb9621712010-04-24 17:59:49 +00004061 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004062IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004063
4064 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4065 ;;
4066esac
4067fi
4068CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004069if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4071$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004072else
Matthias Kloseb9621712010-04-24 17:59:49 +00004073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4074$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004076
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004077 ;;
4078 esac
4079 if test "$CXX" = "notfound"
4080 then
4081 CXX=""
4082 fi
4083fi
4084if test -z "$CXX"
4085then
4086 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4087do
4088 # Extract the first word of "$ac_prog", so it can be a program name with args.
4089set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4091$as_echo_n "checking for $ac_word... " >&6; }
4092if test "${ac_cv_prog_CXX+set}" = set; then :
4093 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004094else
4095 if test -n "$CXX"; then
4096 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4097else
4098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4099for as_dir in $PATH
4100do
4101 IFS=$as_save_IFS
4102 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004104 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 +00004105 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004107 break 2
4108 fi
4109done
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004111IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004112
4113fi
4114fi
4115CXX=$ac_cv_prog_CXX
4116if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4118$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004119else
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4121$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004122fi
4123
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004124
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004125 test -n "$CXX" && break
4126done
4127test -n "$CXX" || CXX="notfound"
4128
4129 if test "$CXX" = "notfound"
4130 then
4131 CXX=""
4132 fi
4133fi
4134if test "$preset_cxx" != "$CXX"
4135then
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004137
4138 By default, distutils will build C++ extension modules with \"$CXX\".
4139 If this is not intended, then set CXX on the configure command line.
4140 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004141$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004142
4143 By default, distutils will build C++ extension modules with \"$CXX\".
4144 If this is not intended, then set CXX on the configure command line.
4145 " >&2;}
4146fi
4147
4148
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004149# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004150
4151ac_ext=c
4152ac_cpp='$CPP $CPPFLAGS'
4153ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4154ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4155ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4157$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004158# On Suns, sometimes $CPP names a directory.
4159if test -n "$CPP" && test -d "$CPP"; then
4160 CPP=
4161fi
4162if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 if test "${ac_cv_prog_CPP+set}" = set; then :
4164 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004165else
Martin v. Löwis11437992002-04-12 09:54:03 +00004166 # Double quotes because CPP needs to be expanded
4167 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4168 do
4169 ac_preproc_ok=false
4170for ac_c_preproc_warn_flag in '' yes
4171do
4172 # Use a header file that comes with gcc, so configuring glibc
4173 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004174 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4175 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004176 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004177 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004179/* end confdefs.h. */
4180#ifdef __STDC__
4181# include <limits.h>
4182#else
4183# include <assert.h>
4184#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004185 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004187if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004188
Matthias Kloseb9621712010-04-24 17:59:49 +00004189else
Martin v. Löwis11437992002-04-12 09:54:03 +00004190 # Broken: fails on valid input.
4191continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004192fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004193rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004196 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004198/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004199#include <ac_nonexistent.h>
4200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004201if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004202 # Broken: success on invalid input.
4203continue
4204else
Martin v. Löwis11437992002-04-12 09:54:03 +00004205 # Passes both tests.
4206ac_preproc_ok=:
4207break
4208fi
4209rm -f conftest.err conftest.$ac_ext
4210
4211done
4212# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4213rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004214if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004215 break
4216fi
4217
4218 done
4219 ac_cv_prog_CPP=$CPP
4220
4221fi
4222 CPP=$ac_cv_prog_CPP
4223else
4224 ac_cv_prog_CPP=$CPP
4225fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4227$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004228ac_preproc_ok=false
4229for ac_c_preproc_warn_flag in '' yes
4230do
4231 # Use a header file that comes with gcc, so configuring glibc
4232 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004233 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4234 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004235 # On the NeXT, cc -E runs the code through the compiler's parser,
4236 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004238/* end confdefs.h. */
4239#ifdef __STDC__
4240# include <limits.h>
4241#else
4242# include <assert.h>
4243#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004244 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004246if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004247
Matthias Kloseb9621712010-04-24 17:59:49 +00004248else
Martin v. Löwis11437992002-04-12 09:54:03 +00004249 # Broken: fails on valid input.
4250continue
4251fi
4252rm -f conftest.err conftest.$ac_ext
4253
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004255 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004258#include <ac_nonexistent.h>
4259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004260if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 # Broken: success on invalid input.
4262continue
4263else
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 # Passes both tests.
4265ac_preproc_ok=:
4266break
4267fi
4268rm -f conftest.err conftest.$ac_ext
4269
4270done
4271# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4272rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004273if $ac_preproc_ok; then :
4274
Martin v. Löwis11437992002-04-12 09:54:03 +00004275else
Matthias Kloseb9621712010-04-24 17:59:49 +00004276 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4277$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4278as_fn_error "C preprocessor \"$CPP\" fails sanity check
4279See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004280fi
4281
4282ac_ext=c
4283ac_cpp='$CPP $CPPFLAGS'
4284ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4285ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4286ac_compiler_gnu=$ac_cv_c_compiler_gnu
4287
4288
Matthias Kloseb9621712010-04-24 17:59:49 +00004289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4290$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4291if test "${ac_cv_path_GREP+set}" = set; then :
4292 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004293else
Matthias Kloseb9621712010-04-24 17:59:49 +00004294 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004296 # Loop through the user's path and test for each of PROGNAME-LIST
4297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4299do
4300 IFS=$as_save_IFS
4301 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004302 for ac_prog in grep ggrep; do
4303 for ac_exec_ext in '' $ac_executable_extensions; do
4304 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4305 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4306# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307 # Check for GNU $ac_path_GREP
4308case `"$ac_path_GREP" --version 2>&1` in
4309*GNU*)
4310 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4311*)
4312 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004313 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314 while :
4315 do
4316 cat "conftest.in" "conftest.in" >"conftest.tmp"
4317 mv "conftest.tmp" "conftest.in"
4318 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004319 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4321 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004322 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4324 # Best one so far, save it but keep looking for a better one
4325 ac_cv_path_GREP="$ac_path_GREP"
4326 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004327 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328 # 10*(2^10) chars as input seems more than enough
4329 test $ac_count -gt 10 && break
4330 done
4331 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4332esac
4333
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 $ac_path_GREP_found && break 3
4335 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004337 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 if test -z "$ac_cv_path_GREP"; then
4340 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4341 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342else
4343 ac_cv_path_GREP=$GREP
4344fi
4345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4348$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 GREP="$ac_cv_path_GREP"
4350
4351
Matthias Kloseb9621712010-04-24 17:59:49 +00004352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4353$as_echo_n "checking for egrep... " >&6; }
4354if test "${ac_cv_path_EGREP+set}" = set; then :
4355 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356else
4357 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4358 then ac_cv_path_EGREP="$GREP -E"
4359 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004360 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 # Loop through the user's path and test for each of PROGNAME-LIST
4363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4365do
4366 IFS=$as_save_IFS
4367 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004368 for ac_prog in egrep; do
4369 for ac_exec_ext in '' $ac_executable_extensions; do
4370 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4371 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4372# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373 # Check for GNU $ac_path_EGREP
4374case `"$ac_path_EGREP" --version 2>&1` in
4375*GNU*)
4376 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4377*)
4378 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004380 while :
4381 do
4382 cat "conftest.in" "conftest.in" >"conftest.tmp"
4383 mv "conftest.tmp" "conftest.in"
4384 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004385 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004386 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4387 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004388 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004389 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4390 # Best one so far, save it but keep looking for a better one
4391 ac_cv_path_EGREP="$ac_path_EGREP"
4392 ac_path_EGREP_max=$ac_count
4393 fi
4394 # 10*(2^10) chars as input seems more than enough
4395 test $ac_count -gt 10 && break
4396 done
4397 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4398esac
4399
Matthias Kloseb9621712010-04-24 17:59:49 +00004400 $ac_path_EGREP_found && break 3
4401 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004403 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004404IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 if test -z "$ac_cv_path_EGREP"; then
4406 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4407 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408else
4409 ac_cv_path_EGREP=$EGREP
4410fi
4411
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004412 fi
4413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4415$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004416 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004417
4418
Matthias Kloseb9621712010-04-24 17:59:49 +00004419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4420$as_echo_n "checking for ANSI C header files... " >&6; }
4421if test "${ac_cv_header_stdc+set}" = set; then :
4422 $as_echo_n "(cached) " >&6
4423else
4424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004425/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004426#include <stdlib.h>
4427#include <stdarg.h>
4428#include <string.h>
4429#include <float.h>
4430
4431int
4432main ()
4433{
4434
4435 ;
4436 return 0;
4437}
4438_ACEOF
4439if ac_fn_c_try_compile "$LINENO"; then :
4440 ac_cv_header_stdc=yes
4441else
4442 ac_cv_header_stdc=no
4443fi
4444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4445
4446if test $ac_cv_header_stdc = yes; then
4447 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4449/* end confdefs.h. */
4450#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004451
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004452_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004454 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004455
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004456else
Matthias Kloseb9621712010-04-24 17:59:49 +00004457 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004458fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004459rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004460
Matthias Kloseb9621712010-04-24 17:59:49 +00004461fi
4462
4463if test $ac_cv_header_stdc = yes; then
4464 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466/* end confdefs.h. */
4467#include <stdlib.h>
4468
4469_ACEOF
4470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4471 $EGREP "free" >/dev/null 2>&1; then :
4472
4473else
4474 ac_cv_header_stdc=no
4475fi
4476rm -f conftest*
4477
4478fi
4479
4480if test $ac_cv_header_stdc = yes; then
4481 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4482 if test "$cross_compiling" = yes; then :
4483 :
4484else
4485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4486/* end confdefs.h. */
4487#include <ctype.h>
4488#include <stdlib.h>
4489#if ((' ' & 0x0FF) == 0x020)
4490# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4491# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4492#else
4493# define ISLOWER(c) \
4494 (('a' <= (c) && (c) <= 'i') \
4495 || ('j' <= (c) && (c) <= 'r') \
4496 || ('s' <= (c) && (c) <= 'z'))
4497# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4498#endif
4499
4500#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4501int
4502main ()
4503{
4504 int i;
4505 for (i = 0; i < 256; i++)
4506 if (XOR (islower (i), ISLOWER (i))
4507 || toupper (i) != TOUPPER (i))
4508 return 2;
4509 return 0;
4510}
4511_ACEOF
4512if ac_fn_c_try_run "$LINENO"; then :
4513
4514else
4515 ac_cv_header_stdc=no
4516fi
4517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4518 conftest.$ac_objext conftest.beam conftest.$ac_ext
4519fi
4520
4521fi
4522fi
4523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4524$as_echo "$ac_cv_header_stdc" >&6; }
4525if test $ac_cv_header_stdc = yes; then
4526
4527$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4528
4529fi
4530
4531# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4532for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4533 inttypes.h stdint.h unistd.h
4534do :
4535 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4536ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4537"
4538eval as_val=\$$as_ac_Header
4539 if test "x$as_val" = x""yes; then :
4540 cat >>confdefs.h <<_ACEOF
4541#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4542_ACEOF
4543
4544fi
4545
4546done
4547
4548
4549
4550 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4551if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4552 MINIX=yes
4553else
4554 MINIX=
4555fi
4556
4557
4558 if test "$MINIX" = yes; then
4559
4560$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4561
4562
4563$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4564
4565
4566$as_echo "#define _MINIX 1" >>confdefs.h
4567
4568 fi
4569
4570
4571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4572$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4573if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4574 $as_echo_n "(cached) " >&6
4575else
4576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4577/* end confdefs.h. */
4578
4579# define __EXTENSIONS__ 1
4580 $ac_includes_default
4581int
4582main ()
4583{
4584
4585 ;
4586 return 0;
4587}
4588_ACEOF
4589if ac_fn_c_try_compile "$LINENO"; then :
4590 ac_cv_safe_to_define___extensions__=yes
4591else
4592 ac_cv_safe_to_define___extensions__=no
4593fi
4594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4595fi
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4597$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4598 test $ac_cv_safe_to_define___extensions__ = yes &&
4599 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4600
4601 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4602
4603 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4604
4605 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4606
4607 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4608
4609
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004610
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004611# Check for unsupported systems
4612case $ac_sys_system/$ac_sys_release in
4613atheos*|Linux*/1*)
4614 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4615 echo See README for details.
4616 exit 1;;
4617esac
4618
4619
Matthias Kloseb9621712010-04-24 17:59:49 +00004620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4621$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004622
4623# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004624if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004625 withval=$with_suffix;
4626 case $withval in
4627 no) EXEEXT=;;
4628 yes) EXEEXT=.exe;;
4629 *) EXEEXT=$withval;;
4630 esac
4631fi
4632
Matthias Kloseb9621712010-04-24 17:59:49 +00004633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4634$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004635
4636# Test whether we're running on a non-case-sensitive system, in which
4637# case we give a warning if no ext is given
4638
Matthias Kloseb9621712010-04-24 17:59:49 +00004639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4640$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004641if test ! -d CaseSensitiveTestDir; then
4642mkdir CaseSensitiveTestDir
4643fi
4644
4645if test -d casesensitivetestdir
4646then
Matthias Kloseb9621712010-04-24 17:59:49 +00004647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4648$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004649 BUILDEXEEXT=.exe
4650else
Matthias Kloseb9621712010-04-24 17:59:49 +00004651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4652$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004653 BUILDEXEEXT=$EXEEXT
4654fi
4655rmdir CaseSensitiveTestDir
4656
4657case $MACHDEP in
4658bsdos*)
4659 case $CC in
4660 gcc) CC="$CC -D_HAVE_BSDI";;
4661 esac;;
4662esac
4663
4664case $ac_sys_system in
4665hp*|HP*)
4666 case $CC in
4667 cc|*/cc) CC="$CC -Ae";;
4668 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004669esac
4670
4671
4672
Matthias Kloseb9621712010-04-24 17:59:49 +00004673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4674$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004675if test -z "$LIBRARY"
4676then
4677 LIBRARY='libpython$(VERSION).a'
4678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4680$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004681
4682# LDLIBRARY is the name of the library to link against (as opposed to the
4683# name of the library into which to insert object files). BLDLIBRARY is also
4684# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4685# is blank as the main program is not linked directly against LDLIBRARY.
4686# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4687# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4688# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4689# DLLLIBRARY is the shared (i.e., DLL) library.
4690#
4691# RUNSHARED is used to run shared python without installed libraries
4692#
4693# INSTSONAME is the name of the shared library that will be use to install
4694# on the system - some systems like version suffix, others don't
4695
4696
4697
4698
4699
4700
4701LDLIBRARY="$LIBRARY"
4702BLDLIBRARY='$(LDLIBRARY)'
4703INSTSONAME='$(LDLIBRARY)'
4704DLLLIBRARY=''
4705LDLIBRARYDIR=''
4706RUNSHARED=''
4707
4708# LINKCC is the command that links the python executable -- default is $(CC).
4709# If CXX is set, and if it is needed to link a main function that was
4710# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4711# python might then depend on the C++ runtime
4712# This is altered for AIX in order to build the export list before
4713# linking.
4714
Matthias Kloseb9621712010-04-24 17:59:49 +00004715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4716$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004717if test -z "$LINKCC"
4718then
4719 LINKCC='$(PURIFY) $(MAINCC)'
4720 case $ac_sys_system in
4721 AIX*)
4722 exp_extra="\"\""
4723 if test $ac_sys_release -ge 5 -o \
4724 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4725 exp_extra="."
4726 fi
4727 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004728 QNX*)
4729 # qcc must be used because the other compilers do not
4730 # support -N.
4731 LINKCC=qcc;;
4732 esac
4733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4735$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004736
4737# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4738# make sure we default having it set to "no": this is used by
4739# distutils.unixccompiler to know if it should add --enable-new-dtags
4740# to linker command lines, and failing to detect GNU ld simply results
4741# in the same bahaviour as before.
4742
Matthias Kloseb9621712010-04-24 17:59:49 +00004743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4744$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004745ac_prog=ld
4746if test "$GCC" = yes; then
4747 ac_prog=`$CC -print-prog-name=ld`
4748fi
4749case `"$ac_prog" -V 2>&1 < /dev/null` in
4750 *GNU*)
4751 GNULD=yes;;
4752 *)
4753 GNULD=no;;
4754esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4756$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004757
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4759$as_echo_n "checking for inline... " >&6; }
4760if test "${ac_cv_c_inline+set}" = set; then :
4761 $as_echo_n "(cached) " >&6
4762else
4763 ac_cv_c_inline=no
4764for ac_kw in inline __inline__ __inline; do
4765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4766/* end confdefs.h. */
4767#ifndef __cplusplus
4768typedef int foo_t;
4769static $ac_kw foo_t static_foo () {return 0; }
4770$ac_kw foo_t foo () {return 0; }
4771#endif
4772
4773_ACEOF
4774if ac_fn_c_try_compile "$LINENO"; then :
4775 ac_cv_c_inline=$ac_kw
4776fi
4777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4778 test "$ac_cv_c_inline" != no && break
4779done
4780
4781fi
4782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4783$as_echo "$ac_cv_c_inline" >&6; }
4784
4785case $ac_cv_c_inline in
4786 inline | yes) ;;
4787 *)
4788 case $ac_cv_c_inline in
4789 no) ac_val=;;
4790 *) ac_val=$ac_cv_c_inline;;
4791 esac
4792 cat >>confdefs.h <<_ACEOF
4793#ifndef __cplusplus
4794#define inline $ac_val
4795#endif
4796_ACEOF
4797 ;;
4798esac
4799
4800if test "$ac_cv_c_inline" != no ; then
4801 $as_echo "#define USE_INLINE 1" >>confdefs.h
4802
4803
4804fi
4805
4806
Matthias Kloseb9621712010-04-24 17:59:49 +00004807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4808$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004809# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004810if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004811 enableval=$enable_shared;
4812fi
4813
4814
4815if test -z "$enable_shared"
4816then
4817 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004818 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004819 enable_shared="yes";;
4820 *)
4821 enable_shared="no";;
4822 esac
4823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4825$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004826
Matthias Kloseb9621712010-04-24 17:59:49 +00004827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4828$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004829# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004830if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004831 enableval=$enable_profiling; ac_save_cc="$CC"
4832 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004833 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004834 ac_enable_profiling="no"
4835else
Matthias Kloseb9621712010-04-24 17:59:49 +00004836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004837/* end confdefs.h. */
4838int main() { return 0; }
4839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004840if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004841 ac_enable_profiling="yes"
4842else
Matthias Kloseb9621712010-04-24 17:59:49 +00004843 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004845rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4846 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004847fi
4848
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004849 CC="$ac_save_cc"
4850fi
4851
Matthias Kloseb9621712010-04-24 17:59:49 +00004852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4853$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004854
4855case "$ac_enable_profiling" in
4856 "yes")
4857 BASECFLAGS="-pg $BASECFLAGS"
4858 LDFLAGS="-pg $LDFLAGS"
4859 ;;
4860esac
4861
Matthias Kloseb9621712010-04-24 17:59:49 +00004862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4863$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004864
4865# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4866# library that we build, but we do not want to link against it (we
4867# will find it with a -framework option). For this reason there is an
4868# extra variable BLDLIBRARY against which Python and the extension
4869# modules are linked, BLDLIBRARY. This is normally the same as
4870# LDLIBRARY, but empty for MacOSX framework builds.
4871if test "$enable_framework"
4872then
4873 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4874 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4875 BLDLIBRARY=''
4876else
4877 BLDLIBRARY='$(LDLIBRARY)'
4878fi
4879
4880# Other platforms follow
4881if test $enable_shared = "yes"; then
4882
Matthias Kloseb9621712010-04-24 17:59:49 +00004883$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004884
4885 case $ac_sys_system in
4886 CYGWIN*)
4887 LDLIBRARY='libpython$(VERSION).dll.a'
4888 DLLLIBRARY='libpython$(VERSION).dll'
4889 ;;
4890 SunOS*)
4891 LDLIBRARY='libpython$(VERSION).so'
4892 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4893 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4894 INSTSONAME="$LDLIBRARY".$SOVERSION
4895 ;;
4896 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4897 LDLIBRARY='libpython$(VERSION).so'
4898 BLDLIBRARY='-L. -lpython$(VERSION)'
4899 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4900 case $ac_sys_system in
4901 FreeBSD*)
4902 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4903 ;;
4904 esac
4905 INSTSONAME="$LDLIBRARY".$SOVERSION
4906 ;;
4907 hp*|HP*)
4908 case `uname -m` in
4909 ia64)
4910 LDLIBRARY='libpython$(VERSION).so'
4911 ;;
4912 *)
4913 LDLIBRARY='libpython$(VERSION).sl'
4914 ;;
4915 esac
4916 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4917 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4918 ;;
4919 OSF*)
4920 LDLIBRARY='libpython$(VERSION).so'
4921 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4922 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4923 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004924 Darwin*)
4925 LDLIBRARY='libpython$(VERSION).dylib'
4926 BLDLIBRARY='-L. -lpython$(VERSION)'
4927 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4928 ;;
4929
4930 esac
4931else # shared is disabled
4932 case $ac_sys_system in
4933 CYGWIN*)
4934 BLDLIBRARY='$(LIBRARY)'
4935 LDLIBRARY='libpython$(VERSION).dll.a'
4936 ;;
4937 esac
4938fi
4939
Matthias Kloseb9621712010-04-24 17:59:49 +00004940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4941$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004942
4943if test -n "$ac_tool_prefix"; then
4944 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4945set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4947$as_echo_n "checking for $ac_word... " >&6; }
4948if test "${ac_cv_prog_RANLIB+set}" = set; then :
4949 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004950else
4951 if test -n "$RANLIB"; then
4952 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4953else
4954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4955for as_dir in $PATH
4956do
4957 IFS=$as_save_IFS
4958 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004959 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004960 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4961 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004962 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004963 break 2
4964 fi
4965done
Matthias Kloseb9621712010-04-24 17:59:49 +00004966 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004967IFS=$as_save_IFS
4968
4969fi
4970fi
4971RANLIB=$ac_cv_prog_RANLIB
4972if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4974$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975else
Matthias Kloseb9621712010-04-24 17:59:49 +00004976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4977$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978fi
4979
4980
4981fi
4982if test -z "$ac_cv_prog_RANLIB"; then
4983 ac_ct_RANLIB=$RANLIB
4984 # Extract the first word of "ranlib", so it can be a program name with args.
4985set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4987$as_echo_n "checking for $ac_word... " >&6; }
4988if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4989 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004990else
4991 if test -n "$ac_ct_RANLIB"; then
4992 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4993else
4994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4995for as_dir in $PATH
4996do
4997 IFS=$as_save_IFS
4998 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004999 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005000 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5001 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005003 break 2
5004 fi
5005done
Matthias Kloseb9621712010-04-24 17:59:49 +00005006 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005007IFS=$as_save_IFS
5008
5009fi
5010fi
5011ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5012if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5014$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015else
Matthias Kloseb9621712010-04-24 17:59:49 +00005016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5017$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018fi
5019
5020 if test "x$ac_ct_RANLIB" = x; then
5021 RANLIB=":"
5022 else
5023 case $cross_compiling:$ac_tool_warned in
5024yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005025{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5026$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005027ac_tool_warned=yes ;;
5028esac
5029 RANLIB=$ac_ct_RANLIB
5030 fi
5031else
5032 RANLIB="$ac_cv_prog_RANLIB"
5033fi
5034
5035
5036for ac_prog in ar aal
5037do
5038 # Extract the first word of "$ac_prog", so it can be a program name with args.
5039set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5041$as_echo_n "checking for $ac_word... " >&6; }
5042if test "${ac_cv_prog_AR+set}" = set; then :
5043 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044else
5045 if test -n "$AR"; then
5046 ac_cv_prog_AR="$AR" # Let the user override the test.
5047else
5048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5049for as_dir in $PATH
5050do
5051 IFS=$as_save_IFS
5052 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005053 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005054 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5055 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005057 break 2
5058 fi
5059done
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005061IFS=$as_save_IFS
5062
5063fi
5064fi
5065AR=$ac_cv_prog_AR
5066if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5068$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005069else
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5071$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005072fi
5073
5074
5075 test -n "$AR" && break
5076done
5077test -n "$AR" || AR="ar"
5078
5079
5080# tweak ARFLAGS only if the user didn't set it on the command line
5081
5082if test -z "$ARFLAGS"
5083then
5084 ARFLAGS="rc"
5085fi
5086
5087
5088# Extract the first word of "svnversion", so it can be a program name with args.
5089set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5091$as_echo_n "checking for $ac_word... " >&6; }
5092if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5093 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005094else
5095 if test -n "$SVNVERSION"; then
5096 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5097else
5098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5099for as_dir in $PATH
5100do
5101 IFS=$as_save_IFS
5102 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005104 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5105 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005107 break 2
5108 fi
5109done
Matthias Kloseb9621712010-04-24 17:59:49 +00005110 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005111IFS=$as_save_IFS
5112
5113 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5114fi
5115fi
5116SVNVERSION=$ac_cv_prog_SVNVERSION
5117if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5119$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005120else
Matthias Kloseb9621712010-04-24 17:59:49 +00005121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5122$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123fi
5124
5125
5126if test $SVNVERSION = found
5127then
5128 SVNVERSION="svnversion \$(srcdir)"
5129else
5130 SVNVERSION="echo Unversioned directory"
5131fi
5132
5133case $MACHDEP in
5134bsdos*|hp*|HP*)
5135 # install -d does not work on BSDI or HP-UX
5136 if test -z "$INSTALL"
5137 then
5138 INSTALL="${srcdir}/install-sh -c"
5139 fi
5140esac
5141ac_aux_dir=
5142for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Matthias Kloseb9621712010-04-24 17:59:49 +00005143 for ac_t in install-sh install.sh shtool; do
5144 if test -f "$ac_dir/$ac_t"; then
5145 ac_aux_dir=$ac_dir
5146 ac_install_sh="$ac_aux_dir/$ac_t -c"
5147 break 2
5148 fi
5149 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005150done
5151if test -z "$ac_aux_dir"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005152 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005153fi
5154
5155# These three variables are undocumented and unsupported,
5156# and are intended to be withdrawn in a future Autoconf release.
5157# They can cause serious problems if a builder's source tree is in a directory
5158# whose full name contains unusual characters.
5159ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5160ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5161ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5162
5163
5164# Find a good install program. We prefer a C program (faster),
5165# so one script is as good as another. But avoid the broken or
5166# incompatible versions:
5167# SysV /etc/install, /usr/sbin/install
5168# SunOS /usr/etc/install
5169# IRIX /sbin/install
5170# AIX /bin/install
5171# AmigaOS /C/install, which installs bootblocks on floppy discs
5172# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5173# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5174# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5175# OS/2's system install, which has a completely different semantic
5176# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005177# Reject install programs that cannot install multiple files.
5178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5179$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005180if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005181if test "${ac_cv_path_install+set}" = set; then :
5182 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005183else
5184 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5185for as_dir in $PATH
5186do
5187 IFS=$as_save_IFS
5188 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005189 # Account for people who put trailing slashes in PATH elements.
5190case $as_dir/ in #((
5191 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005192 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005193 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005194 /usr/ucb/* ) ;;
5195 *)
5196 # OSF1 and SCO ODT 3.0 have their own names for install.
5197 # Don't use installbsd from OSF since it installs stuff as root
5198 # by default.
5199 for ac_prog in ginstall scoinst install; do
5200 for ac_exec_ext in '' $ac_executable_extensions; do
5201 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5202 if test $ac_prog = install &&
5203 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5204 # AIX install. It has an incompatible calling convention.
5205 :
5206 elif test $ac_prog = install &&
5207 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5208 # program-specific install script used by HP pwplus--don't use.
5209 :
5210 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005211 rm -rf conftest.one conftest.two conftest.dir
5212 echo one > conftest.one
5213 echo two > conftest.two
5214 mkdir conftest.dir
5215 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5216 test -s conftest.one && test -s conftest.two &&
5217 test -s conftest.dir/conftest.one &&
5218 test -s conftest.dir/conftest.two
5219 then
5220 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5221 break 3
5222 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005223 fi
5224 fi
5225 done
5226 done
5227 ;;
5228esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005229
5230 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005231IFS=$as_save_IFS
5232
Matthias Kloseb9621712010-04-24 17:59:49 +00005233rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005234
5235fi
5236 if test "${ac_cv_path_install+set}" = set; then
5237 INSTALL=$ac_cv_path_install
5238 else
5239 # As a last resort, use the slow shell script. Don't cache a
5240 # value for INSTALL within a source directory, because that will
5241 # break other packages using the cache if that directory is
5242 # removed, or if the value is a relative name.
5243 INSTALL=$ac_install_sh
5244 fi
5245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5247$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005248
5249# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5250# It thinks the first close brace ends the variable substitution.
5251test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5252
5253test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5254
5255test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5256
5257
5258# Not every filesystem supports hard links
5259
5260if test -z "$LN" ; then
5261 case $ac_sys_system in
5262 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005263 *) LN=ln;;
5264 esac
5265fi
5266
5267# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5269$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005270
5271# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005272if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005273 withval=$with_pydebug;
5274if test "$withval" != no
5275then
5276
Matthias Kloseb9621712010-04-24 17:59:49 +00005277$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005278
Matthias Kloseb9621712010-04-24 17:59:49 +00005279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5280$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005281 Py_DEBUG='true'
Matthias Kloseb9621712010-04-24 17:59:49 +00005282else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5283$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005284fi
5285else
Matthias Kloseb9621712010-04-24 17:59:49 +00005286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5287$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005288fi
5289
5290
5291# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5292# merged with this chunk of code?
5293
5294# Optimizer/debugger flags
5295# ------------------------
5296# (The following bit of code is complicated enough - please keep things
5297# indented properly. Just pretend you're editing Python code. ;-)
5298
5299# There are two parallel sets of case statements below, one that checks to
5300# see if OPT was set and one that does BASECFLAGS setting based upon
5301# compiler and platform. BASECFLAGS tweaks need to be made even if the
5302# user set OPT.
5303
5304# tweak OPT based on compiler and platform, only if the user didn't set
5305# it on the command line
5306
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005307if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005308then
5309 case $GCC in
5310 yes)
5311 if test "$CC" != 'g++' ; then
5312 STRICT_PROTO="-Wstrict-prototypes"
5313 fi
5314 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5315 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5316 WRAP="-fwrapv"
5317 fi
5318 case $ac_cv_prog_cc_g in
5319 yes)
5320 if test "$Py_DEBUG" = 'true' ; then
5321 # Optimization messes up debuggers, so turn it off for
5322 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005323 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005324 else
5325 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5326 fi
5327 ;;
5328 *)
5329 OPT="-O3 -Wall $STRICT_PROTO"
5330 ;;
5331 esac
5332 case $ac_sys_system in
5333 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5334 ;;
5335 esac
5336 ;;
5337
5338 *)
5339 OPT="-O"
5340 ;;
5341 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005342fi
5343
5344
5345
5346# The -arch flags for universal builds on OSX
5347UNIVERSAL_ARCH_FLAGS=
5348
5349
5350# tweak BASECFLAGS based on compiler and platform
5351case $GCC in
5352yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005353 # Python doesn't violate C99 aliasing rules, but older versions of
5354 # GCC produce warnings for legal Python code. Enable
5355 # -fno-strict-aliasing on versions of GCC that support but produce
5356 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5358$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359 ac_save_cc="$CC"
5360 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005361 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005362 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5363 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005364else
Matthias Kloseb9621712010-04-24 17:59:49 +00005365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005366/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005367
Matthias Kloseb159a552010-04-25 21:00:44 +00005368
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005369int
5370main ()
5371{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005372
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005373 ;
5374 return 0;
5375}
Matthias Kloseb159a552010-04-25 21:00:44 +00005376
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005378if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005379
5380 CC="$ac_save_cc -fstrict-aliasing"
5381 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005383/* end confdefs.h. */
5384
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005385 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005386int
5387main ()
5388{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005389double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005390 ;
5391 return 0;
5392}
Matthias Kloseb159a552010-04-25 21:00:44 +00005393
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005395if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005396
5397 ac_cv_no_strict_aliasing=no
5398
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005399else
Matthias Kloseb159a552010-04-25 21:00:44 +00005400
5401 ac_cv_no_strict_aliasing=yes
5402
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005403fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005405
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005406else
Matthias Kloseb159a552010-04-25 21:00:44 +00005407
5408 ac_cv_no_strict_aliasing=no
5409
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005410fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005412fi
5413
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005414 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5417$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005418 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419 then
5420 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5421 fi
5422
5423 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5424 # support. Without this, treatment of subnormals doesn't follow
5425 # the standard.
5426 case $ac_sys_machine in
5427 alpha*)
5428 BASECFLAGS="$BASECFLAGS -mieee"
5429 ;;
5430 esac
5431
5432 case $ac_sys_system in
5433 SCO_SV*)
5434 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5435 ;;
5436 # is there any other compiler on Darwin besides gcc?
5437 Darwin*)
5438 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5439 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005440 if test "${CC}" = gcc
5441 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5443$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005444 case "${UNIVERSALSDK}" in
5445 */MacOSX10.4u.sdk)
5446 # Build using 10.4 SDK, force usage of gcc when the
5447 # compiler is gcc, otherwise the user will get very
5448 # confusing error messages when building on OSX 10.6
5449 CC=gcc-4.0
5450 CPP=cpp-4.0
5451 ;;
5452 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5454$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005455 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005456
5457
5458 if test "${enable_universalsdk}"; then
5459 UNIVERSAL_ARCH_FLAGS=""
5460 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5461 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5462 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005463 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005464 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5465 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005466 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005467 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005468
5469 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5470 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005471 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005472 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005473
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005474 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5475 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005476 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005477 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005478
5479 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5480 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005481 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005482 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005483
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005484 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005485 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 +00005486
5487 fi
5488
5489
Ronald Oussoren666028b2010-04-18 19:07:43 +00005490 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5491 if test "${UNIVERSALSDK}" != "/"
5492 then
5493 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5494 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005495 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005496 fi
5497 fi
5498
5499 # Calculate the right deployment target for this build.
5500 #
5501 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5502 if test ${cur_target} '>' 10.2; then
5503 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005504 if test ${enable_universalsdk}; then
5505 if test "${UNIVERSAL_ARCHS}" = "all"; then
5506 # Ensure that the default platform for a
5507 # 4-way universal build is OSX 10.5,
5508 # that's the first OS release where
5509 # 4-way builds make sense.
5510 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005511
5512 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5513 cur_target='10.5'
5514
5515 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5516 cur_target='10.5'
5517
5518 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5519 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005520 fi
5521 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005522 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005523 # On Intel macs default to a deployment
5524 # target of 10.4, that's the first OSX
5525 # release with Intel support.
5526 cur_target="10.4"
5527 fi
5528 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005529 fi
5530 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5531
5532 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5533 # environment with a value that is the same as what we'll use
5534 # in the Makefile to ensure that we'll get the same compiler
5535 # environment during configure and build time.
5536 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5537 export MACOSX_DEPLOYMENT_TARGET
5538 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5539
5540 ;;
5541 OSF*)
5542 BASECFLAGS="$BASECFLAGS -mieee"
5543 ;;
5544 esac
5545 ;;
5546
5547*)
5548 case $ac_sys_system in
5549 OpenUNIX*|UnixWare*)
5550 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5551 ;;
5552 OSF*)
5553 BASECFLAGS="$BASECFLAGS -ieee -std"
5554 ;;
5555 SCO_SV*)
5556 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5557 ;;
5558 esac
5559 ;;
5560esac
5561
5562if test "$Py_DEBUG" = 'true'; then
5563 :
5564else
5565 OPT="-DNDEBUG $OPT"
5566fi
5567
5568if test "$ac_arch_flags"
5569then
5570 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5571fi
5572
5573# disable check for icc since it seems to pass, but generates a warning
5574if test "$CC" = icc
5575then
5576 ac_cv_opt_olimit_ok=no
5577fi
5578
Matthias Kloseb9621712010-04-24 17:59:49 +00005579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5580$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5581if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5582 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583else
5584 ac_save_cc="$CC"
5585CC="$CC -OPT:Olimit=0"
Matthias Kloseb9621712010-04-24 17:59:49 +00005586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005588
5589int
5590main ()
5591{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005592
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005593 ;
5594 return 0;
5595}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005597if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598 ac_cv_opt_olimit_ok=yes
5599else
Matthias Kloseb9621712010-04-24 17:59:49 +00005600 ac_cv_opt_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005601
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604CC="$ac_save_cc"
5605fi
5606
Matthias Kloseb9621712010-04-24 17:59:49 +00005607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5608$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609if test $ac_cv_opt_olimit_ok = yes; then
5610 case $ac_sys_system in
5611 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5612 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5613 # environment?
5614 Darwin*)
5615 ;;
5616 *)
5617 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5618 ;;
5619 esac
5620else
Matthias Kloseb9621712010-04-24 17:59:49 +00005621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5622$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5623 if test "${ac_cv_olimit_ok+set}" = set; then :
5624 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625else
5626 ac_save_cc="$CC"
5627 CC="$CC -Olimit 1500"
Matthias Kloseb9621712010-04-24 17:59:49 +00005628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005630
5631int
5632main ()
5633{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005634
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005635 ;
5636 return 0;
5637}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005639if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640 ac_cv_olimit_ok=yes
5641else
Matthias Kloseb9621712010-04-24 17:59:49 +00005642 ac_cv_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005643
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005646 CC="$ac_save_cc"
5647fi
5648
Matthias Kloseb9621712010-04-24 17:59:49 +00005649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5650$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651 if test $ac_cv_olimit_ok = yes; then
5652 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5653 fi
5654fi
5655
5656# Check whether GCC supports PyArg_ParseTuple format
5657if test "$GCC" = "yes"
5658then
Matthias Kloseb9621712010-04-24 17:59:49 +00005659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5660$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661 save_CFLAGS=$CFLAGS
5662 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664/* end confdefs.h. */
5665
5666 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667int
5668main ()
5669{
5670
5671 ;
5672 return 0;
5673}
Matthias Kloseb159a552010-04-25 21:00:44 +00005674
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005676if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677
Matthias Kloseb159a552010-04-25 21:00:44 +00005678
Matthias Kloseb9621712010-04-24 17:59:49 +00005679$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680
Matthias Kloseb159a552010-04-25 21:00:44 +00005681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005682$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684else
Matthias Kloseb159a552010-04-25 21:00:44 +00005685
5686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005687$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688
5689fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5691 CFLAGS=$save_CFLAGS
5692fi
5693
5694# On some compilers, pthreads are available without further options
5695# (e.g. MacOS X). On some of these systems, the compiler will not
5696# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5697# So we have to see first whether pthreads are available without
5698# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5700$as_echo_n "checking whether pthreads are available without options... " >&6; }
5701if test "${ac_cv_pthread_is_default+set}" = set; then :
5702 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703else
Matthias Kloseb9621712010-04-24 17:59:49 +00005704 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705 ac_cv_pthread_is_default=no
5706else
Matthias Kloseb9621712010-04-24 17:59:49 +00005707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708/* end confdefs.h. */
5709
5710#include <pthread.h>
5711
5712void* routine(void* p){return NULL;}
5713
5714int main(){
5715 pthread_t p;
5716 if(pthread_create(&p,NULL,routine,NULL)!=0)
5717 return 1;
5718 (void)pthread_detach(p);
5719 return 0;
5720}
5721
5722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005723if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724
5725 ac_cv_pthread_is_default=yes
5726 ac_cv_kthread=no
5727 ac_cv_pthread=no
5728
5729else
Matthias Kloseb9621712010-04-24 17:59:49 +00005730 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5733 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734fi
5735
5736
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737fi
5738
Matthias Kloseb9621712010-04-24 17:59:49 +00005739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5740$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741
5742
5743if test $ac_cv_pthread_is_default = yes
5744then
5745 ac_cv_kpthread=no
5746else
5747# -Kpthread, if available, provides the right #defines
5748# and linker options to make pthread_create available
5749# Some compilers won't report that they do not support -Kpthread,
5750# so we need to run a program to see whether it really made the
5751# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5753$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5754if test "${ac_cv_kpthread+set}" = set; then :
5755 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756else
5757 ac_save_cc="$CC"
5758CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005759if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760 ac_cv_kpthread=no
5761else
Matthias Kloseb9621712010-04-24 17:59:49 +00005762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763/* end confdefs.h. */
5764
5765#include <pthread.h>
5766
5767void* routine(void* p){return NULL;}
5768
5769int main(){
5770 pthread_t p;
5771 if(pthread_create(&p,NULL,routine,NULL)!=0)
5772 return 1;
5773 (void)pthread_detach(p);
5774 return 0;
5775}
5776
5777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005778if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779 ac_cv_kpthread=yes
5780else
Matthias Kloseb9621712010-04-24 17:59:49 +00005781 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5784 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785fi
5786
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005787CC="$ac_save_cc"
5788fi
5789
Matthias Kloseb9621712010-04-24 17:59:49 +00005790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5791$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792fi
5793
5794if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5795then
5796# -Kthread, if available, provides the right #defines
5797# and linker options to make pthread_create available
5798# Some compilers won't report that they do not support -Kthread,
5799# so we need to run a program to see whether it really made the
5800# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5802$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5803if test "${ac_cv_kthread+set}" = set; then :
5804 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805else
5806 ac_save_cc="$CC"
5807CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005808if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809 ac_cv_kthread=no
5810else
Matthias Kloseb9621712010-04-24 17:59:49 +00005811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812/* end confdefs.h. */
5813
5814#include <pthread.h>
5815
5816void* routine(void* p){return NULL;}
5817
5818int main(){
5819 pthread_t p;
5820 if(pthread_create(&p,NULL,routine,NULL)!=0)
5821 return 1;
5822 (void)pthread_detach(p);
5823 return 0;
5824}
5825
5826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005827if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828 ac_cv_kthread=yes
5829else
Matthias Kloseb9621712010-04-24 17:59:49 +00005830 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5833 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834fi
5835
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836CC="$ac_save_cc"
5837fi
5838
Matthias Kloseb9621712010-04-24 17:59:49 +00005839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5840$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841fi
5842
5843if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5844then
5845# -pthread, if available, provides the right #defines
5846# and linker options to make pthread_create available
5847# Some compilers won't report that they do not support -pthread,
5848# so we need to run a program to see whether it really made the
5849# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5851$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5852if test "${ac_cv_thread+set}" = set; then :
5853 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854else
5855 ac_save_cc="$CC"
5856CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005857if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858 ac_cv_pthread=no
5859else
Matthias Kloseb9621712010-04-24 17:59:49 +00005860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861/* end confdefs.h. */
5862
5863#include <pthread.h>
5864
5865void* routine(void* p){return NULL;}
5866
5867int main(){
5868 pthread_t p;
5869 if(pthread_create(&p,NULL,routine,NULL)!=0)
5870 return 1;
5871 (void)pthread_detach(p);
5872 return 0;
5873}
5874
5875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005876if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877 ac_cv_pthread=yes
5878else
Matthias Kloseb9621712010-04-24 17:59:49 +00005879 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5882 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883fi
5884
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885CC="$ac_save_cc"
5886fi
5887
Matthias Kloseb9621712010-04-24 17:59:49 +00005888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5889$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890fi
5891
5892# If we have set a CC compiler flag for thread support then
5893# check if it works for CXX, too.
5894ac_cv_cxx_thread=no
5895if test ! -z "$CXX"
5896then
Matthias Kloseb9621712010-04-24 17:59:49 +00005897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5898$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899ac_save_cxx="$CXX"
5900
5901if test "$ac_cv_kpthread" = "yes"
5902then
5903 CXX="$CXX -Kpthread"
5904 ac_cv_cxx_thread=yes
5905elif test "$ac_cv_kthread" = "yes"
5906then
5907 CXX="$CXX -Kthread"
5908 ac_cv_cxx_thread=yes
5909elif test "$ac_cv_pthread" = "yes"
5910then
5911 CXX="$CXX -pthread"
5912 ac_cv_cxx_thread=yes
5913fi
5914
5915if test $ac_cv_cxx_thread = yes
5916then
5917 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5918 $CXX -c conftest.$ac_ext 2>&5
5919 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5920 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5921 then
5922 ac_cv_cxx_thread=yes
5923 else
5924 ac_cv_cxx_thread=no
5925 fi
5926 rm -fr conftest*
5927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5929$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930fi
5931CXX="$ac_save_cxx"
5932
5933
5934# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5936$as_echo_n "checking for ANSI C header files... " >&6; }
5937if test "${ac_cv_header_stdc+set}" = set; then :
5938 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939else
Matthias Kloseb9621712010-04-24 17:59:49 +00005940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941/* end confdefs.h. */
5942#include <stdlib.h>
5943#include <stdarg.h>
5944#include <string.h>
5945#include <float.h>
5946
5947int
5948main ()
5949{
5950
5951 ;
5952 return 0;
5953}
5954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005955if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 ac_cv_header_stdc=yes
5957else
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5961
5962if test $ac_cv_header_stdc = yes; then
5963 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965/* end confdefs.h. */
5966#include <string.h>
5967
5968_ACEOF
5969if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005970 $EGREP "memchr" >/dev/null 2>&1; then :
5971
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972else
5973 ac_cv_header_stdc=no
5974fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005975rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976
5977fi
5978
5979if test $ac_cv_header_stdc = yes; then
5980 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982/* end confdefs.h. */
5983#include <stdlib.h>
5984
5985_ACEOF
5986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005987 $EGREP "free" >/dev/null 2>&1; then :
5988
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989else
5990 ac_cv_header_stdc=no
5991fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005992rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993
5994fi
5995
5996if test $ac_cv_header_stdc = yes; then
5997 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005998 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999 :
6000else
Matthias Kloseb9621712010-04-24 17:59:49 +00006001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002/* end confdefs.h. */
6003#include <ctype.h>
6004#include <stdlib.h>
6005#if ((' ' & 0x0FF) == 0x020)
6006# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6007# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6008#else
6009# define ISLOWER(c) \
6010 (('a' <= (c) && (c) <= 'i') \
6011 || ('j' <= (c) && (c) <= 'r') \
6012 || ('s' <= (c) && (c) <= 'z'))
6013# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6014#endif
6015
6016#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6017int
6018main ()
6019{
6020 int i;
6021 for (i = 0; i < 256; i++)
6022 if (XOR (islower (i), ISLOWER (i))
6023 || toupper (i) != TOUPPER (i))
6024 return 2;
6025 return 0;
6026}
6027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006028if ac_fn_c_try_run "$LINENO"; then :
6029
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030else
Matthias Kloseb9621712010-04-24 17:59:49 +00006031 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006033rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6034 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035fi
6036
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037fi
6038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6040$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041if test $ac_cv_header_stdc = yes; then
6042
Matthias Kloseb9621712010-04-24 17:59:49 +00006043$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044
6045fi
6046
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006047for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6048fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006049ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006050shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006051unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006052sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6053sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006054sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006055sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006056sys/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 +00006057sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006058bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006059do :
6060 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6061ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6062eval as_val=\$$as_ac_Header
6063 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006064 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006065#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006066_ACEOF
6067
6068fi
6069
Guido van Rossum627b2d71993-12-24 10:39:16 +00006070done
6071
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006072ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006073for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006074 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6076$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
6077if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
6078 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006079else
Matthias Kloseb9621712010-04-24 17:59:49 +00006080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006081/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006082#include <sys/types.h>
6083#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006084
Martin v. Löwis11437992002-04-12 09:54:03 +00006085int
6086main ()
6087{
6088if ((DIR *) 0)
6089return 0;
6090 ;
6091 return 0;
6092}
6093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006094if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006095 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006096else
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006101eval ac_res=\$$as_ac_Header
6102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6103$as_echo "$ac_res" >&6; }
6104eval as_val=\$$as_ac_Header
6105 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006106 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006107#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006108_ACEOF
6109
6110ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006111fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006112
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006113done
6114# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6115if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6117$as_echo_n "checking for library containing opendir... " >&6; }
6118if test "${ac_cv_search_opendir+set}" = set; then :
6119 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006120else
Martin v. Löwis11437992002-04-12 09:54:03 +00006121 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006125/* Override any GCC internal prototype to avoid an error.
6126 Use char because int might match the return type of a GCC
6127 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006128#ifdef __cplusplus
6129extern "C"
6130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006131char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006132int
6133main ()
6134{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006135return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006136 ;
6137 return 0;
6138}
6139_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006140for ac_lib in '' dir; do
6141 if test -z "$ac_lib"; then
6142 ac_res="none required"
6143 else
6144 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006145 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006146 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006147 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006148 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006149fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006150rm -f core conftest.err conftest.$ac_objext \
6151 conftest$ac_exeext
6152 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006153 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006155done
Matthias Kloseb9621712010-04-24 17:59:49 +00006156if test "${ac_cv_search_opendir+set}" = set; then :
6157
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006158else
6159 ac_cv_search_opendir=no
6160fi
6161rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006162LIBS=$ac_func_search_save_LIBS
6163fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6165$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006166ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006167if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006168 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006169
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006170fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006171
Michael W. Hudson54241132001-12-07 15:38:26 +00006172else
Matthias Kloseb9621712010-04-24 17:59:49 +00006173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6174$as_echo_n "checking for library containing opendir... " >&6; }
6175if test "${ac_cv_search_opendir+set}" = set; then :
6176 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006177else
6178 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006181
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006182/* Override any GCC internal prototype to avoid an error.
6183 Use char because int might match the return type of a GCC
6184 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006185#ifdef __cplusplus
6186extern "C"
6187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006188char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006189int
6190main ()
6191{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006192return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006193 ;
6194 return 0;
6195}
6196_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006197for ac_lib in '' x; do
6198 if test -z "$ac_lib"; then
6199 ac_res="none required"
6200 else
6201 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006202 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006203 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006204 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006205 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006207rm -f core conftest.err conftest.$ac_objext \
6208 conftest$ac_exeext
6209 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006210 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006212done
Matthias Kloseb9621712010-04-24 17:59:49 +00006213if test "${ac_cv_search_opendir+set}" = set; then :
6214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006215else
6216 ac_cv_search_opendir=no
6217fi
6218rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006219LIBS=$ac_func_search_save_LIBS
6220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6222$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006223ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006224if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006225 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006226
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006227fi
6228
6229fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006230
Matthias Kloseb9621712010-04-24 17:59:49 +00006231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6232$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6233if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6234 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006235else
Matthias Kloseb9621712010-04-24 17:59:49 +00006236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006237/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006238#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239int
6240main ()
6241{
6242return makedev(0, 0);
6243 ;
6244 return 0;
6245}
6246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006247if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248 ac_cv_header_sys_types_h_makedev=yes
6249else
Matthias Kloseb9621712010-04-24 17:59:49 +00006250 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006251fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006252rm -f core conftest.err conftest.$ac_objext \
6253 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006254
6255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6257$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006258
6259if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006260ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6261if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006262
Matthias Kloseb9621712010-04-24 17:59:49 +00006263$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006264
6265fi
6266
6267
6268
6269 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006270 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6271if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006272
Matthias Kloseb9621712010-04-24 17:59:49 +00006273$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006274
6275fi
6276
6277
6278 fi
6279fi
6280
Michael W. Hudson54241132001-12-07 15:38:26 +00006281
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006282# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006283for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006284do :
6285 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006286#ifdef HAVE_CURSES_H
6287#include <curses.h>
6288#endif
6289
Matthias Kloseb9621712010-04-24 17:59:49 +00006290"
6291if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006292 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006293#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006294_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006295
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006296fi
6297
6298done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006299
6300
Martin v. Löwis11017b12006-01-14 18:12:57 +00006301# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006302for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006303do :
6304 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 +00006305#ifdef HAVE_ASM_TYPES_H
6306#include <asm/types.h>
6307#endif
6308#ifdef HAVE_SYS_SOCKET_H
6309#include <sys/socket.h>
6310#endif
6311
Matthias Kloseb9621712010-04-24 17:59:49 +00006312"
6313if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006314 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006315#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006316_ACEOF
6317
6318fi
6319
6320done
6321
6322
Guido van Rossum627b2d71993-12-24 10:39:16 +00006323# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006324was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6326$as_echo_n "checking for clock_t in time.h... " >&6; }
6327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006328/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006329#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006330
6331_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006332if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006333 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006334 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006335else
Martin v. Löwis11437992002-04-12 09:54:03 +00006336
6337
Matthias Kloseb9621712010-04-24 17:59:49 +00006338$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006339
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006340
Guido van Rossum627b2d71993-12-24 10:39:16 +00006341fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006342rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006343
Matthias Kloseb9621712010-04-24 17:59:49 +00006344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6345$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006346
Neal Norwitz11690112002-07-30 01:08:28 +00006347# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6349$as_echo_n "checking for makedev... " >&6; }
6350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006351/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006352
Jesus Cea740f53a2010-04-28 11:35:30 +00006353#if defined(MAJOR_IN_MKDEV)
6354#include <sys/mkdev.h>
6355#elif defined(MAJOR_IN_SYSMACROS)
6356#include <sys/sysmacros.h>
6357#else
6358#include <sys/types.h>
6359#endif
6360
Neal Norwitz11690112002-07-30 01:08:28 +00006361int
6362main ()
6363{
Jesus Cea740f53a2010-04-28 11:35:30 +00006364
6365 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006366 ;
6367 return 0;
6368}
Matthias Kloseb159a552010-04-25 21:00:44 +00006369
Neal Norwitz11690112002-07-30 01:08:28 +00006370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006371if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006372 ac_cv_has_makedev=yes
6373else
Matthias Kloseb9621712010-04-24 17:59:49 +00006374 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006375fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006376rm -f core conftest.err conftest.$ac_objext \
6377 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006378if test "$ac_cv_has_makedev" = "no"; then
6379 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006381/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006382
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006383#define _OSF_SOURCE 1
6384#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006385
Neal Norwitz11690112002-07-30 01:08:28 +00006386int
6387main ()
6388{
6389 makedev(0, 0)
6390 ;
6391 return 0;
6392}
6393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006394if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006395 ac_cv_has_makedev=yes
6396else
Matthias Kloseb9621712010-04-24 17:59:49 +00006397 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006398fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006399rm -f core conftest.err conftest.$ac_objext \
6400 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006401 if test "$ac_cv_has_makedev" = "yes"; then
6402
Matthias Kloseb9621712010-04-24 17:59:49 +00006403$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006404
6405 fi
6406fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6408$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006409if test "$ac_cv_has_makedev" = "yes"; then
6410
Matthias Kloseb9621712010-04-24 17:59:49 +00006411$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006412
6413fi
6414
Martin v. Löwis399a6892002-10-04 10:22:02 +00006415# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6416# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6417# defined, but the compiler does not support pragma redefine_extname,
6418# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6419# structures (such as rlimit64) without declaring them. As a
6420# work-around, disable LFS on such configurations
6421
6422use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6424$as_echo_n "checking Solaris LFS bug... " >&6; }
6425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006426/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006427
6428#define _LARGEFILE_SOURCE 1
6429#define _FILE_OFFSET_BITS 64
6430#include <sys/resource.h>
6431
Martin v. Löwis399a6892002-10-04 10:22:02 +00006432int
6433main ()
6434{
6435struct rlimit foo;
6436 ;
6437 return 0;
6438}
6439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006440if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006441 sol_lfs_bug=no
6442else
Matthias Kloseb9621712010-04-24 17:59:49 +00006443 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6447$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006448if test "$sol_lfs_bug" = "yes"; then
6449 use_lfs=no
6450fi
6451
6452if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006453# Two defines needed to enable largefile support on various platforms
6454# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006455
Matthias Kloseb9621712010-04-24 17:59:49 +00006456$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006457
6458
Matthias Kloseb9621712010-04-24 17:59:49 +00006459$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006460
Martin v. Löwis399a6892002-10-04 10:22:02 +00006461fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006462
Guido van Rossum84e7b241996-08-19 21:59:00 +00006463# Add some code to confdefs.h so that the test for off_t works on SCO
6464cat >> confdefs.h <<\EOF
6465#if defined(SCO_DS)
6466#undef _OFF_T
6467#endif
6468EOF
6469
Guido van Rossumef2255b2000-03-10 22:30:29 +00006470# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006471ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6472if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006473
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006474else
Martin v. Löwis11437992002-04-12 09:54:03 +00006475
6476cat >>confdefs.h <<_ACEOF
6477#define mode_t int
6478_ACEOF
6479
6480fi
6481
Matthias Kloseb9621712010-04-24 17:59:49 +00006482ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6483if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006484
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006485else
Martin v. Löwis11437992002-04-12 09:54:03 +00006486
6487cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006488#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006489_ACEOF
6490
6491fi
6492
Matthias Kloseb9621712010-04-24 17:59:49 +00006493ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6494if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006495
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006496else
Martin v. Löwis11437992002-04-12 09:54:03 +00006497
6498cat >>confdefs.h <<_ACEOF
6499#define pid_t int
6500_ACEOF
6501
6502fi
6503
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006504
Martin v. Löwis11437992002-04-12 09:54:03 +00006505cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006506#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006507_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006508
Matthias Kloseb9621712010-04-24 17:59:49 +00006509ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6510if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006511
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006512else
Martin v. Löwis11437992002-04-12 09:54:03 +00006513
6514cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006515#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006516_ACEOF
6517
6518fi
6519
Matthias Kloseb9621712010-04-24 17:59:49 +00006520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6521$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6522if test "${ac_cv_type_uid_t+set}" = set; then :
6523 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006524else
Matthias Kloseb9621712010-04-24 17:59:49 +00006525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006526/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006527#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006528
6529_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006530if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006531 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006532 ac_cv_type_uid_t=yes
6533else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006534 ac_cv_type_uid_t=no
6535fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006536rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006537
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006538fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6540$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006541if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006542
Matthias Kloseb9621712010-04-24 17:59:49 +00006543$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006544
6545
Matthias Kloseb9621712010-04-24 17:59:49 +00006546$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006547
6548fi
6549
Matthias Kloseb9621712010-04-24 17:59:49 +00006550ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6551case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006552 no|yes) ;; #(
6553 *)
6554
Matthias Kloseb9621712010-04-24 17:59:49 +00006555$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006556
6557
6558cat >>confdefs.h <<_ACEOF
6559#define uint32_t $ac_cv_c_uint32_t
6560_ACEOF
6561;;
6562 esac
6563
Matthias Kloseb9621712010-04-24 17:59:49 +00006564ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6565case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006566 no|yes) ;; #(
6567 *)
6568
Matthias Kloseb9621712010-04-24 17:59:49 +00006569$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006570
6571
6572cat >>confdefs.h <<_ACEOF
6573#define uint64_t $ac_cv_c_uint64_t
6574_ACEOF
6575;;
6576 esac
6577
Matthias Kloseb9621712010-04-24 17:59:49 +00006578ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6579case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006580 no|yes) ;; #(
6581 *)
6582
6583cat >>confdefs.h <<_ACEOF
6584#define int32_t $ac_cv_c_int32_t
6585_ACEOF
6586;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006587esac
6588
Matthias Kloseb9621712010-04-24 17:59:49 +00006589ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6590case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006591 no|yes) ;; #(
6592 *)
6593
6594cat >>confdefs.h <<_ACEOF
6595#define int64_t $ac_cv_c_int64_t
6596_ACEOF
6597;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006598esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006599
Matthias Kloseb9621712010-04-24 17:59:49 +00006600ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6601if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006602
Matthias Kloseb9621712010-04-24 17:59:49 +00006603$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006604
6605fi
6606
Jack Jansendd19cf82001-12-06 22:36:17 +00006607
Michael W. Hudson54241132001-12-07 15:38:26 +00006608# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006609# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006610# The cast to long int works around a bug in the HP C Compiler
6611# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6612# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6613# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6615$as_echo_n "checking size of int... " >&6; }
6616if test "${ac_cv_sizeof_int+set}" = set; then :
6617 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006618else
Matthias Kloseb9621712010-04-24 17:59:49 +00006619 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 +00006620
Martin v. Löwis11437992002-04-12 09:54:03 +00006621else
Matthias Kloseb9621712010-04-24 17:59:49 +00006622 if test "$ac_cv_type_int" = yes; then
6623 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6624$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6625{ as_fn_set_status 77
6626as_fn_error "cannot compute sizeof (int)
6627See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006628 else
6629 ac_cv_sizeof_int=0
6630 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006632
Martin v. Löwis11437992002-04-12 09:54:03 +00006633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6635$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006636
6637
6638
Martin v. Löwis11437992002-04-12 09:54:03 +00006639cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006640#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006641_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006642
6643
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006644# The cast to long int works around a bug in the HP C Compiler
6645# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6646# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6647# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6649$as_echo_n "checking size of long... " >&6; }
6650if test "${ac_cv_sizeof_long+set}" = set; then :
6651 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006652else
Matthias Kloseb9621712010-04-24 17:59:49 +00006653 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 +00006654
Martin v. Löwis11437992002-04-12 09:54:03 +00006655else
Matthias Kloseb9621712010-04-24 17:59:49 +00006656 if test "$ac_cv_type_long" = yes; then
6657 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6658$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6659{ as_fn_set_status 77
6660as_fn_error "cannot compute sizeof (long)
6661See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006662 else
6663 ac_cv_sizeof_long=0
6664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006666
Martin v. Löwis11437992002-04-12 09:54:03 +00006667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6669$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006670
6671
6672
Martin v. Löwis11437992002-04-12 09:54:03 +00006673cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006674#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006675_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006676
6677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006678# The cast to long int works around a bug in the HP C Compiler
6679# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6680# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6681# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6683$as_echo_n "checking size of void *... " >&6; }
6684if test "${ac_cv_sizeof_void_p+set}" = set; then :
6685 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006686else
Matthias Kloseb9621712010-04-24 17:59:49 +00006687 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 +00006688
Martin v. Löwis11437992002-04-12 09:54:03 +00006689else
Matthias Kloseb9621712010-04-24 17:59:49 +00006690 if test "$ac_cv_type_void_p" = yes; then
6691 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6693{ as_fn_set_status 77
6694as_fn_error "cannot compute sizeof (void *)
6695See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006696 else
6697 ac_cv_sizeof_void_p=0
6698 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006700
Martin v. Löwis11437992002-04-12 09:54:03 +00006701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6703$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006704
6705
6706
Martin v. Löwis11437992002-04-12 09:54:03 +00006707cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006708#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006709_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006710
6711
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006712# The cast to long int works around a bug in the HP C Compiler
6713# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6714# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6715# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6717$as_echo_n "checking size of short... " >&6; }
6718if test "${ac_cv_sizeof_short+set}" = set; then :
6719 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006720else
Matthias Kloseb9621712010-04-24 17:59:49 +00006721 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 +00006722
Martin v. Löwis11437992002-04-12 09:54:03 +00006723else
Matthias Kloseb9621712010-04-24 17:59:49 +00006724 if test "$ac_cv_type_short" = yes; then
6725 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6726$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6727{ as_fn_set_status 77
6728as_fn_error "cannot compute sizeof (short)
6729See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006730 else
6731 ac_cv_sizeof_short=0
6732 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006734
Martin v. Löwis11437992002-04-12 09:54:03 +00006735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6737$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006738
6739
6740
Martin v. Löwis11437992002-04-12 09:54:03 +00006741cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006742#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006743_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006744
6745
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006746# The cast to long int works around a bug in the HP C Compiler
6747# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6748# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6749# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6751$as_echo_n "checking size of float... " >&6; }
6752if test "${ac_cv_sizeof_float+set}" = set; then :
6753 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006754else
Matthias Kloseb9621712010-04-24 17:59:49 +00006755 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 +00006756
Martin v. Löwis11437992002-04-12 09:54:03 +00006757else
Matthias Kloseb9621712010-04-24 17:59:49 +00006758 if test "$ac_cv_type_float" = yes; then
6759 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6760$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6761{ as_fn_set_status 77
6762as_fn_error "cannot compute sizeof (float)
6763See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006764 else
6765 ac_cv_sizeof_float=0
6766 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006768
Martin v. Löwis11437992002-04-12 09:54:03 +00006769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6771$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006772
6773
6774
Martin v. Löwis11437992002-04-12 09:54:03 +00006775cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006776#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006777_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006778
6779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006780# The cast to long int works around a bug in the HP C Compiler
6781# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6782# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6783# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6785$as_echo_n "checking size of double... " >&6; }
6786if test "${ac_cv_sizeof_double+set}" = set; then :
6787 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006788else
Matthias Kloseb9621712010-04-24 17:59:49 +00006789 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 +00006790
Martin v. Löwis11437992002-04-12 09:54:03 +00006791else
Matthias Kloseb9621712010-04-24 17:59:49 +00006792 if test "$ac_cv_type_double" = yes; then
6793 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6794$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6795{ as_fn_set_status 77
6796as_fn_error "cannot compute sizeof (double)
6797See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006798 else
6799 ac_cv_sizeof_double=0
6800 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006802
Martin v. Löwis11437992002-04-12 09:54:03 +00006803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6805$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006806
6807
6808
Martin v. Löwis11437992002-04-12 09:54:03 +00006809cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006810#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006811_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006812
6813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006814# The cast to long int works around a bug in the HP C Compiler
6815# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6816# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6817# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6819$as_echo_n "checking size of fpos_t... " >&6; }
6820if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6821 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006822else
Matthias Kloseb9621712010-04-24 17:59:49 +00006823 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 +00006824
Martin v. Löwis11437992002-04-12 09:54:03 +00006825else
Matthias Kloseb9621712010-04-24 17:59:49 +00006826 if test "$ac_cv_type_fpos_t" = yes; then
6827 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6828$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6829{ as_fn_set_status 77
6830as_fn_error "cannot compute sizeof (fpos_t)
6831See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006832 else
6833 ac_cv_sizeof_fpos_t=0
6834 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006836
Martin v. Löwis11437992002-04-12 09:54:03 +00006837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6839$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006840
6841
6842
Martin v. Löwis11437992002-04-12 09:54:03 +00006843cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006844#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006845_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006846
Michael W. Hudson54241132001-12-07 15:38:26 +00006847
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006848# The cast to long int works around a bug in the HP C Compiler
6849# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6850# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6851# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6853$as_echo_n "checking size of size_t... " >&6; }
6854if test "${ac_cv_sizeof_size_t+set}" = set; then :
6855 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006856else
Matthias Kloseb9621712010-04-24 17:59:49 +00006857 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 +00006858
Martin v. Löwis18e16552006-02-15 17:27:45 +00006859else
Matthias Kloseb9621712010-04-24 17:59:49 +00006860 if test "$ac_cv_type_size_t" = yes; then
6861 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6863{ as_fn_set_status 77
6864as_fn_error "cannot compute sizeof (size_t)
6865See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006866 else
6867 ac_cv_sizeof_size_t=0
6868 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006870
Martin v. Löwis18e16552006-02-15 17:27:45 +00006871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6873$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006874
6875
6876
Martin v. Löwis18e16552006-02-15 17:27:45 +00006877cat >>confdefs.h <<_ACEOF
6878#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6879_ACEOF
6880
6881
Christian Heimes400adb02008-02-01 08:12:03 +00006882# The cast to long int works around a bug in the HP C Compiler
6883# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6884# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6885# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6887$as_echo_n "checking size of pid_t... " >&6; }
6888if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6889 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006890else
Matthias Kloseb9621712010-04-24 17:59:49 +00006891 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 +00006892
Christian Heimes400adb02008-02-01 08:12:03 +00006893else
Matthias Kloseb9621712010-04-24 17:59:49 +00006894 if test "$ac_cv_type_pid_t" = yes; then
6895 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6896$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6897{ as_fn_set_status 77
6898as_fn_error "cannot compute sizeof (pid_t)
6899See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006900 else
6901 ac_cv_sizeof_pid_t=0
6902 fi
6903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006904
Christian Heimes400adb02008-02-01 08:12:03 +00006905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6907$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006908
6909
6910
6911cat >>confdefs.h <<_ACEOF
6912#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6913_ACEOF
6914
6915
Michael W. Hudson54241132001-12-07 15:38:26 +00006916
Matthias Kloseb9621712010-04-24 17:59:49 +00006917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6918$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006919have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006921/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006922
Martin v. Löwis11437992002-04-12 09:54:03 +00006923int
6924main ()
6925{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006926long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006927 ;
6928 return 0;
6929}
6930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006931if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006932
6933
Matthias Kloseb9621712010-04-24 17:59:49 +00006934$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006935
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006936 have_long_long=yes
6937
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6941$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006942if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006943# The cast to long int works around a bug in the HP C Compiler
6944# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6945# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6946# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6948$as_echo_n "checking size of long long... " >&6; }
6949if test "${ac_cv_sizeof_long_long+set}" = set; then :
6950 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006951else
Matthias Kloseb9621712010-04-24 17:59:49 +00006952 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 +00006953
Martin v. Löwis11437992002-04-12 09:54:03 +00006954else
Matthias Kloseb9621712010-04-24 17:59:49 +00006955 if test "$ac_cv_type_long_long" = yes; then
6956 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6957$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6958{ as_fn_set_status 77
6959as_fn_error "cannot compute sizeof (long long)
6960See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006961 else
6962 ac_cv_sizeof_long_long=0
6963 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006965
Martin v. Löwis11437992002-04-12 09:54:03 +00006966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6968$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006969
6970
6971
Martin v. Löwis11437992002-04-12 09:54:03 +00006972cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006973#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006974_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006975
Michael W. Hudson54241132001-12-07 15:38:26 +00006976
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006977fi
6978
Matthias Kloseb9621712010-04-24 17:59:49 +00006979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6980$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006981have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006983/* end confdefs.h. */
6984
6985int
6986main ()
6987{
6988long double x; x = (long double)0;
6989 ;
6990 return 0;
6991}
6992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006993if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006994
6995
Matthias Kloseb9621712010-04-24 17:59:49 +00006996$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006997
6998 have_long_double=yes
6999
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007000fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7003$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007004if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007005# The cast to long int works around a bug in the HP C Compiler
7006# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7007# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7008# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7010$as_echo_n "checking size of long double... " >&6; }
7011if test "${ac_cv_sizeof_long_double+set}" = set; then :
7012 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007013else
Matthias Kloseb9621712010-04-24 17:59:49 +00007014 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 +00007015
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007016else
Matthias Kloseb9621712010-04-24 17:59:49 +00007017 if test "$ac_cv_type_long_double" = yes; then
7018 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7020{ as_fn_set_status 77
7021as_fn_error "cannot compute sizeof (long double)
7022See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007023 else
7024 ac_cv_sizeof_long_double=0
7025 fi
7026fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007027
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007028fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7030$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007031
7032
7033
7034cat >>confdefs.h <<_ACEOF
7035#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7036_ACEOF
7037
7038
7039fi
7040
7041
Matthias Kloseb9621712010-04-24 17:59:49 +00007042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7043$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007044have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007046/* end confdefs.h. */
7047
7048int
7049main ()
7050{
7051_Bool x; x = (_Bool)0;
7052 ;
7053 return 0;
7054}
7055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007056if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007057
7058
Matthias Kloseb9621712010-04-24 17:59:49 +00007059$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007060
7061 have_c99_bool=yes
7062
Thomas Woutersb2137042007-02-01 18:02:27 +00007063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7066$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007067if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007068# The cast to long int works around a bug in the HP C Compiler
7069# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7070# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7071# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7073$as_echo_n "checking size of _Bool... " >&6; }
7074if test "${ac_cv_sizeof__Bool+set}" = set; then :
7075 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007076else
Matthias Kloseb9621712010-04-24 17:59:49 +00007077 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 +00007078
Thomas Woutersb2137042007-02-01 18:02:27 +00007079else
Matthias Kloseb9621712010-04-24 17:59:49 +00007080 if test "$ac_cv_type__Bool" = yes; then
7081 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7082$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7083{ as_fn_set_status 77
7084as_fn_error "cannot compute sizeof (_Bool)
7085See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007086 else
7087 ac_cv_sizeof__Bool=0
7088 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007089fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007090
Thomas Woutersb2137042007-02-01 18:02:27 +00007091fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7093$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007094
7095
7096
Thomas Woutersb2137042007-02-01 18:02:27 +00007097cat >>confdefs.h <<_ACEOF
7098#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7099_ACEOF
7100
7101
7102fi
7103
Matthias Kloseb9621712010-04-24 17:59:49 +00007104ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007105 #include <stdint.h>
7106 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007107"
7108if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007109
7110cat >>confdefs.h <<_ACEOF
7111#define HAVE_UINTPTR_T 1
7112_ACEOF
7113
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007114# The cast to long int works around a bug in the HP C Compiler
7115# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7116# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7117# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7119$as_echo_n "checking size of uintptr_t... " >&6; }
7120if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7121 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007122else
Matthias Kloseb9621712010-04-24 17:59:49 +00007123 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 +00007124
Martin v. Löwis11437992002-04-12 09:54:03 +00007125else
Matthias Kloseb9621712010-04-24 17:59:49 +00007126 if test "$ac_cv_type_uintptr_t" = yes; then
7127 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7128$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7129{ as_fn_set_status 77
7130as_fn_error "cannot compute sizeof (uintptr_t)
7131See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007132 else
7133 ac_cv_sizeof_uintptr_t=0
7134 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007136
Martin v. Löwis11437992002-04-12 09:54:03 +00007137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7139$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007140
7141
7142
Martin v. Löwis11437992002-04-12 09:54:03 +00007143cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007144#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007145_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007146
Michael W. Hudson54241132001-12-07 15:38:26 +00007147
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007148fi
7149
Thomas Wouters89f507f2006-12-13 04:49:30 +00007150
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007151# The cast to long int works around a bug in the HP C Compiler
7152# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7153# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7154# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7156$as_echo_n "checking size of off_t... " >&6; }
7157if test "${ac_cv_sizeof_off_t+set}" = set; then :
7158 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007159else
Matthias Kloseb9621712010-04-24 17:59:49 +00007160 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007161#ifdef HAVE_SYS_TYPES_H
7162#include <sys/types.h>
7163#endif
7164
Matthias Kloseb9621712010-04-24 17:59:49 +00007165"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007166
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007167else
Matthias Kloseb9621712010-04-24 17:59:49 +00007168 if test "$ac_cv_type_off_t" = yes; then
7169 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7171{ as_fn_set_status 77
7172as_fn_error "cannot compute sizeof (off_t)
7173See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007174 else
7175 ac_cv_sizeof_off_t=0
7176 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007178
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7181$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007182
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007183
7184
Martin v. Löwis11437992002-04-12 09:54:03 +00007185cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007186#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007187_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007188
Michael W. Hudson54241132001-12-07 15:38:26 +00007189
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007190
Matthias Kloseb9621712010-04-24 17:59:49 +00007191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7192$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007193if test "$have_long_long" = yes
7194then
7195if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007196 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007197
Matthias Kloseb9621712010-04-24 17:59:49 +00007198$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007199
Matthias Kloseb9621712010-04-24 17:59:49 +00007200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7201$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007202else
Matthias Kloseb9621712010-04-24 17:59:49 +00007203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7204$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007205fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007206else
Matthias Kloseb9621712010-04-24 17:59:49 +00007207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7208$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007209fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007210
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007211# The cast to long int works around a bug in the HP C Compiler
7212# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7213# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7214# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7216$as_echo_n "checking size of time_t... " >&6; }
7217if test "${ac_cv_sizeof_time_t+set}" = set; then :
7218 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007219else
Matthias Kloseb9621712010-04-24 17:59:49 +00007220 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007221#ifdef HAVE_SYS_TYPES_H
7222#include <sys/types.h>
7223#endif
7224#ifdef HAVE_TIME_H
7225#include <time.h>
7226#endif
7227
Matthias Kloseb9621712010-04-24 17:59:49 +00007228"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007229
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007230else
Matthias Kloseb9621712010-04-24 17:59:49 +00007231 if test "$ac_cv_type_time_t" = yes; then
7232 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7233$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7234{ as_fn_set_status 77
7235as_fn_error "cannot compute sizeof (time_t)
7236See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007237 else
7238 ac_cv_sizeof_time_t=0
7239 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007240fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007241
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7244$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007245
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007246
7247
Martin v. Löwis11437992002-04-12 09:54:03 +00007248cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007249#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007250_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007251
Michael W. Hudson54241132001-12-07 15:38:26 +00007252
7253
Trent Mick635f6fb2000-08-23 21:33:05 +00007254# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007255ac_save_cc="$CC"
7256if test "$ac_cv_kpthread" = "yes"
7257then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007258elif test "$ac_cv_kthread" = "yes"
7259then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007260elif test "$ac_cv_pthread" = "yes"
7261then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007262fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007263
Matthias Kloseb9621712010-04-24 17:59:49 +00007264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7265$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007266have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007268/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007269
7270 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007271int
7272main ()
7273{
Guido van Rossum12580492000-09-24 16:47:19 +00007274pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007275 ;
7276 return 0;
7277}
Matthias Kloseb159a552010-04-25 21:00:44 +00007278
Martin v. Löwis11437992002-04-12 09:54:03 +00007279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007280if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007281 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7285$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007286if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007287 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007288# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7289# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7290# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7292$as_echo_n "checking size of pthread_t... " >&6; }
7293if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7294 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007295else
Matthias Kloseb9621712010-04-24 17:59:49 +00007296 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007297#ifdef HAVE_PTHREAD_H
7298#include <pthread.h>
7299#endif
7300
Matthias Kloseb9621712010-04-24 17:59:49 +00007301"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007302
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007303else
Matthias Kloseb9621712010-04-24 17:59:49 +00007304 if test "$ac_cv_type_pthread_t" = yes; then
7305 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7306$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7307{ as_fn_set_status 77
7308as_fn_error "cannot compute sizeof (pthread_t)
7309See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007310 else
7311 ac_cv_sizeof_pthread_t=0
7312 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007314
Trent Mick635f6fb2000-08-23 21:33:05 +00007315fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7317$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007318
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007319
7320
Martin v. Löwis11437992002-04-12 09:54:03 +00007321cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007322#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007323_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007324
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007325
Trent Mick635f6fb2000-08-23 21:33:05 +00007326fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007327CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007328
Michael W. Hudson54241132001-12-07 15:38:26 +00007329
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007330case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007331 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007332 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7333 ;;
7334 Darwin/*)
7335 OTHER_LIBTOOL_OPT=""
7336 ;;
7337esac
7338
7339
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007340ARCH_RUN_32BIT=""
7341
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007342case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007343 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007344 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7345 if test "${enable_universalsdk}"; then
7346 :
7347 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007348 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007349 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007350 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007351 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007352 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007353 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007354 if test ${gcc_version} '<' 4.0
7355 then
7356 LIBTOOL_CRUFT="-lcc_dynamic"
7357 else
7358 LIBTOOL_CRUFT=""
7359 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007360 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007361 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007362else
Matthias Kloseb9621712010-04-24 17:59:49 +00007363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007364/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007365
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007366 #include <unistd.h>
7367 int main(int argc, char*argv[])
7368 {
7369 if (sizeof(long) == 4) {
7370 return 0;
7371 } else {
7372 return 1;
7373 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007374 }
7375
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007377if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007378 ac_osx_32bit=yes
7379else
Matthias Kloseb9621712010-04-24 17:59:49 +00007380 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007381fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007382rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7383 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007384fi
7385
7386
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007387 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007388 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007389 i386)
7390 MACOSX_DEFAULT_ARCH="i386"
7391 ;;
7392 ppc)
7393 MACOSX_DEFAULT_ARCH="ppc"
7394 ;;
7395 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007396 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007397 ;;
7398 esac
7399 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007400 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007401 i386)
7402 MACOSX_DEFAULT_ARCH="x86_64"
7403 ;;
7404 ppc)
7405 MACOSX_DEFAULT_ARCH="ppc64"
7406 ;;
7407 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007408 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007409 ;;
7410 esac
7411
7412 #ARCH_RUN_32BIT="true"
7413 fi
7414
7415 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007416 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007417 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007418esac
7419
Matthias Kloseb9621712010-04-24 17:59:49 +00007420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7421$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007422if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007423then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007424 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007425 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007426 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007427
Matthias Kloseb9621712010-04-24 17:59:49 +00007428$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007429
Matthias Kloseb9621712010-04-24 17:59:49 +00007430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7431$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007432 if test $enable_shared = "yes"
7433 then
Matthias Kloseb9621712010-04-24 17:59:49 +00007434 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 +00007435 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007436else
Matthias Kloseb9621712010-04-24 17:59:49 +00007437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7438$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007439fi
7440
Matthias Kloseb9621712010-04-24 17:59:49 +00007441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7442$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007443case $ac_sys_system/$ac_sys_release in
7444 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007445
Matthias Kloseb9621712010-04-24 17:59:49 +00007446$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007447
Matthias Kloseb9621712010-04-24 17:59:49 +00007448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7449$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007450 ;;
7451 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7453$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007454 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007455esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007456
Guido van Rossum0a516c91994-09-12 10:58:40 +00007457# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007458
Michael W. Hudson54241132001-12-07 15:38:26 +00007459
7460
7461
7462
Benjamin Peterson99f03762010-04-11 22:15:28 +00007463
Guido van Rossum0a516c91994-09-12 10:58:40 +00007464# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007465# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Kloseb9621712010-04-24 17:59:49 +00007466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7467$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007468if test -z "$SO"
7469then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007470 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +00007471 hp*|HP*)
7472 case `uname -m` in
7473 ia64) SO=.so;;
7474 *) SO=.sl;;
7475 esac
7476 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007477 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007478 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007479 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007480else
7481 # this might also be a termcap variable, see #610332
7482 echo
7483 echo '====================================================================='
7484 echo '+ +'
7485 echo '+ WARNING: You have set SO in your environment. +'
7486 echo '+ Do you really mean to change the extension for shared libraries? +'
7487 echo '+ Continuing in 10 seconds to let you to ponder. +'
7488 echo '+ +'
7489 echo '====================================================================='
7490 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7493$as_echo "$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00007494
Georg Brandlb1441c72009-01-03 22:33:39 +00007495
Thomas Wouters477c8d52006-05-27 19:21:47 +00007496cat >>confdefs.h <<_ACEOF
7497#define SHLIB_EXT "$SO"
7498_ACEOF
7499
Guido van Rossum0a516c91994-09-12 10:58:40 +00007500# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007501# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007502# (Shared libraries in this instance are shared modules to be loaded into
7503# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7505$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007506if test -z "$LDSHARED"
7507then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007508 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007509 AIX*)
7510 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007511 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007512 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007513 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007514 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007515 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007516 if test "$GCC" = "yes" ; then
7517 LDSHARED='$(CC) -shared'
7518 LDCXXSHARED='$(CXX) -shared'
7519 else
7520 LDSHARED='$(CC) -G'
7521 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007522 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007523 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007524 if test "$GCC" = "yes" ; then
7525 LDSHARED='$(CC) -shared'
7526 LDCXXSHARED='$(CXX) -shared'
7527 else
7528 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007529 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007530 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007531 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00007532 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007533 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007534 if test "$enable_framework" ; then
7535 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007536 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7537 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007538 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007539 else
7540 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007541 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007542 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007543 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007544 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00007545 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007546 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007547 if test "$enable_framework" ; then
7548 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007549 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7550 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007551 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007552 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007553 # No framework, use the Python app as bundle-loader
7554 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007555 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007556 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007557 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007558 Darwin/*)
7559 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7560 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007561
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007562 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007563 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007564 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007565 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007566 fi
Jack Jansen6b08a402004-06-03 12:41:45 +00007567 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007568 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007569 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007570 else
7571 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007572 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007573 if test "$enable_framework" ; then
7574 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007575 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7576 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007577 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007578 else
7579 # No framework, use the Python app as bundle-loader
7580 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7581 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007582 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007583 fi
7584 fi
7585 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007586 Linux*|GNU*|QNX*)
7587 LDSHARED='$(CC) -shared'
7588 LDCXXSHARED='$(CXX) -shared';;
7589 BSD/OS*/4*)
7590 LDSHARED="gcc -shared"
7591 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007592 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007593 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007594 then
Benjamin Petersonab0a7522010-03-14 15:18:25 +00007595 LDSHARED='$(CC) -shared ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007596 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007597 else
7598 LDSHARED="ld -Bshareable ${LDFLAGS}"
7599 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007600 OpenBSD*)
7601 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7602 then
7603 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007604 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007605 else
7606 case `uname -r` in
7607 [01].* | 2.[0-7] | 2.[0-7].*)
7608 LDSHARED="ld -Bshareable ${LDFLAGS}"
7609 ;;
7610 *)
7611 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007612 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007613 ;;
7614 esac
7615 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007616 NetBSD*|DragonFly*)
7617 LDSHARED="cc -shared ${LDFLAGS}"
7618 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007619 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007620 if test "$GCC" = "yes" ; then
7621 LDSHARED='$(CC) -shared'
7622 LDCXXSHARED='$(CXX) -shared'
7623 else
7624 LDSHARED='$(CC) -G'
7625 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007626 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007627 SCO_SV*)
7628 LDSHARED='$(CC) -Wl,-G,-Bexport'
7629 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7630 CYGWIN*)
7631 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7632 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007633 *) LDSHARED="ld";;
7634 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7637$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007638LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007639BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007640# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007641# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7643$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007644if test -z "$CCSHARED"
7645then
Guido van Rossum07397971997-04-29 21:49:50 +00007646 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007647 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007648 then CCSHARED="-fPIC";
7649 elif test `uname -p` = sparc;
7650 then CCSHARED="-xcode=pic32";
7651 else CCSHARED="-Kpic";
7652 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007653 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007654 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007655 else CCSHARED="+z";
7656 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007657 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007658 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007659 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007660 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007661 if test "$GCC" = "yes"
7662 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007663 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007664 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007665 SCO_SV*)
7666 if test "$GCC" = "yes"
7667 then CCSHARED="-fPIC"
7668 else CCSHARED="-Kpic -belf"
7669 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007670 IRIX*/6*) case $CC in
7671 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007672 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007673 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007674 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7677$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007678# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007679# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7681$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007682if test -z "$LINKFORSHARED"
7683then
Guido van Rossum07397971997-04-29 21:49:50 +00007684 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007685 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007686 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007687 LINKFORSHARED="-Wl,-E -Wl,+s";;
7688# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007689 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007690 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007691 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007692 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007693 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007694 if test "$enable_framework"
7695 then
Jack Jansenda49e192005-01-07 13:08:22 +00007696 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007697 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007698 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007699 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007700 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007701 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007702 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007703 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7704 then
7705 LINKFORSHARED="-Wl,--export-dynamic"
7706 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007707 SunOS/5*) case $CC in
7708 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007709 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007710 then
7711 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007712 fi;;
7713 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007714 CYGWIN*)
7715 if test $enable_shared = "no"
7716 then
7717 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7718 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007719 QNX*)
7720 # -Wl,-E causes the symbols to be added to the dynamic
7721 # symbol table so that they can be found when a module
7722 # is loaded. -N 2048K causes the stack size to be set
7723 # to 2048 kilobytes so that the stack doesn't overflow
7724 # when running test_compile.py.
7725 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007726 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7729$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007730
Michael W. Hudson54241132001-12-07 15:38:26 +00007731
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007732
Matthias Kloseb9621712010-04-24 17:59:49 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7734$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007735if test ! "$LIBRARY" = "$LDLIBRARY"
7736then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007737 case $ac_sys_system in
7738 CYGWIN*)
7739 # Cygwin needs CCSHARED when building extension DLLs
7740 # but not when building the interpreter DLL.
7741 CFLAGSFORSHARED='';;
7742 *)
7743 CFLAGSFORSHARED='$(CCSHARED)'
7744 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7747$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007748
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007749# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7750# library (with --enable-shared).
7751# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007752# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7753# if it is not required, since it creates a dependency of the shared library
7754# to LIBS. This, in turn, means that applications linking the shared libpython
7755# don't need to link LIBS explicitly. The default should be only changed
7756# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007757
Matthias Kloseb9621712010-04-24 17:59:49 +00007758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7759$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007760case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007761 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007762 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007763esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7765$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007766
7767
Guido van Rossum627b2d71993-12-24 10:39:16 +00007768# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7770$as_echo_n "checking for dlopen in -ldl... " >&6; }
7771if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7772 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007773else
Martin v. Löwis11437992002-04-12 09:54:03 +00007774 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007775LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007779/* Override any GCC internal prototype to avoid an error.
7780 Use char because int might match the return type of a GCC
7781 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007782#ifdef __cplusplus
7783extern "C"
7784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007785char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007786int
7787main ()
7788{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007789return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007790 ;
7791 return 0;
7792}
7793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007794if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007795 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007796else
Matthias Kloseb9621712010-04-24 17:59:49 +00007797 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007799rm -f core conftest.err conftest.$ac_objext \
7800 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007801LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7804$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7805if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007806 cat >>confdefs.h <<_ACEOF
7807#define HAVE_LIBDL 1
7808_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007809
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007810 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007811
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007812fi
7813 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7815$as_echo_n "checking for shl_load in -ldld... " >&6; }
7816if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7817 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007818else
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007820LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007824/* Override any GCC internal prototype to avoid an error.
7825 Use char because int might match the return type of a GCC
7826 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007827#ifdef __cplusplus
7828extern "C"
7829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007830char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007831int
7832main ()
7833{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007835 ;
7836 return 0;
7837}
7838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007839if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007840 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007841else
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007844rm -f core conftest.err conftest.$ac_objext \
7845 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007846LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7849$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7850if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007851 cat >>confdefs.h <<_ACEOF
7852#define HAVE_LIBDLD 1
7853_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007854
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007855 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007856
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007857fi
7858 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007859
Georg Brandlb1441c72009-01-03 22:33:39 +00007860# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007861if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7863$as_echo_n "checking for library containing sem_init... " >&6; }
7864if test "${ac_cv_search_sem_init+set}" = set; then :
7865 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007866else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007867 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007870
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007871/* Override any GCC internal prototype to avoid an error.
7872 Use char because int might match the return type of a GCC
7873 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007874#ifdef __cplusplus
7875extern "C"
7876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007877char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007878int
7879main ()
7880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007882 ;
7883 return 0;
7884}
7885_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007886for ac_lib in '' pthread rt posix4; do
7887 if test -z "$ac_lib"; then
7888 ac_res="none required"
7889 else
7890 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007891 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007893 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007896rm -f core conftest.err conftest.$ac_objext \
7897 conftest$ac_exeext
7898 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007899 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901done
Matthias Kloseb9621712010-04-24 17:59:49 +00007902if test "${ac_cv_search_sem_init+set}" = set; then :
7903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007904else
7905 ac_cv_search_sem_init=no
7906fi
7907rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007908LIBS=$ac_func_search_save_LIBS
7909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7911$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007913if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007914 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007915
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007916fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007917 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007918 # posix4 on Solaris 2.6
7919 # pthread (first!) on Linux
7920fi
7921
Martin v. Löwis19d17342003-06-14 21:03:05 +00007922# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7924$as_echo_n "checking for textdomain in -lintl... " >&6; }
7925if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7926 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007927else
7928 ac_check_lib_save_LIBS=$LIBS
7929LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007931/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007933/* Override any GCC internal prototype to avoid an error.
7934 Use char because int might match the return type of a GCC
7935 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007936#ifdef __cplusplus
7937extern "C"
7938#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007939char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007940int
7941main ()
7942{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007944 ;
7945 return 0;
7946}
7947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007948if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007949 ac_cv_lib_intl_textdomain=yes
7950else
Matthias Kloseb9621712010-04-24 17:59:49 +00007951 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007953rm -f core conftest.err conftest.$ac_objext \
7954 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007955LIBS=$ac_check_lib_save_LIBS
7956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7958$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7959if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007960
Matthias Kloseb9621712010-04-24 17:59:49 +00007961$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007962
Brett Cannonc6d936e2009-06-07 20:09:53 +00007963 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007964fi
7965
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007966
7967# checks for system dependent C++ extensions support
7968case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007969 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7970$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007972/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007973
7974 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007975int
7976main ()
7977{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007978loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007979 ;
7980 return 0;
7981}
Matthias Kloseb159a552010-04-25 21:00:44 +00007982
Martin v. Löwis11437992002-04-12 09:54:03 +00007983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007984if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007985
Matthias Kloseb159a552010-04-25 21:00:44 +00007986
Matthias Kloseb9621712010-04-24 17:59:49 +00007987$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007988
Matthias Kloseb159a552010-04-25 21:00:44 +00007989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007990$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007991
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007992else
Matthias Kloseb159a552010-04-25 21:00:44 +00007993
7994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007995$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007996
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007998rm -f core conftest.err conftest.$ac_objext \
7999 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008000 *) ;;
8001esac
8002
Guido van Rossum70c7f481998-03-26 18:44:10 +00008003# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8005$as_echo_n "checking for t_open in -lnsl... " >&6; }
8006if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
8007 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008008else
Martin v. Löwis11437992002-04-12 09:54:03 +00008009 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008010LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008012/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008013
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014/* Override any GCC internal prototype to avoid an error.
8015 Use char because int might match the return type of a GCC
8016 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008017#ifdef __cplusplus
8018extern "C"
8019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008020char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008021int
8022main ()
8023{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008024return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008025 ;
8026 return 0;
8027}
8028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008029if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008030 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008031else
Matthias Kloseb9621712010-04-24 17:59:49 +00008032 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008034rm -f core conftest.err conftest.$ac_objext \
8035 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008036LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8039$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
8040if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008041 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008042fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008043 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8045$as_echo_n "checking for socket in -lsocket... " >&6; }
8046if test "${ac_cv_lib_socket_socket+set}" = set; then :
8047 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008048else
Martin v. Löwis11437992002-04-12 09:54:03 +00008049 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008050LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008052/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054/* Override any GCC internal prototype to avoid an error.
8055 Use char because int might match the return type of a GCC
8056 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008057#ifdef __cplusplus
8058extern "C"
8059#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008060char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008061int
8062main ()
8063{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008065 ;
8066 return 0;
8067}
8068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008069if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008070 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008071else
Matthias Kloseb9621712010-04-24 17:59:49 +00008072 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008074rm -f core conftest.err conftest.$ac_objext \
8075 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008076LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8079$as_echo "$ac_cv_lib_socket_socket" >&6; }
8080if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008081 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008082fi
8083 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008084
Matthias Kloseb9621712010-04-24 17:59:49 +00008085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8086$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008087
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008088# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008089if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008090 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8092$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008093LIBS="$withval $LIBS"
8094
8095else
Matthias Kloseb9621712010-04-24 17:59:49 +00008096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8097$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008098fi
8099
Guido van Rossum7f43da71994-08-01 12:15:30 +00008100
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008101if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008102 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8103set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8105$as_echo_n "checking for $ac_word... " >&6; }
8106if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8107 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008108else
8109 case $PKG_CONFIG in
8110 [\\/]* | ?:[\\/]*)
8111 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8112 ;;
8113 *)
8114 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8115for as_dir in $PATH
8116do
8117 IFS=$as_save_IFS
8118 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008119 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008120 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8121 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008122 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008123 break 2
8124 fi
8125done
Matthias Kloseb9621712010-04-24 17:59:49 +00008126 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008127IFS=$as_save_IFS
8128
8129 ;;
8130esac
8131fi
8132PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8133if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8135$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008136else
Matthias Kloseb9621712010-04-24 17:59:49 +00008137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8138$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008139fi
8140
8141
8142fi
8143if test -z "$ac_cv_path_PKG_CONFIG"; then
8144 ac_pt_PKG_CONFIG=$PKG_CONFIG
8145 # Extract the first word of "pkg-config", so it can be a program name with args.
8146set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8148$as_echo_n "checking for $ac_word... " >&6; }
8149if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8150 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008151else
8152 case $ac_pt_PKG_CONFIG in
8153 [\\/]* | ?:[\\/]*)
8154 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8155 ;;
8156 *)
8157 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8158for as_dir in $PATH
8159do
8160 IFS=$as_save_IFS
8161 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008162 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008163 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8164 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008165 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008166 break 2
8167 fi
8168done
Matthias Kloseb9621712010-04-24 17:59:49 +00008169 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008170IFS=$as_save_IFS
8171
8172 ;;
8173esac
8174fi
8175ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8176if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8178$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008179else
Matthias Kloseb9621712010-04-24 17:59:49 +00008180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8181$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008182fi
8183
8184 if test "x$ac_pt_PKG_CONFIG" = x; then
8185 PKG_CONFIG=""
8186 else
8187 case $cross_compiling:$ac_tool_warned in
8188yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008189{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8190$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008191ac_tool_warned=yes ;;
8192esac
8193 PKG_CONFIG=$ac_pt_PKG_CONFIG
8194 fi
8195else
8196 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8197fi
8198
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008199
8200# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8202$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008203
8204# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008205if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008206 withval=$with_system_expat;
8207fi
8208
8209
Matthias Kloseb9621712010-04-24 17:59:49 +00008210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8211$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008212
8213# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8215$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008216
8217# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008218if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008219 withval=$with_system_ffi;
8220fi
8221
8222
8223if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008224 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8225else
8226 LIBFFI_INCLUDEDIR=""
8227fi
8228
8229
Matthias Kloseb9621712010-04-24 17:59:49 +00008230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8231$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008232
Matthias Klose55708cc2009-04-30 08:06:49 +00008233# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8235$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008236
8237# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008238if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008239 withval=$with_dbmliborder;
8240if test x$with_dbmliborder = xyes
8241then
Matthias Kloseb9621712010-04-24 17:59:49 +00008242as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008243else
8244 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8245 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8246 then
Matthias Kloseb9621712010-04-24 17:59:49 +00008247 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008248 fi
8249 done
8250fi
8251fi
8252
Matthias Kloseb9621712010-04-24 17:59:49 +00008253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8254$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008255
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008256# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008257
8258
Matthias Kloseb9621712010-04-24 17:59:49 +00008259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8260$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008261
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008262# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008263if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008264 withval=$with_signal_module;
8265fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008266
8267
8268if test -z "$with_signal_module"
8269then with_signal_module="yes"
8270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8272$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008273
8274if test "${with_signal_module}" = "yes"; then
8275 USE_SIGNAL_MODULE=""
8276 SIGNAL_OBJS=""
8277else
8278 USE_SIGNAL_MODULE="#"
8279 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8280fi
8281
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008282# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008283
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008284USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008285
Matthias Kloseb9621712010-04-24 17:59:49 +00008286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8287$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008288
Guido van Rossumec2f0731997-01-22 20:54:01 +00008289
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008290# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008291if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008292 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8294$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008295LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008296if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008297 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008298fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008299else
Matthias Kloseb9621712010-04-24 17:59:49 +00008300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8301$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008302fi
8303
Martin v. Löwis11437992002-04-12 09:54:03 +00008304
8305# Templates for things AC_DEFINEd more than once.
8306# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008307
8308
Martin v. Löwis11437992002-04-12 09:54:03 +00008309
8310
Matthias Kloseb9621712010-04-24 17:59:49 +00008311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8312$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008313
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008314# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008315if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008316 withval=$with_threads;
8317fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008318
8319
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008320# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008321
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008322# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008323if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008324 withval=$with_thread; with_threads=$with_thread
8325fi
8326
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008327
8328if test -z "$with_threads"
8329then with_threads="yes"
8330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8332$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008333
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008334
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008335if test "$with_threads" = "no"
8336then
8337 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008338elif test "$ac_cv_pthread_is_default" = yes
8339then
Matthias Kloseb9621712010-04-24 17:59:49 +00008340 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008341
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008342 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008343 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008344
8345 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008346 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008347elif test "$ac_cv_kpthread" = "yes"
8348then
8349 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008350 if test "$ac_cv_cxx_thread" = "yes"; then
8351 CXX="$CXX -Kpthread"
8352 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008354
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008355 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008356 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008357elif test "$ac_cv_kthread" = "yes"
8358then
8359 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008360 if test "$ac_cv_cxx_thread" = "yes"; then
8361 CXX="$CXX -Kthread"
8362 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008364
8365 posix_threads=yes
8366 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008367elif test "$ac_cv_pthread" = "yes"
8368then
8369 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008370 if test "$ac_cv_cxx_thread" = "yes"; then
8371 CXX="$CXX -pthread"
8372 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008373 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008374
8375 posix_threads=yes
8376 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008377else
8378 if test ! -z "$with_threads" -a -d "$with_threads"
8379 then LDFLAGS="$LDFLAGS -L$with_threads"
8380 fi
8381 if test ! -z "$withval" -a -d "$withval"
8382 then LDFLAGS="$LDFLAGS -L$withval"
8383 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008384
8385 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008386 # define _POSIX_THREADS in unistd.h. Some apparently don't
8387 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8389$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008391/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008392
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008393#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008394#ifdef _POSIX_THREADS
8395yes
8396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008397
8398_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008399if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008400 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008401 unistd_defines_pthreads=yes
8402else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008403 unistd_defines_pthreads=no
8404fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008405rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008406
Matthias Kloseb9621712010-04-24 17:59:49 +00008407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8408$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008409
Matthias Kloseb9621712010-04-24 17:59:49 +00008410 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008411
Matthias Kloseb9621712010-04-24 17:59:49 +00008412 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8413if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8414 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008415
Matthias Kloseb9621712010-04-24 17:59:49 +00008416 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008417
Martin v. Löwis11437992002-04-12 09:54:03 +00008418
Matthias Kloseb9621712010-04-24 17:59:49 +00008419$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008420
8421 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008422 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008423else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008424
Matthias Kloseb9621712010-04-24 17:59:49 +00008425 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8426if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8427 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008428
Matthias Kloseb9621712010-04-24 17:59:49 +00008429 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008430
Martin v. Löwis11437992002-04-12 09:54:03 +00008431
Matthias Kloseb9621712010-04-24 17:59:49 +00008432$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008433
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008434 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008435else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008436
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008437 # Just looking for pthread_create in libpthread is not enough:
8438 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8439 # So we really have to include pthread.h, and then link.
8440 _libs=$LIBS
8441 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8443$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008445/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008446#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008447
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008448void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008449int
8450main ()
8451{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008452
8453pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008454 ;
8455 return 0;
8456}
8457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008458if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008459
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8461$as_echo "yes" >&6; }
8462 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008463
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008464 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008465 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008466else
Martin v. Löwis11437992002-04-12 09:54:03 +00008467
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008468 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8470if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8471 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008472
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008473 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008474 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008475else
Guido van Rossumad678af1998-10-02 14:42:15 +00008476
Matthias Kloseb9621712010-04-24 17:59:49 +00008477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8478$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8479if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8480 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008481else
Martin v. Löwis11437992002-04-12 09:54:03 +00008482 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008483LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008485/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008486
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008487/* Override any GCC internal prototype to avoid an error.
8488 Use char because int might match the return type of a GCC
8489 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008490#ifdef __cplusplus
8491extern "C"
8492#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008493char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008494int
8495main ()
8496{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008497return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008498 ;
8499 return 0;
8500}
8501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008502if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008504else
Matthias Kloseb9621712010-04-24 17:59:49 +00008505 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008507rm -f core conftest.err conftest.$ac_objext \
8508 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008509LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8512$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8513if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8514 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008515
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008516 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008517 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008518 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008519else
Greg Steinadf63d62000-07-05 10:38:09 +00008520
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8522$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8523if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8524 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008525else
Martin v. Löwis11437992002-04-12 09:54:03 +00008526 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008527LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008529/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008530
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008531/* Override any GCC internal prototype to avoid an error.
8532 Use char because int might match the return type of a GCC
8533 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008534#ifdef __cplusplus
8535extern "C"
8536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008537char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008538int
8539main ()
8540{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008541return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008542 ;
8543 return 0;
8544}
8545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008546if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008547 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008548else
Matthias Kloseb9621712010-04-24 17:59:49 +00008549 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008550fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008551rm -f core conftest.err conftest.$ac_objext \
8552 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008553LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8556$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8557if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8558 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008559
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008560 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008561 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008562 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008563else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008564
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8566$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8567if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8568 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008569else
Martin v. Löwis11437992002-04-12 09:54:03 +00008570 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008571LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008573/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008574
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008575/* Override any GCC internal prototype to avoid an error.
8576 Use char because int might match the return type of a GCC
8577 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008578#ifdef __cplusplus
8579extern "C"
8580#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008581char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008582int
8583main ()
8584{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008585return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008586 ;
8587 return 0;
8588}
8589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008590if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008591 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008592else
Matthias Kloseb9621712010-04-24 17:59:49 +00008593 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008595rm -f core conftest.err conftest.$ac_objext \
8596 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008597LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8600$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8601if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8602 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008603
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008604 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008605 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008606 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008607else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008608
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8610$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8611if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8612 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008613else
Martin v. Löwis11437992002-04-12 09:54:03 +00008614 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008615LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008618
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008619/* Override any GCC internal prototype to avoid an error.
8620 Use char because int might match the return type of a GCC
8621 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008622#ifdef __cplusplus
8623extern "C"
8624#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008625char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008626int
8627main ()
8628{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 ;
8631 return 0;
8632}
8633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008634if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008636else
Matthias Kloseb9621712010-04-24 17:59:49 +00008637 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008639rm -f core conftest.err conftest.$ac_objext \
8640 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008641LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8644$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8645if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8646 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008647
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008648 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008649 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008650 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008651else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008652
Martin v. Löwis130fb172001-07-19 11:00:41 +00008653 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008654fi
8655
Guido van Rossum627b2d71993-12-24 10:39:16 +00008656
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008657fi
8658
Guido van Rossum0be3e491997-05-22 20:33:33 +00008659fi
8660
Guido van Rossum49545951997-12-02 19:28:29 +00008661fi
8662
Guido van Rossumb93a8621998-05-07 13:27:32 +00008663fi
8664
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008666rm -f core conftest.err conftest.$ac_objext \
8667 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008668fi
8669
Martin v. Löwis11437992002-04-12 09:54:03 +00008670
8671fi
8672
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008673
Michael W. Hudson54241132001-12-07 15:38:26 +00008674
Matthias Kloseb9621712010-04-24 17:59:49 +00008675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8676$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8677if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8678 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008679else
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008681LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008685/* Override any GCC internal prototype to avoid an error.
8686 Use char because int might match the return type of a GCC
8687 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008688#ifdef __cplusplus
8689extern "C"
8690#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008691char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008692int
8693main ()
8694{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008695return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 ;
8697 return 0;
8698}
8699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008700if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008701 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008702else
Matthias Kloseb9621712010-04-24 17:59:49 +00008703 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008705rm -f core conftest.err conftest.$ac_objext \
8706 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008707LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8710$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8711if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8712 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008713
Martin v. Löwis130fb172001-07-19 11:00:41 +00008714 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008715 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008716 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008717fi
8718
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008719
Neal Norwitza978ab02002-11-02 16:58:05 +00008720 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8722$as_echo_n "checking for thr_create in -lthread... " >&6; }
8723if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8724 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008725else
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008727LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731/* Override any GCC internal prototype to avoid an error.
8732 Use char because int might match the return type of a GCC
8733 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008734#ifdef __cplusplus
8735extern "C"
8736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008737char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008738int
8739main ()
8740{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008741return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 ;
8743 return 0;
8744}
8745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008746if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008748else
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008751rm -f core conftest.err conftest.$ac_objext \
8752 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008753LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8756$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8757if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8758 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008759
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008760 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008761 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008762 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008763fi
8764
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008765 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008766
Martin v. Löwis130fb172001-07-19 11:00:41 +00008767 if test "$USE_THREAD_MODULE" != "#"
8768 then
8769 # If the above checks didn't disable threads, (at least) OSF1
8770 # needs this '-threads' argument during linking.
8771 case $ac_sys_system in
8772 OSF1) LDLAST=-threads;;
8773 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008774 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008775fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008776
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008777if test "$posix_threads" = "yes"; then
8778 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008779
Matthias Kloseb9621712010-04-24 17:59:49 +00008780$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008781
8782 fi
8783
8784 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8785 case $ac_sys_system/$ac_sys_release in
8786 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008787$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008788
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008789 ;;
8790 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008791$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008792
8793 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008794 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008795$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008796
8797 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008798 AIX/6)
8799$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8800
8801 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008802 esac
8803
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8805$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8806 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8807 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008808else
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008810 ac_cv_pthread_system_supported=no
8811else
Matthias Kloseb9621712010-04-24 17:59:49 +00008812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008813/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008814#include <pthread.h>
8815 void *foo(void *parm) {
8816 return NULL;
8817 }
8818 main() {
8819 pthread_attr_t attr;
8820 pthread_t id;
8821 if (pthread_attr_init(&attr)) exit(-1);
8822 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8823 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8824 exit(0);
8825 }
8826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008827if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008828 ac_cv_pthread_system_supported=yes
8829else
Matthias Kloseb9621712010-04-24 17:59:49 +00008830 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8833 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008834fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008836
Guido van Rossum627b2d71993-12-24 10:39:16 +00008837fi
8838
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8840$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008841 if test "$ac_cv_pthread_system_supported" = "yes"; then
8842
Matthias Kloseb9621712010-04-24 17:59:49 +00008843$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008844
8845 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 for ac_func in pthread_sigmask
8847do :
8848 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8849if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008850 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008851#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008852_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008853 case $ac_sys_system in
8854 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008855
Matthias Kloseb9621712010-04-24 17:59:49 +00008856$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008857
8858 ;;
8859 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008860fi
8861done
8862
8863fi
8864
8865
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008866# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008867
Matthias Kloseb9621712010-04-24 17:59:49 +00008868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8869$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008870# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008871if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008872 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008873 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8875$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008876 ipv6=no
8877 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008878 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8879$as_echo "yes" >&6; }
8880 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008881
8882 ipv6=yes
8883 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008885else
Martin v. Löwis11437992002-04-12 09:54:03 +00008886
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008888
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8890$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008891 ipv6=no
8892
8893else
Matthias Kloseb9621712010-04-24 17:59:49 +00008894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008895/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008896 /* AF_INET6 available check */
8897#include <sys/types.h>
8898#include <sys/socket.h>
8899main()
8900{
8901 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8902 exit(1);
8903 else
8904 exit(0);
8905}
8906
Martin v. Löwis11437992002-04-12 09:54:03 +00008907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008908if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008909
Matthias Kloseb9621712010-04-24 17:59:49 +00008910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8911$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008912 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008913
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008914else
Matthias Kloseb159a552010-04-25 21:00:44 +00008915
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8917$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008918 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008919
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8922 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008923fi
8924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008925
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008926if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8928$as_echo_n "checking if RFC2553 API is available... " >&6; }
8929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008930/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008931
8932 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008933#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008934int
8935main ()
8936{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008937struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008938 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008939 ;
8940 return 0;
8941}
Matthias Kloseb159a552010-04-25 21:00:44 +00008942
Martin v. Löwis11437992002-04-12 09:54:03 +00008943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008944if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008945
8946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008947$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008948 ipv6=yes
8949
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008950else
Matthias Kloseb159a552010-04-25 21:00:44 +00008951
8952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008953$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008954 ipv6=no
8955
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008958fi
8959
8960if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008962
8963fi
8964
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008965fi
8966
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008967
8968ipv6type=unknown
8969ipv6lib=none
8970ipv6trylibc=no
8971
8972if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8974$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008975 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8976 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008977 case $i in
8978 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008980/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008981
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008982#include <netinet/in.h>
8983#ifdef IPV6_INRIA_VERSION
8984yes
8985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008986_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008988 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008989 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008990fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008991rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008992
8993 ;;
8994 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008996/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008997
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008998#include <netinet/in.h>
8999#ifdef __KAME__
9000yes
9001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009002_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009005 ipv6type=$i;
9006 ipv6lib=inet6
9007 ipv6libdir=/usr/local/v6/lib
9008 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009010rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009011
9012 ;;
9013 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009015/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009016
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009017#include <features.h>
9018#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9019yes
9020#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009021_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009023 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009024 ipv6type=$i;
9025 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009026fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009027rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009028
9029 ;;
9030 linux-inet6)
9031 if test -d /usr/inet6; then
9032 ipv6type=$i
9033 ipv6lib=inet6
9034 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009035 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036 fi
9037 ;;
9038 solaris)
9039 if test -f /etc/netconfig; then
9040 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
9041 ipv6type=$i
9042 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009043 fi
9044 fi
9045 ;;
9046 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009048/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009049
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009050#include <sys/param.h>
9051#ifdef _TOSHIBA_INET6
9052yes
9053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009054_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009056 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009057 ipv6type=$i;
9058 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009059 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009060fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009061rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009062
9063 ;;
9064 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009066/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009067
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009068#include </usr/local/v6/include/sys/v6config.h>
9069#ifdef __V6D__
9070yes
9071#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009072_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009073if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009074 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009075 ipv6type=$i;
9076 ipv6lib=v6;
9077 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009078 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009079fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009080rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009081
9082 ;;
9083 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009085/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009086
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009087#include <sys/param.h>
9088#ifdef _ZETA_MINAMI_INET6
9089yes
9090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009091_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009092if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009093 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009094 ipv6type=$i;
9095 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009096 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009097fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009098rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009099
9100 ;;
9101 esac
9102 if test "$ipv6type" != "unknown"; then
9103 break
9104 fi
9105 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9107$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009108fi
9109
9110if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9111 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9112 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9113 echo "using lib$ipv6lib"
9114 else
9115 if test $ipv6trylibc = "yes"; then
9116 echo "using libc"
9117 else
9118 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9119 echo "You need to fetch lib$ipv6lib.a from appropriate"
9120 echo 'ipv6 kit and compile beforehand.'
9121 exit 1
9122 fi
9123 fi
9124fi
9125
Matthias Kloseb9621712010-04-24 17:59:49 +00009126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9127$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009129/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009130
9131 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009132int
9133main ()
9134{
9135FSIORefNum fRef = 0
9136 ;
9137 return 0;
9138}
Matthias Kloseb159a552010-04-25 21:00:44 +00009139
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009141if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009142
Matthias Kloseb159a552010-04-25 21:00:44 +00009143
Matthias Kloseb9621712010-04-24 17:59:49 +00009144$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009145
Matthias Kloseb9621712010-04-24 17:59:49 +00009146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9147$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009148
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009149else
Matthias Kloseb159a552010-04-25 21:00:44 +00009150
Matthias Kloseb9621712010-04-24 17:59:49 +00009151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9152$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009153
9154fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9156
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009157# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9159$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009160
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009161# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009162if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009163 withval=$with_doc_strings;
9164fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009165
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009166
9167if test -z "$with_doc_strings"
9168then with_doc_strings="yes"
9169fi
9170if test "$with_doc_strings" != "no"
9171then
9172
Matthias Kloseb9621712010-04-24 17:59:49 +00009173$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009174
9175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9177$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009178
Antoine Pitrou042b1282010-08-13 21:15:58 +00009179# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9181$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009182
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009183# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009184if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009185 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009186if test "$withval" != no
9187then
9188
Matthias Kloseb9621712010-04-24 17:59:49 +00009189$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009190
Matthias Kloseb9621712010-04-24 17:59:49 +00009191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9192$as_echo "yes" >&6; }
9193else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9194$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009195fi
9196else
Matthias Kloseb9621712010-04-24 17:59:49 +00009197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9198$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009199fi
9200
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009201
9202# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9204$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009205
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009206# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009207if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009208 withval=$with_pymalloc;
9209fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009210
Neil Schemenauera35c6882001-02-27 04:45:05 +00009211
Neil Schemenauer16c22972002-03-22 15:34:49 +00009212if test -z "$with_pymalloc"
9213then with_pymalloc="yes"
9214fi
9215if test "$with_pymalloc" != "no"
9216then
Martin v. Löwis11437992002-04-12 09:54:03 +00009217
Matthias Kloseb9621712010-04-24 17:59:49 +00009218$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009219
9220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9222$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009223
Benjamin Peterson05159c42009-12-03 03:01:27 +00009224# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9226$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009227
9228# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009229if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009230 withval=$with_valgrind;
9231else
9232 with_valgrind=no
9233fi
9234
Matthias Kloseb9621712010-04-24 17:59:49 +00009235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9236$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009237if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009238 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9239if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009240
Matthias Kloseb9621712010-04-24 17:59:49 +00009241$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009242
9243else
Matthias Kloseb9621712010-04-24 17:59:49 +00009244 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009245
9246fi
9247
9248
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009249 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009250fi
9251
Barry Warsawef82cd72000-06-30 16:21:01 +00009252# Check for --with-wctype-functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9254$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009255
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009256# Check whether --with-wctype-functions was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009257if test "${with_wctype_functions+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009258 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009259if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009260then
9261
Matthias Kloseb9621712010-04-24 17:59:49 +00009262$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009263
Matthias Kloseb9621712010-04-24 17:59:49 +00009264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9265$as_echo "yes" >&6; }
9266else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9267$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009268fi
9269else
Matthias Kloseb9621712010-04-24 17:59:49 +00009270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9271$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009272fi
9273
Barry Warsawef82cd72000-06-30 16:21:01 +00009274
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009275# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009276
Guido van Rossum98935bf2001-09-05 19:13:16 +00009277DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009278
Guido van Rossume97ee181999-12-20 21:27:22 +00009279# the dlopen() function means we might want to use dynload_shlib.o. some
9280# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009281for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009282do :
9283 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9284if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009285 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009286#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009287_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009288
Guido van Rossume97ee181999-12-20 21:27:22 +00009289fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009290done
Guido van Rossume97ee181999-12-20 21:27:22 +00009291
Michael W. Hudson54241132001-12-07 15:38:26 +00009292
Guido van Rossume97ee181999-12-20 21:27:22 +00009293# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9294# loading of modules.
9295
Matthias Kloseb9621712010-04-24 17:59:49 +00009296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9297$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009298if test -z "$DYNLOADFILE"
9299then
9300 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009301 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9302 if test "$ac_cv_func_dlopen" = yes
9303 then DYNLOADFILE="dynload_shlib.o"
9304 else DYNLOADFILE="dynload_aix.o"
9305 fi
9306 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009307 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009308 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9309 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009310 *)
9311 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9312 # out any dynamic loading
9313 if test "$ac_cv_func_dlopen" = yes
9314 then DYNLOADFILE="dynload_shlib.o"
9315 else DYNLOADFILE="dynload_stub.o"
9316 fi
9317 ;;
9318 esac
9319fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9321$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009322if test "$DYNLOADFILE" != "dynload_stub.o"
9323then
Martin v. Löwis11437992002-04-12 09:54:03 +00009324
Matthias Kloseb9621712010-04-24 17:59:49 +00009325$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009326
9327fi
9328
Neil Schemenauer4e425612001-06-19 15:44:15 +00009329# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9330
Michael W. Hudson54241132001-12-07 15:38:26 +00009331
Matthias Kloseb9621712010-04-24 17:59:49 +00009332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9333$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009334if test -z "$MACHDEP_OBJS"
9335then
Jack Jansene578a632001-08-15 01:27:14 +00009336 MACHDEP_OBJS=$extra_machdep_objs
9337else
9338 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9341$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009342
Guido van Rossum627b2d71993-12-24 10:39:16 +00009343# checks for library functions
Martin v. Löwis823725e2008-03-24 13:39:54 +00009344for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9345 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009346 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009347 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009348 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009349 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009350 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009351 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9352 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009353 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009354 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009355 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009356 truncate uname unsetenv utimes waitpid wait3 wait4 \
9357 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009358do :
9359 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9360ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9361eval as_val=\$$as_ac_var
9362 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009363 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009364#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009365_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009366
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009367fi
9368done
9369
Michael W. Hudson54241132001-12-07 15:38:26 +00009370
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009371# For some functions, having a definition is not sufficient, since
9372# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9374$as_echo_n "checking for chroot... " >&6; }
9375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009376/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009377#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009378int
9379main ()
9380{
9381void *x=chroot
9382 ;
9383 return 0;
9384}
9385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009386if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009387
Matthias Kloseb9621712010-04-24 17:59:49 +00009388$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009389
Matthias Kloseb159a552010-04-25 21:00:44 +00009390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009391$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009392else
Matthias Kloseb9621712010-04-24 17:59:49 +00009393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9394$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009395
9396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9399$as_echo_n "checking for link... " >&6; }
9400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009401/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009402#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009403int
9404main ()
9405{
9406void *x=link
9407 ;
9408 return 0;
9409}
9410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009411if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009412
Matthias Kloseb9621712010-04-24 17:59:49 +00009413$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009414
Matthias Kloseb159a552010-04-25 21:00:44 +00009415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009416$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009417else
Matthias Kloseb9621712010-04-24 17:59:49 +00009418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9419$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009420
9421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9424$as_echo_n "checking for symlink... " >&6; }
9425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009426/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009427#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009428int
9429main ()
9430{
9431void *x=symlink
9432 ;
9433 return 0;
9434}
9435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009436if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009437
Matthias Kloseb9621712010-04-24 17:59:49 +00009438$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009439
Matthias Kloseb159a552010-04-25 21:00:44 +00009440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009441$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009442else
Matthias Kloseb9621712010-04-24 17:59:49 +00009443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9444$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009445
9446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9449$as_echo_n "checking for fchdir... " >&6; }
9450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009451/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009452#include <unistd.h>
9453int
9454main ()
9455{
9456void *x=fchdir
9457 ;
9458 return 0;
9459}
9460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009461if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009462
Matthias Kloseb9621712010-04-24 17:59:49 +00009463$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009464
Matthias Kloseb159a552010-04-25 21:00:44 +00009465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009466$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009467else
Matthias Kloseb9621712010-04-24 17:59:49 +00009468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9469$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009470
9471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9474$as_echo_n "checking for fsync... " >&6; }
9475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009476/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009477#include <unistd.h>
9478int
9479main ()
9480{
9481void *x=fsync
9482 ;
9483 return 0;
9484}
9485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009486if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009487
Matthias Kloseb9621712010-04-24 17:59:49 +00009488$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009489
Matthias Kloseb159a552010-04-25 21:00:44 +00009490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009491$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009492else
Matthias Kloseb9621712010-04-24 17:59:49 +00009493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9494$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009495
9496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9499$as_echo_n "checking for fdatasync... " >&6; }
9500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009501/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009502#include <unistd.h>
9503int
9504main ()
9505{
9506void *x=fdatasync
9507 ;
9508 return 0;
9509}
9510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009511if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009512
Matthias Kloseb9621712010-04-24 17:59:49 +00009513$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009514
Matthias Kloseb159a552010-04-25 21:00:44 +00009515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009516$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009517else
Matthias Kloseb9621712010-04-24 17:59:49 +00009518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9519$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009520
9521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9524$as_echo_n "checking for epoll... " >&6; }
9525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009526/* end confdefs.h. */
9527#include <sys/epoll.h>
9528int
9529main ()
9530{
9531void *x=epoll_create
9532 ;
9533 return 0;
9534}
9535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009536if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009537
Matthias Kloseb9621712010-04-24 17:59:49 +00009538$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009539
Matthias Kloseb159a552010-04-25 21:00:44 +00009540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009541$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009542else
Matthias Kloseb9621712010-04-24 17:59:49 +00009543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9544$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009545
9546fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9549$as_echo_n "checking for kqueue... " >&6; }
9550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009551/* end confdefs.h. */
9552
9553#include <sys/types.h>
9554#include <sys/event.h>
9555
9556int
9557main ()
9558{
9559int x=kqueue()
9560 ;
9561 return 0;
9562}
9563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009564if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009565
Matthias Kloseb9621712010-04-24 17:59:49 +00009566$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009567
Matthias Kloseb159a552010-04-25 21:00:44 +00009568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009569$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009570else
Matthias Kloseb9621712010-04-24 17:59:49 +00009571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9572$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009573
9574fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009576# On some systems (eg. FreeBSD 5), we would find a definition of the
9577# functions ctermid_r, setgroups in the library, but no prototype
9578# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9579# address to avoid compiler warnings and potential miscompilations
9580# because of the missing prototypes.
9581
Matthias Kloseb9621712010-04-24 17:59:49 +00009582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9583$as_echo_n "checking for ctermid_r... " >&6; }
9584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009585/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009586
Martin v. Löwisd5843682002-11-21 20:41:28 +00009587#include <stdio.h>
9588
Martin v. Löwisd5843682002-11-21 20:41:28 +00009589int
9590main ()
9591{
9592void* p = ctermid_r
9593 ;
9594 return 0;
9595}
9596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009597if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009598
Matthias Kloseb9621712010-04-24 17:59:49 +00009599$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009600
Matthias Kloseb159a552010-04-25 21:00:44 +00009601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009602$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009603else
Matthias Kloseb9621712010-04-24 17:59:49 +00009604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9605$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009606
9607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9609
Matthias Kloseb9621712010-04-24 17:59:49 +00009610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
9611$as_echo_n "checking for flock... " >&6; }
9612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009613/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009614
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009615#include <sys/file.h>
9616
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009617int
9618main ()
9619{
9620void* p = flock
9621 ;
9622 return 0;
9623}
9624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009625if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009626
Matthias Kloseb9621712010-04-24 17:59:49 +00009627$as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009628
Matthias Kloseb159a552010-04-25 21:00:44 +00009629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009630$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009631else
Matthias Kloseb9621712010-04-24 17:59:49 +00009632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9633$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009634
9635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9637
Matthias Kloseb9621712010-04-24 17:59:49 +00009638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9639$as_echo_n "checking for getpagesize... " >&6; }
9640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009641/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009642
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009643#include <unistd.h>
9644
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009645int
9646main ()
9647{
9648void* p = getpagesize
9649 ;
9650 return 0;
9651}
9652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009653if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009654
Matthias Kloseb9621712010-04-24 17:59:49 +00009655$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009656
Matthias Kloseb159a552010-04-25 21:00:44 +00009657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009658$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009659else
Matthias Kloseb9621712010-04-24 17:59:49 +00009660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9661$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009662
9663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009665
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009666for ac_prog in true
9667do
9668 # Extract the first word of "$ac_prog", so it can be a program name with args.
9669set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9671$as_echo_n "checking for $ac_word... " >&6; }
9672if test "${ac_cv_prog_TRUE+set}" = set; then :
9673 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009674else
9675 if test -n "$TRUE"; then
9676 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9677else
9678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9679for as_dir in $PATH
9680do
9681 IFS=$as_save_IFS
9682 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009683 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009684 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 +00009685 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009686 $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 +00009687 break 2
9688 fi
9689done
Matthias Kloseb9621712010-04-24 17:59:49 +00009690 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009691IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009692
9693fi
9694fi
9695TRUE=$ac_cv_prog_TRUE
9696if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9698$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009699else
Matthias Kloseb9621712010-04-24 17:59:49 +00009700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9701$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009702fi
9703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009705 test -n "$TRUE" && break
9706done
9707test -n "$TRUE" || TRUE="/bin/true"
9708
9709
Matthias Kloseb9621712010-04-24 17:59:49 +00009710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9711$as_echo_n "checking for inet_aton in -lc... " >&6; }
9712if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9713 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009714else
9715 ac_check_lib_save_LIBS=$LIBS
9716LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009718/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009720/* Override any GCC internal prototype to avoid an error.
9721 Use char because int might match the return type of a GCC
9722 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009723#ifdef __cplusplus
9724extern "C"
9725#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009726char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009727int
9728main ()
9729{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009730return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009731 ;
9732 return 0;
9733}
9734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009735if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009736 ac_cv_lib_c_inet_aton=yes
9737else
Matthias Kloseb9621712010-04-24 17:59:49 +00009738 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009740rm -f core conftest.err conftest.$ac_objext \
9741 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009742LIBS=$ac_check_lib_save_LIBS
9743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9745$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9746if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009747 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009748else
Matthias Kloseb9621712010-04-24 17:59:49 +00009749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9750$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9751if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9752 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009753else
9754 ac_check_lib_save_LIBS=$LIBS
9755LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009757/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009759/* Override any GCC internal prototype to avoid an error.
9760 Use char because int might match the return type of a GCC
9761 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009762#ifdef __cplusplus
9763extern "C"
9764#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009765char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009766int
9767main ()
9768{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009769return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009770 ;
9771 return 0;
9772}
9773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009774if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009775 ac_cv_lib_resolv_inet_aton=yes
9776else
Matthias Kloseb9621712010-04-24 17:59:49 +00009777 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009779rm -f core conftest.err conftest.$ac_objext \
9780 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009781LIBS=$ac_check_lib_save_LIBS
9782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9784$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9785if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009786 cat >>confdefs.h <<_ACEOF
9787#define HAVE_LIBRESOLV 1
9788_ACEOF
9789
9790 LIBS="-lresolv $LIBS"
9791
9792fi
9793
9794
9795fi
9796
9797
Christian Heimesd0764e22007-12-04 15:00:33 +00009798# On Tru64, chflags seems to be present, but calling it will
9799# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9801$as_echo_n "checking for chflags... " >&6; }
9802if test "${ac_cv_have_chflags+set}" = set; then :
9803 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009804else
Matthias Kloseb9621712010-04-24 17:59:49 +00009805 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009806 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009807else
Matthias Kloseb9621712010-04-24 17:59:49 +00009808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009809/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009810[
Christian Heimesd0764e22007-12-04 15:00:33 +00009811#include <sys/stat.h>
9812#include <unistd.h>
9813int main(int argc, char*argv[])
9814{
9815 if(chflags(argv[0], 0) != 0)
9816 return 1;
9817 return 0;
9818}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009819]
Christian Heimesd0764e22007-12-04 15:00:33 +00009820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009821if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009822 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009823else
Matthias Kloseb9621712010-04-24 17:59:49 +00009824 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9827 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009828fi
9829
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009830
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9833$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009834if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009835 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9836if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009837 ac_cv_have_chflags="yes"
9838else
9839 ac_cv_have_chflags="no"
9840fi
9841
9842fi
9843if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009844
Matthias Kloseb9621712010-04-24 17:59:49 +00009845$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009846
9847fi
9848
Matthias Kloseb9621712010-04-24 17:59:49 +00009849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9850$as_echo_n "checking for lchflags... " >&6; }
9851if test "${ac_cv_have_lchflags+set}" = set; then :
9852 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009853else
Matthias Kloseb9621712010-04-24 17:59:49 +00009854 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009855 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009856else
Matthias Kloseb9621712010-04-24 17:59:49 +00009857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009858/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009859[
Christian Heimesd0764e22007-12-04 15:00:33 +00009860#include <sys/stat.h>
9861#include <unistd.h>
9862int main(int argc, char*argv[])
9863{
9864 if(lchflags(argv[0], 0) != 0)
9865 return 1;
9866 return 0;
9867}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009868]
Christian Heimesd0764e22007-12-04 15:00:33 +00009869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009870if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009871 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009872else
Matthias Kloseb9621712010-04-24 17:59:49 +00009873 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009875rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9876 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009877fi
9878
9879
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9882$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009883if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009884 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9885if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009886 ac_cv_have_lchflags="yes"
9887else
9888 ac_cv_have_lchflags="no"
9889fi
9890
9891fi
9892if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009893
Matthias Kloseb9621712010-04-24 17:59:49 +00009894$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009895
9896fi
9897
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009898case $ac_sys_system/$ac_sys_release in
9899Darwin/*)
9900 _CUR_CFLAGS="${CFLAGS}"
9901 _CUR_LDFLAGS="${LDFLAGS}"
9902 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9903 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9904 ;;
9905esac
9906
Matthias Kloseb9621712010-04-24 17:59:49 +00009907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9908$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9909if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9910 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009911else
9912 ac_check_lib_save_LIBS=$LIBS
9913LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009915/* end confdefs.h. */
9916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009917/* Override any GCC internal prototype to avoid an error.
9918 Use char because int might match the return type of a GCC
9919 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009920#ifdef __cplusplus
9921extern "C"
9922#endif
9923char inflateCopy ();
9924int
9925main ()
9926{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009927return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009928 ;
9929 return 0;
9930}
9931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009932if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009933 ac_cv_lib_z_inflateCopy=yes
9934else
Matthias Kloseb9621712010-04-24 17:59:49 +00009935 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009937rm -f core conftest.err conftest.$ac_objext \
9938 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009939LIBS=$ac_check_lib_save_LIBS
9940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9942$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9943if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009944
Matthias Kloseb9621712010-04-24 17:59:49 +00009945$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009946
9947fi
9948
9949
9950case $ac_sys_system/$ac_sys_release in
9951Darwin/*)
9952 CFLAGS="${_CUR_CFLAGS}"
9953 LDFLAGS="${_CUR_LDFLAGS}"
9954 ;;
9955esac
9956
Matthias Kloseb9621712010-04-24 17:59:49 +00009957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9958$as_echo_n "checking for hstrerror... " >&6; }
9959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009960/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009961
Martin v. Löwise9416172003-05-03 10:12:45 +00009962#include <netdb.h>
9963
Martin v. Löwise9416172003-05-03 10:12:45 +00009964int
9965main ()
9966{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009967void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009968 ;
9969 return 0;
9970}
9971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009972if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009973
Matthias Kloseb9621712010-04-24 17:59:49 +00009974$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009975
Matthias Kloseb159a552010-04-25 21:00:44 +00009976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009977$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009978else
Matthias Kloseb9621712010-04-24 17:59:49 +00009979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9980$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009981
9982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009983rm -f core conftest.err conftest.$ac_objext \
9984 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009985
Matthias Kloseb9621712010-04-24 17:59:49 +00009986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9987$as_echo_n "checking for inet_aton... " >&6; }
9988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009989/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009990
Martin v. Löwis86d66262006-02-17 08:40:11 +00009991#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009992#include <sys/socket.h>
9993#include <netinet/in.h>
9994#include <arpa/inet.h>
9995
Martin v. Löwise9416172003-05-03 10:12:45 +00009996int
9997main ()
9998{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009999void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010000 ;
10001 return 0;
10002}
10003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010004if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010005
Matthias Kloseb9621712010-04-24 17:59:49 +000010006$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010007
Matthias Kloseb159a552010-04-25 21:00:44 +000010008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010009$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010010else
Matthias Kloseb9621712010-04-24 17:59:49 +000010011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10012$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010013
10014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010015rm -f core conftest.err conftest.$ac_objext \
10016 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010017
Matthias Kloseb9621712010-04-24 17:59:49 +000010018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10019$as_echo_n "checking for inet_pton... " >&6; }
10020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010021/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010022
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010023#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010024#include <sys/socket.h>
10025#include <netinet/in.h>
10026#include <arpa/inet.h>
10027
Martin v. Löwise9416172003-05-03 10:12:45 +000010028int
10029main ()
10030{
10031void* p = inet_pton
10032 ;
10033 return 0;
10034}
10035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010036if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010037
Matthias Kloseb9621712010-04-24 17:59:49 +000010038$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010039
Matthias Kloseb159a552010-04-25 21:00:44 +000010040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010041$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010042else
Matthias Kloseb9621712010-04-24 17:59:49 +000010043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10044$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010045
10046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010048
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010049# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10051$as_echo_n "checking for setgroups... " >&6; }
10052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010053/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010054
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010055#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010056#ifdef HAVE_GRP_H
10057#include <grp.h>
10058#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010059
Martin v. Löwisd5843682002-11-21 20:41:28 +000010060int
10061main ()
10062{
10063void* p = setgroups
10064 ;
10065 return 0;
10066}
10067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010068if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010069
Matthias Kloseb9621712010-04-24 17:59:49 +000010070$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010071
Matthias Kloseb159a552010-04-25 21:00:44 +000010072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010073$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010074else
Matthias Kloseb9621712010-04-24 17:59:49 +000010075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10076$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010077
10078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010080
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010081# check for openpty and forkpty
10082
10083for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010084do :
10085 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10086if test "x$ac_cv_func_openpty" = 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_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010089_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010090
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010091else
Matthias Kloseb9621712010-04-24 17:59:49 +000010092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10093$as_echo_n "checking for openpty in -lutil... " >&6; }
10094if test "${ac_cv_lib_util_openpty+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 openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010109int
10110main ()
10111{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010112return openpty ();
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_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010119else
Matthias Kloseb9621712010-04-24 17:59:49 +000010120 ac_cv_lib_util_openpty=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_openpty" >&5
10127$as_echo "$ac_cv_lib_util_openpty" >&6; }
10128if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10129 $as_echo "#define HAVE_OPENPTY 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 openpty in -lbsd" >&5
10133$as_echo_n "checking for openpty in -lbsd... " >&6; }
10134if test "${ac_cv_lib_bsd_openpty+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 openpty ();
10149int
10150main ()
10151{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010152return openpty ();
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_openpty=yes
10159else
Matthias Kloseb9621712010-04-24 17:59:49 +000010160 ac_cv_lib_bsd_openpty=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_openpty" >&5
10167$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10168if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10169 $as_echo "#define HAVE_OPENPTY 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
10180for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010181do :
10182 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10183if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010184 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010185#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010186_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010187
Fred Drake8cef4cf2000-06-28 16:40:38 +000010188else
Matthias Kloseb9621712010-04-24 17:59:49 +000010189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10190$as_echo_n "checking for forkpty in -lutil... " >&6; }
10191if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10192 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010193else
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010195LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010199/* Override any GCC internal prototype to avoid an error.
10200 Use char because int might match the return type of a GCC
10201 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010202#ifdef __cplusplus
10203extern "C"
10204#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010205char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010206int
10207main ()
10208{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010209return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010210 ;
10211 return 0;
10212}
10213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010214if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010215 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010216else
Matthias Kloseb9621712010-04-24 17:59:49 +000010217 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010219rm -f core conftest.err conftest.$ac_objext \
10220 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010221LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010222fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10224$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10225if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10226 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010227 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010228else
Matthias Kloseb9621712010-04-24 17:59:49 +000010229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10230$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10231if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10232 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010233else
10234 ac_check_lib_save_LIBS=$LIBS
10235LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010237/* end confdefs.h. */
10238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010239/* Override any GCC internal prototype to avoid an error.
10240 Use char because int might match the return type of a GCC
10241 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010242#ifdef __cplusplus
10243extern "C"
10244#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010245char forkpty ();
10246int
10247main ()
10248{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010250 ;
10251 return 0;
10252}
10253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010254if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010255 ac_cv_lib_bsd_forkpty=yes
10256else
Matthias Kloseb9621712010-04-24 17:59:49 +000010257 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010258fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010259rm -f core conftest.err conftest.$ac_objext \
10260 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010261LIBS=$ac_check_lib_save_LIBS
10262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10264$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10265if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10266 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010267 LIBS="$LIBS -lbsd"
10268fi
10269
10270
10271fi
10272
Fred Drake8cef4cf2000-06-28 16:40:38 +000010273
10274fi
10275done
10276
Jack Jansendd19cf82001-12-06 22:36:17 +000010277
Christian Heimesb186d002008-03-18 15:15:01 +000010278# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010279for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010280do :
10281 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10282if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010283 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010284#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010285_ACEOF
10286
10287fi
10288done
10289
10290
Michael W. Hudson54241132001-12-07 15:38:26 +000010291# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010292for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010293do :
10294 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10295ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10296eval as_val=\$$as_ac_var
10297 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010298 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010299#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010300_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010301
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010302fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010303done
10304
Michael W. Hudson54241132001-12-07 15:38:26 +000010305
Christian Heimesb186d002008-03-18 15:15:01 +000010306for ac_func in dup2 getcwd strdup
Matthias Kloseb9621712010-04-24 17:59:49 +000010307do :
10308 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10309ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10310eval as_val=\$$as_ac_var
10311 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010313#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010314_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010315
Martin v. Löwis1142de32002-03-29 16:28:31 +000010316else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010317 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010318 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010319 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
10320 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010321esac
10322
Martin v. Löwis1142de32002-03-29 16:28:31 +000010323fi
10324done
10325
10326
10327for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010328do :
10329 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10330if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010332#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010335/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010336#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010337int
10338main ()
10339{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010340getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010341 ;
10342 return 0;
10343}
10344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010345if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010346
Matthias Kloseb9621712010-04-24 17:59:49 +000010347$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010348
Guido van Rossum627b2d71993-12-24 10:39:16 +000010349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010351
Guido van Rossum627b2d71993-12-24 10:39:16 +000010352fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010353done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010354
Jack Jansen150753c2003-03-29 22:07:47 +000010355for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010356do :
10357 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10358if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010359 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010360#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010363/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010364#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010365int
10366main ()
10367{
10368setpgrp(0,0);
10369 ;
10370 return 0;
10371}
10372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010373if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010374
Matthias Kloseb9621712010-04-24 17:59:49 +000010375$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010376
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010379
10380fi
10381done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010382
Thomas Wouters3a584202000-08-05 23:28:51 +000010383for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010384do :
10385 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10386if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010387 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010388#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010391/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010392#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010393int
10394main ()
10395{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010396gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 ;
10398 return 0;
10399}
10400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010401if ac_fn_c_try_compile "$LINENO"; then :
10402
Guido van Rossum627b2d71993-12-24 10:39:16 +000010403else
Skip Montanaro6dead952003-09-25 14:50:04 +000010404
Matthias Kloseb9621712010-04-24 17:59:49 +000010405$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010406
Martin v. Löwis11437992002-04-12 09:54:03 +000010407
Guido van Rossum627b2d71993-12-24 10:39:16 +000010408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010410
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010411fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010412done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010413
Michael W. Hudson54241132001-12-07 15:38:26 +000010414
Matthias Kloseb9621712010-04-24 17:59:49 +000010415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10416$as_echo_n "checking for major... " >&6; }
10417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010418/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010419
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010420#if defined(MAJOR_IN_MKDEV)
10421#include <sys/mkdev.h>
10422#elif defined(MAJOR_IN_SYSMACROS)
10423#include <sys/sysmacros.h>
10424#else
10425#include <sys/types.h>
10426#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010427
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010428int
10429main ()
10430{
10431
10432 makedev(major(0),minor(0));
10433
10434 ;
10435 return 0;
10436}
10437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010438if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010439
10440
Matthias Kloseb9621712010-04-24 17:59:49 +000010441$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010442
Matthias Kloseb9621712010-04-24 17:59:49 +000010443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10444$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010445
10446else
Skip Montanaro6dead952003-09-25 14:50:04 +000010447
Matthias Kloseb9621712010-04-24 17:59:49 +000010448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10449$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010450
10451fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010452rm -f core conftest.err conftest.$ac_objext \
10453 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010454
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010455# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010456# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10458$as_echo_n "checking for getaddrinfo... " >&6; }
10459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010460/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010461
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010462#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010463#include <sys/socket.h>
10464#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010465#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010466
Martin v. Löwis11437992002-04-12 09:54:03 +000010467int
10468main ()
10469{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010470getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010471 ;
10472 return 0;
10473}
10474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010475if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010476 have_getaddrinfo=yes
10477else
Matthias Kloseb9621712010-04-24 17:59:49 +000010478 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010480rm -f core conftest.err conftest.$ac_objext \
10481 conftest$ac_exeext conftest.$ac_ext
10482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10483$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010484if test $have_getaddrinfo = yes
10485then
Matthias Kloseb9621712010-04-24 17:59:49 +000010486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10487$as_echo_n "checking getaddrinfo bug... " >&6; }
10488 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10489 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010490else
Matthias Kloseb9621712010-04-24 17:59:49 +000010491 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010492 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010493else
Matthias Kloseb9621712010-04-24 17:59:49 +000010494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010495/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010496
10497#include <sys/types.h>
10498#include <netdb.h>
10499#include <string.h>
10500#include <sys/socket.h>
10501#include <netinet/in.h>
10502
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010503int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010504{
10505 int passive, gaierr, inet4 = 0, inet6 = 0;
10506 struct addrinfo hints, *ai, *aitop;
10507 char straddr[INET6_ADDRSTRLEN], strport[16];
10508
10509 for (passive = 0; passive <= 1; passive++) {
10510 memset(&hints, 0, sizeof(hints));
10511 hints.ai_family = AF_UNSPEC;
10512 hints.ai_flags = passive ? AI_PASSIVE : 0;
10513 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010514 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010515 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10516 (void)gai_strerror(gaierr);
10517 goto bad;
10518 }
10519 for (ai = aitop; ai; ai = ai->ai_next) {
10520 if (ai->ai_addr == NULL ||
10521 ai->ai_addrlen == 0 ||
10522 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10523 straddr, sizeof(straddr), strport, sizeof(strport),
10524 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10525 goto bad;
10526 }
10527 switch (ai->ai_family) {
10528 case AF_INET:
10529 if (strcmp(strport, "54321") != 0) {
10530 goto bad;
10531 }
10532 if (passive) {
10533 if (strcmp(straddr, "0.0.0.0") != 0) {
10534 goto bad;
10535 }
10536 } else {
10537 if (strcmp(straddr, "127.0.0.1") != 0) {
10538 goto bad;
10539 }
10540 }
10541 inet4++;
10542 break;
10543 case AF_INET6:
10544 if (strcmp(strport, "54321") != 0) {
10545 goto bad;
10546 }
10547 if (passive) {
10548 if (strcmp(straddr, "::") != 0) {
10549 goto bad;
10550 }
10551 } else {
10552 if (strcmp(straddr, "::1") != 0) {
10553 goto bad;
10554 }
10555 }
10556 inet6++;
10557 break;
10558 case AF_UNSPEC:
10559 goto bad;
10560 break;
10561 default:
10562 /* another family support? */
10563 break;
10564 }
10565 }
10566 }
10567
10568 if (!(inet4 == 0 || inet4 == 2))
10569 goto bad;
10570 if (!(inet6 == 0 || inet6 == 2))
10571 goto bad;
10572
10573 if (aitop)
10574 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010575 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010576
10577 bad:
10578 if (aitop)
10579 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010580 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010581}
10582
Martin v. Löwis11437992002-04-12 09:54:03 +000010583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010584if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010585 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010586else
Matthias Kloseb9621712010-04-24 17:59:49 +000010587 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010588fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10590 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010592
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010593fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010594
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010596
Mark Dickinson2df5d282009-12-31 21:22:50 +000010597if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010598then
10599 if test $ipv6 = yes
10600 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010601 echo 'Fatal: You must get working getaddrinfo() function.'
10602 echo ' or you can specify "--disable-ipv6"'.
10603 exit 1
10604 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010605else
Martin v. Löwis11437992002-04-12 09:54:03 +000010606
Matthias Kloseb9621712010-04-24 17:59:49 +000010607$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010608
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010609fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010610for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010611do :
10612 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10613if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010614 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010615#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010616_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010617
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010618fi
10619done
10620
Michael W. Hudson54241132001-12-07 15:38:26 +000010621
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010622# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10624$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10625if test "${ac_cv_header_time+set}" = set; then :
10626 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010627else
Matthias Kloseb9621712010-04-24 17:59:49 +000010628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010629/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010630#include <sys/types.h>
10631#include <sys/time.h>
10632#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010633
Martin v. Löwis11437992002-04-12 09:54:03 +000010634int
10635main ()
10636{
10637if ((struct tm *) 0)
10638return 0;
10639 ;
10640 return 0;
10641}
10642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010643if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010644 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010645else
Matthias Kloseb9621712010-04-24 17:59:49 +000010646 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10651$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010652if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010653
Matthias Kloseb9621712010-04-24 17:59:49 +000010654$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010655
10656fi
10657
Matthias Kloseb9621712010-04-24 17:59:49 +000010658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10659$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10660if test "${ac_cv_struct_tm+set}" = set; then :
10661 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010662else
Matthias Kloseb9621712010-04-24 17:59:49 +000010663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010664/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010665#include <sys/types.h>
10666#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010667
Martin v. Löwis11437992002-04-12 09:54:03 +000010668int
10669main ()
10670{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010671struct tm tm;
10672 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010674 ;
10675 return 0;
10676}
10677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010678if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010679 ac_cv_struct_tm=time.h
10680else
Matthias Kloseb9621712010-04-24 17:59:49 +000010681 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010684fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10686$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010687if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010688
Matthias Kloseb9621712010-04-24 17:59:49 +000010689$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010690
10691fi
10692
Matthias Kloseb9621712010-04-24 17:59:49 +000010693ac_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 +000010694#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010695
Matthias Kloseb9621712010-04-24 17:59:49 +000010696"
10697if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010698
10699cat >>confdefs.h <<_ACEOF
10700#define HAVE_STRUCT_TM_TM_ZONE 1
10701_ACEOF
10702
10703
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010704fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010705
Martin v. Löwis11437992002-04-12 09:54:03 +000010706if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10707
Matthias Kloseb9621712010-04-24 17:59:49 +000010708$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010709
10710else
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10712"
10713if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10714 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010715else
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010717fi
10718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010720#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010721_ACEOF
10722
Matthias Kloseb9621712010-04-24 17:59:49 +000010723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10724$as_echo_n "checking for tzname... " >&6; }
10725if test "${ac_cv_var_tzname+set}" = set; then :
10726 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010727else
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010729/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010730#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010731#if !HAVE_DECL_TZNAME
10732extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010734
Martin v. Löwis11437992002-04-12 09:54:03 +000010735int
10736main ()
10737{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010738return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010739 ;
10740 return 0;
10741}
10742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010743if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010744 ac_cv_var_tzname=yes
10745else
Matthias Kloseb9621712010-04-24 17:59:49 +000010746 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010747fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010748rm -f core conftest.err conftest.$ac_objext \
10749 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10752$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010753 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010754
Matthias Kloseb9621712010-04-24 17:59:49 +000010755$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010756
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010757 fi
10758fi
10759
Matthias Kloseb9621712010-04-24 17:59:49 +000010760ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10761if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010762
10763cat >>confdefs.h <<_ACEOF
10764#define HAVE_STRUCT_STAT_ST_RDEV 1
10765_ACEOF
10766
10767
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010768fi
10769
Matthias Kloseb9621712010-04-24 17:59:49 +000010770ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10771if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010772
Martin v. Löwis11437992002-04-12 09:54:03 +000010773cat >>confdefs.h <<_ACEOF
10774#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10775_ACEOF
10776
10777
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010778fi
10779
Matthias Kloseb9621712010-04-24 17:59:49 +000010780ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10781if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010782
10783cat >>confdefs.h <<_ACEOF
10784#define HAVE_STRUCT_STAT_ST_FLAGS 1
10785_ACEOF
10786
10787
10788fi
10789
Matthias Kloseb9621712010-04-24 17:59:49 +000010790ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10791if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010792
10793cat >>confdefs.h <<_ACEOF
10794#define HAVE_STRUCT_STAT_ST_GEN 1
10795_ACEOF
10796
10797
10798fi
10799
Matthias Kloseb9621712010-04-24 17:59:49 +000010800ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10801if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010802
10803cat >>confdefs.h <<_ACEOF
10804#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10805_ACEOF
10806
10807
10808fi
10809
Matthias Kloseb9621712010-04-24 17:59:49 +000010810ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10811if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010812
Martin v. Löwis11437992002-04-12 09:54:03 +000010813cat >>confdefs.h <<_ACEOF
10814#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10815_ACEOF
10816
10817
Matthias Kloseb9621712010-04-24 17:59:49 +000010818$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010819
10820else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010821 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010822 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010823 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10824 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010825esac
10826
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010827fi
10828
Michael W. Hudson54241132001-12-07 15:38:26 +000010829
Martin v. Löwis11437992002-04-12 09:54:03 +000010830
Matthias Kloseb9621712010-04-24 17:59:49 +000010831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10832$as_echo_n "checking for time.h that defines altzone... " >&6; }
10833if test "${ac_cv_header_time_altzone+set}" = set; then :
10834 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010835else
Matthias Kloseb159a552010-04-25 21:00:44 +000010836
Matthias Kloseb9621712010-04-24 17:59:49 +000010837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010838/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010839#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010840int
10841main ()
10842{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010843return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010844 ;
10845 return 0;
10846}
10847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010848if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010849 ac_cv_header_time_altzone=yes
10850else
Matthias Kloseb9621712010-04-24 17:59:49 +000010851 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010855fi
10856
Matthias Kloseb9621712010-04-24 17:59:49 +000010857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10858$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010859if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010860
Matthias Kloseb9621712010-04-24 17:59:49 +000010861$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010862
10863fi
10864
Guido van Rossumda88dad1995-01-26 00:46:29 +000010865was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10867$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010869/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010870
10871#include <sys/types.h>
10872#include <sys/select.h>
10873#include <sys/time.h>
10874
Martin v. Löwis11437992002-04-12 09:54:03 +000010875int
10876main ()
10877{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010878;
Martin v. Löwis11437992002-04-12 09:54:03 +000010879 ;
10880 return 0;
10881}
10882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010883if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010884
10885
Matthias Kloseb9621712010-04-24 17:59:49 +000010886$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010887
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010888 was_it_defined=yes
10889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10893$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010894
Matthias Kloseb9621712010-04-24 17:59:49 +000010895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10896$as_echo_n "checking for addrinfo... " >&6; }
10897if test "${ac_cv_struct_addrinfo+set}" = set; then :
10898 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010899else
Matthias Kloseb9621712010-04-24 17:59:49 +000010900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010901/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010902#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010903int
10904main ()
10905{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010906struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010907 ;
10908 return 0;
10909}
10910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010911if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010912 ac_cv_struct_addrinfo=yes
10913else
Matthias Kloseb9621712010-04-24 17:59:49 +000010914 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10917fi
10918
Matthias Kloseb9621712010-04-24 17:59:49 +000010919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10920$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010921if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010922
Matthias Kloseb9621712010-04-24 17:59:49 +000010923$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010924
10925fi
10926
Matthias Kloseb9621712010-04-24 17:59:49 +000010927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10928$as_echo_n "checking for sockaddr_storage... " >&6; }
10929if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10930 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010931else
Matthias Kloseb9621712010-04-24 17:59:49 +000010932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010933/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010934
10935# include <sys/types.h>
10936# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010937int
10938main ()
10939{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010940struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010941 ;
10942 return 0;
10943}
10944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010945if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010946 ac_cv_struct_sockaddr_storage=yes
10947else
Matthias Kloseb9621712010-04-24 17:59:49 +000010948 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10951fi
10952
Matthias Kloseb9621712010-04-24 17:59:49 +000010953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10954$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010955if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010956
Matthias Kloseb9621712010-04-24 17:59:49 +000010957$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010958
10959fi
10960
Guido van Rossum627b2d71993-12-24 10:39:16 +000010961# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010962
Matthias Kloseb9621712010-04-24 17:59:49 +000010963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10964$as_echo_n "checking whether char is unsigned... " >&6; }
10965if test "${ac_cv_c_char_unsigned+set}" = set; then :
10966 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010967else
Matthias Kloseb9621712010-04-24 17:59:49 +000010968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010969/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010970$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010971int
10972main ()
10973{
10974static int test_array [1 - 2 * !(((char) -1) < 0)];
10975test_array [0] = 0
10976
10977 ;
10978 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010979}
Martin v. Löwis11437992002-04-12 09:54:03 +000010980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010981if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010982 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010983else
Matthias Kloseb9621712010-04-24 17:59:49 +000010984 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010987fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10989$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010990if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010991 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010992
10993fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010994
Matthias Kloseb9621712010-04-24 17:59:49 +000010995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10996$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10997if test "${ac_cv_c_const+set}" = set; then :
10998 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010999else
Matthias Kloseb9621712010-04-24 17:59:49 +000011000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011001/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011002
Martin v. Löwis11437992002-04-12 09:54:03 +000011003int
11004main ()
11005{
11006/* FIXME: Include the comments suggested by Paul. */
11007#ifndef __cplusplus
11008 /* Ultrix mips cc rejects this. */
11009 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011010 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011011 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011012 char const *const *pcpcc;
11013 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 /* NEC SVR4.0.2 mips cc rejects this. */
11015 struct point {int x, y;};
11016 static struct point const zero = {0,0};
11017 /* AIX XL C 1.02.0.0 rejects this.
11018 It does not let you subtract one const X* pointer from another in
11019 an arm of an if-expression whose if-part is not a constant
11020 expression */
11021 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011022 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011023 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011024 ++pcpcc;
11025 ppc = (char**) pcpcc;
11026 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011027 { /* SCO 3.2v4 cc rejects this. */
11028 char *t;
11029 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011030
Martin v. Löwis11437992002-04-12 09:54:03 +000011031 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011032 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011033 }
11034 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11035 int x[] = {25, 17};
11036 const int *foo = &x[0];
11037 ++foo;
11038 }
11039 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11040 typedef const int *iptr;
11041 iptr p = 0;
11042 ++p;
11043 }
11044 { /* AIX XL C 1.02.0.0 rejects this saying
11045 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11046 struct s { int j; const int *ap[3]; };
11047 struct s *b; b->j = 5;
11048 }
11049 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11050 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011051 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011052 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011053 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011054#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011055
Martin v. Löwis11437992002-04-12 09:54:03 +000011056 ;
11057 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011058}
Martin v. Löwis11437992002-04-12 09:54:03 +000011059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011060if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011061 ac_cv_c_const=yes
11062else
Matthias Kloseb9621712010-04-24 17:59:49 +000011063 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11068$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011069if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011070
Matthias Kloseb9621712010-04-24 17:59:49 +000011071$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011072
11073fi
11074
Michael W. Hudson54241132001-12-07 15:38:26 +000011075
Guido van Rossumda88dad1995-01-26 00:46:29 +000011076works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11078$as_echo_n "checking for working volatile... " >&6; }
11079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011080/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011081
Martin v. Löwis11437992002-04-12 09:54:03 +000011082int
11083main ()
11084{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011085volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011086 ;
11087 return 0;
11088}
11089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011090if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011091 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011092else
Skip Montanaro6dead952003-09-25 14:50:04 +000011093
Matthias Kloseb9621712010-04-24 17:59:49 +000011094$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011095
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011096
Guido van Rossum627b2d71993-12-24 10:39:16 +000011097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11100$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011101
Guido van Rossumda88dad1995-01-26 00:46:29 +000011102works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11104$as_echo_n "checking for working signed char... " >&6; }
11105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011106/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011107
Martin v. Löwis11437992002-04-12 09:54:03 +000011108int
11109main ()
11110{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011111signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011112 ;
11113 return 0;
11114}
11115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011116if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011117 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011118else
Skip Montanaro6dead952003-09-25 14:50:04 +000011119
Matthias Kloseb9621712010-04-24 17:59:49 +000011120$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011121
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011122
Guido van Rossum7f43da71994-08-01 12:15:30 +000011123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11126$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011127
Guido van Rossumda88dad1995-01-26 00:46:29 +000011128have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11130$as_echo_n "checking for prototypes... " >&6; }
11131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011132/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011133int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011134int
11135main ()
11136{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011137return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011138 ;
11139 return 0;
11140}
11141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011142if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011143
Matthias Kloseb9621712010-04-24 17:59:49 +000011144$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011145
Matthias Kloseb159a552010-04-25 21:00:44 +000011146 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11150$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011151
Guido van Rossumda88dad1995-01-26 00:46:29 +000011152works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11154$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011156/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011157
11158#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011159int foo(int x, ...) {
11160 va_list va;
11161 va_start(va, x);
11162 va_arg(va, int);
11163 va_arg(va, char *);
11164 va_arg(va, double);
11165 return 0;
11166}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011167
Martin v. Löwis11437992002-04-12 09:54:03 +000011168int
11169main ()
11170{
Guido van Rossum90eea071996-08-30 20:58:57 +000011171return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011172 ;
11173 return 0;
11174}
11175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011176if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011177
11178
Matthias Kloseb9621712010-04-24 17:59:49 +000011179$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011180
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011181 works=yes
11182
Guido van Rossum627b2d71993-12-24 10:39:16 +000011183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11186$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011187
Martin v. Löwisd6320502004-08-12 13:45:08 +000011188# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11190$as_echo_n "checking for socketpair... " >&6; }
11191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011192/* end confdefs.h. */
11193
11194#include <sys/types.h>
11195#include <sys/socket.h>
11196
11197int
11198main ()
11199{
11200void *x=socketpair
11201 ;
11202 return 0;
11203}
11204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011205if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011206
Matthias Kloseb9621712010-04-24 17:59:49 +000011207$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011208
Matthias Kloseb159a552010-04-25 21:00:44 +000011209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011210$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011211else
Matthias Kloseb9621712010-04-24 17:59:49 +000011212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11213$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011214
11215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011217
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011218# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11220$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011222/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011223#include <sys/types.h>
11224#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011225int
11226main ()
11227{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011228struct sockaddr x;
11229x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011230 ;
11231 return 0;
11232}
11233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011234if ac_fn_c_try_compile "$LINENO"; then :
11235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11236$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011237
Matthias Kloseb9621712010-04-24 17:59:49 +000011238$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011239
11240else
Matthias Kloseb9621712010-04-24 17:59:49 +000011241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11242$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011243
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011246
Guido van Rossumda88dad1995-01-26 00:46:29 +000011247va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11249$as_echo_n "checking whether va_list is an array... " >&6; }
11250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011251/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011252
11253#ifdef HAVE_STDARG_PROTOTYPES
11254#include <stdarg.h>
11255#else
11256#include <varargs.h>
11257#endif
11258
Martin v. Löwis11437992002-04-12 09:54:03 +000011259int
11260main ()
11261{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011262va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011263 ;
11264 return 0;
11265}
11266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011267if ac_fn_c_try_compile "$LINENO"; then :
11268
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011269else
Skip Montanaro6dead952003-09-25 14:50:04 +000011270
Martin v. Löwis11437992002-04-12 09:54:03 +000011271
Matthias Kloseb9621712010-04-24 17:59:49 +000011272$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011273
Guido van Rossumda88dad1995-01-26 00:46:29 +000011274 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011275
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11279$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011280
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011281# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011282
11283
Matthias Kloseb9621712010-04-24 17:59:49 +000011284ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11285if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011286
Matthias Kloseb9621712010-04-24 17:59:49 +000011287 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011288
Matthias Kloseb9621712010-04-24 17:59:49 +000011289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11290$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011291 OLD_CFLAGS=$CFLAGS
11292 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011294/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011295
11296# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011297
Martin v. Löwis11437992002-04-12 09:54:03 +000011298int
11299main ()
11300{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011301
11302 char *name;
11303 struct hostent *he, *res;
11304 char buffer[2048];
11305 int buflen = 2048;
11306 int h_errnop;
11307
11308 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011309
11310 ;
11311 return 0;
11312}
11313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011314if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011315
Matthias Kloseb9621712010-04-24 17:59:49 +000011316 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011317
Martin v. Löwis11437992002-04-12 09:54:03 +000011318
Matthias Kloseb9621712010-04-24 17:59:49 +000011319$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011320
Matthias Kloseb9621712010-04-24 17:59:49 +000011321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11322$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011323
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011324else
Skip Montanaro6dead952003-09-25 14:50:04 +000011325
Matthias Kloseb9621712010-04-24 17:59:49 +000011326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11327$as_echo "no" >&6; }
11328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11329$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011331/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011332
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011333# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011334
Martin v. Löwis11437992002-04-12 09:54:03 +000011335int
11336main ()
11337{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011338
11339 char *name;
11340 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011341 char buffer[2048];
11342 int buflen = 2048;
11343 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011344
Matthias Kloseb159a552010-04-25 21:00:44 +000011345 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011346
11347 ;
11348 return 0;
11349}
11350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011351if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011352
Matthias Kloseb9621712010-04-24 17:59:49 +000011353 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011354
Martin v. Löwis11437992002-04-12 09:54:03 +000011355
Matthias Kloseb159a552010-04-25 21:00:44 +000011356$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011357
Matthias Kloseb9621712010-04-24 17:59:49 +000011358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11359$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011360
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011361else
Skip Montanaro6dead952003-09-25 14:50:04 +000011362
Matthias Kloseb9621712010-04-24 17:59:49 +000011363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11364$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11366$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11368/* end confdefs.h. */
11369
11370# include <netdb.h>
11371
11372int
11373main ()
11374{
11375
11376 char *name;
11377 struct hostent *he;
11378 struct hostent_data data;
11379
11380 (void) gethostbyname_r(name, he, &data);
11381
11382 ;
11383 return 0;
11384}
11385_ACEOF
11386if ac_fn_c_try_compile "$LINENO"; then :
11387
11388 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11389
11390
11391$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11392
11393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11394$as_echo "yes" >&6; }
11395
11396else
11397
11398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11399$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011400
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011403
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011406
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011409 CFLAGS=$OLD_CFLAGS
11410
11411else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011412
Matthias Kloseb9621712010-04-24 17:59:49 +000011413 for ac_func in gethostbyname
11414do :
11415 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11416if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011417 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011418#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011419_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011420
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011421fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011422done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011423
Michael W. Hudson54241132001-12-07 15:38:26 +000011424
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011425fi
11426
Michael W. Hudson54241132001-12-07 15:38:26 +000011427
11428
11429
11430
11431
11432
Guido van Rossum627b2d71993-12-24 10:39:16 +000011433# checks for system services
11434# (none yet)
11435
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011436# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011437ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11438if test "x$ac_cv_func___fpu_control" = x""yes; then :
11439
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011440else
Matthias Kloseb9621712010-04-24 17:59:49 +000011441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11442$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11443if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11444 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011445else
Martin v. Löwis11437992002-04-12 09:54:03 +000011446 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011447LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011449/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011450
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011451/* Override any GCC internal prototype to avoid an error.
11452 Use char because int might match the return type of a GCC
11453 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011454#ifdef __cplusplus
11455extern "C"
11456#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011457char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011458int
11459main ()
11460{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011461return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011462 ;
11463 return 0;
11464}
11465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011466if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011467 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011468else
Matthias Kloseb9621712010-04-24 17:59:49 +000011469 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011470fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011471rm -f core conftest.err conftest.$ac_objext \
11472 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011473LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11476$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11477if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011478 cat >>confdefs.h <<_ACEOF
11479#define HAVE_LIBIEEE 1
11480_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011481
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011482 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011483
Guido van Rossum627b2d71993-12-24 10:39:16 +000011484fi
11485
Michael W. Hudson54241132001-12-07 15:38:26 +000011486
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011487fi
11488
Michael W. Hudson54241132001-12-07 15:38:26 +000011489
Guido van Rossum7f253911997-05-09 02:42:48 +000011490# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11492$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011494# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011495if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011497if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011498then
11499
Matthias Kloseb9621712010-04-24 17:59:49 +000011500$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011501
Matthias Kloseb9621712010-04-24 17:59:49 +000011502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11503$as_echo "yes" >&6; }
11504else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11505$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011506fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011507else
Matthias Kloseb9621712010-04-24 17:59:49 +000011508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11509$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011510fi
11511
Guido van Rossum7f253911997-05-09 02:42:48 +000011512
Guido van Rossum7f43da71994-08-01 12:15:30 +000011513# check for --with-libm=...
11514
Guido van Rossum563e7081996-09-10 18:20:48 +000011515case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011516Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011517*) LIBM=-lm
11518esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11520$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011521
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011522# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011523if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011524 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011525if test "$withval" = no
11526then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11528$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011529elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011530then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11532$as_echo "set LIBM=\"$withval\"" >&6; }
11533else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011534fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011535else
Matthias Kloseb9621712010-04-24 17:59:49 +000011536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11537$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011538fi
11539
Guido van Rossum7f43da71994-08-01 12:15:30 +000011540
11541# check for --with-libc=...
11542
Matthias Kloseb9621712010-04-24 17:59:49 +000011543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11544$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011545
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011546# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011547if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011548 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011549if test "$withval" = no
11550then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11552$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011553elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011554then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11556$as_echo "set LIBC=\"$withval\"" >&6; }
11557else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011558fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011559else
Matthias Kloseb9621712010-04-24 17:59:49 +000011560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11561$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011562fi
11563
Guido van Rossum7f43da71994-08-01 12:15:30 +000011564
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011565# **************************************************
11566# * Check for various properties of floating point *
11567# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011568
Matthias Kloseb9621712010-04-24 17:59:49 +000011569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11570$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11571if test "${ac_cv_little_endian_double+set}" = set; then :
11572 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011573else
11574
Matthias Kloseb9621712010-04-24 17:59:49 +000011575if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011576 ac_cv_little_endian_double=no
11577else
Matthias Kloseb9621712010-04-24 17:59:49 +000011578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011579/* end confdefs.h. */
11580
11581#include <string.h>
11582int main() {
11583 double x = 9006104071832581.0;
11584 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11585 return 0;
11586 else
11587 return 1;
11588}
11589
11590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011591if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011592 ac_cv_little_endian_double=yes
11593else
Matthias Kloseb9621712010-04-24 17:59:49 +000011594 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011596rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11597 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011598fi
11599
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011600fi
11601
Matthias Kloseb9621712010-04-24 17:59:49 +000011602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11603$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011604if test "$ac_cv_little_endian_double" = yes
11605then
11606
Matthias Kloseb9621712010-04-24 17:59:49 +000011607$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011608
11609fi
11610
Matthias Kloseb9621712010-04-24 17:59:49 +000011611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11612$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11613if test "${ac_cv_big_endian_double+set}" = set; then :
11614 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011615else
11616
Matthias Kloseb9621712010-04-24 17:59:49 +000011617if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011618 ac_cv_big_endian_double=no
11619else
Matthias Kloseb9621712010-04-24 17:59:49 +000011620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011621/* end confdefs.h. */
11622
11623#include <string.h>
11624int main() {
11625 double x = 9006104071832581.0;
11626 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11627 return 0;
11628 else
11629 return 1;
11630}
11631
11632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011633if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011634 ac_cv_big_endian_double=yes
11635else
Matthias Kloseb9621712010-04-24 17:59:49 +000011636 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11639 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011640fi
11641
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011642fi
11643
Matthias Kloseb9621712010-04-24 17:59:49 +000011644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11645$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011646if test "$ac_cv_big_endian_double" = yes
11647then
11648
Matthias Kloseb9621712010-04-24 17:59:49 +000011649$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011650
11651fi
11652
11653# Some ARM platforms use a mixed-endian representation for doubles.
11654# While Python doesn't currently have full support for these platforms
11655# (see e.g., issue 1762561), we can at least make sure that float <-> string
11656# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11658$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11659if test "${ac_cv_mixed_endian_double+set}" = set; then :
11660 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011661else
11662
Matthias Kloseb9621712010-04-24 17:59:49 +000011663if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011664 ac_cv_mixed_endian_double=no
11665else
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011667/* end confdefs.h. */
11668
11669#include <string.h>
11670int main() {
11671 double x = 9006104071832581.0;
11672 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11673 return 0;
11674 else
11675 return 1;
11676}
11677
11678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011679if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011680 ac_cv_mixed_endian_double=yes
11681else
Matthias Kloseb9621712010-04-24 17:59:49 +000011682 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011683fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011684rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11685 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011686fi
11687
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011688fi
11689
Matthias Kloseb9621712010-04-24 17:59:49 +000011690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11691$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011692if test "$ac_cv_mixed_endian_double" = yes
11693then
11694
Matthias Kloseb9621712010-04-24 17:59:49 +000011695$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011696
11697fi
11698
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011699# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011700# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011701# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011702# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011703# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011704# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011705
11706# This inline assembler syntax may also work for suncc and icc,
11707# so we try it on all platforms.
11708
Matthias Kloseb9621712010-04-24 17:59:49 +000011709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11710$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011712/* end confdefs.h. */
11713
11714int
11715main ()
11716{
11717
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011718 unsigned short cw;
11719 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11720 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011721
11722 ;
11723 return 0;
11724}
11725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011726if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011727 have_gcc_asm_for_x87=yes
11728else
Matthias Kloseb9621712010-04-24 17:59:49 +000011729 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011730fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11733$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011734if test "$have_gcc_asm_for_x87" = yes
11735then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011736
Matthias Kloseb9621712010-04-24 17:59:49 +000011737$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011738
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011739fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011740
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011741# Detect whether system arithmetic is subject to x87-style double
11742# rounding issues. The result of this test has little meaning on non
11743# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11744# mode is round-to-nearest and double rounding issues are present, and
11745# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11747$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011748# $BASECFLAGS may affect the result
11749ac_save_cc="$CC"
11750CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011751if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011752 ac_cv_x87_double_rounding=no
11753else
Matthias Kloseb9621712010-04-24 17:59:49 +000011754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011755/* end confdefs.h. */
11756
11757#include <stdlib.h>
11758#include <math.h>
11759int main() {
11760 volatile double x, y, z;
11761 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11762 x = 0.99999999999999989; /* 1-2**-53 */
11763 y = 1./x;
11764 if (y != 1.)
11765 exit(0);
11766 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11767 x = 1e16;
11768 y = 2.99999;
11769 z = x + y;
11770 if (z != 1e16+4.)
11771 exit(0);
11772 /* both tests show evidence of double rounding */
11773 exit(1);
11774}
11775
11776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011777if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011778 ac_cv_x87_double_rounding=no
11779else
Matthias Kloseb9621712010-04-24 17:59:49 +000011780 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11783 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011784fi
11785
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011786CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11788$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011789if test "$ac_cv_x87_double_rounding" = yes
11790then
11791
Matthias Kloseb9621712010-04-24 17:59:49 +000011792$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011793
11794fi
11795
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011796# ************************************
11797# * Check for mathematical functions *
11798# ************************************
11799
11800LIBS_SAVE=$LIBS
11801LIBS="$LIBS $LIBM"
11802
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011803# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11804# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11806$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11807if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11808 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011809else
11810
Matthias Kloseb9621712010-04-24 17:59:49 +000011811if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011812 ac_cv_tanh_preserves_zero_sign=no
11813else
Matthias Kloseb9621712010-04-24 17:59:49 +000011814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011815/* end confdefs.h. */
11816
11817#include <math.h>
11818#include <stdlib.h>
11819int main() {
11820 /* return 0 if either negative zeros don't exist
11821 on this platform or if negative zeros exist
11822 and tanh(-0.) == -0. */
11823 if (atan2(0., -1.) == atan2(-0., -1.) ||
11824 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11825 else exit(1);
11826}
11827
11828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011829if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011830 ac_cv_tanh_preserves_zero_sign=yes
11831else
Matthias Kloseb9621712010-04-24 17:59:49 +000011832 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11835 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011836fi
11837
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011838fi
11839
Matthias Kloseb9621712010-04-24 17:59:49 +000011840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11841$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011842if test "$ac_cv_tanh_preserves_zero_sign" = yes
11843then
11844
Matthias Kloseb9621712010-04-24 17:59:49 +000011845$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011846
11847fi
11848
Mark Dickinson9c113362009-09-05 10:36:23 +000011849for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011850do :
11851 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11852ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11853eval as_val=\$$as_ac_var
11854 if test "x$as_val" = x""yes; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011855 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011856#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011857_ACEOF
11858
11859fi
11860done
11861
Mark Dickinson9c113362009-09-05 10:36:23 +000011862for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011863do :
11864 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11865ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11866eval as_val=\$$as_ac_var
11867 if test "x$as_val" = x""yes; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011868 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011869#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011870_ACEOF
11871
11872fi
11873done
11874
Matthias Kloseb9621712010-04-24 17:59:49 +000011875ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11876"
11877if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11878 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011879else
Matthias Kloseb9621712010-04-24 17:59:49 +000011880 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011881fi
11882
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011883cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011884#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011886ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11887"
11888if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11889 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011890else
Matthias Kloseb9621712010-04-24 17:59:49 +000011891 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011892fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011893
11894cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011895#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011897ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11898"
11899if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11900 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011901else
Matthias Kloseb9621712010-04-24 17:59:49 +000011902 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011903fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011904
11905cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011906#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011907_ACEOF
11908
11909
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011910LIBS=$LIBS_SAVE
11911
Mark Dickinsona614f042009-11-28 12:48:43 +000011912# For multiprocessing module, check that sem_open
11913# actually works. For FreeBSD versions <= 7.2,
11914# the kernel module that provides POSIX semaphores
11915# isn't loaded by default, so an attempt to call
11916# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11918$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11919if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11920 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011921else
Matthias Kloseb9621712010-04-24 17:59:49 +000011922 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011923 ac_cv_posix_semaphores_enabled=yes
11924else
Matthias Kloseb9621712010-04-24 17:59:49 +000011925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011926/* end confdefs.h. */
11927
11928#include <unistd.h>
11929#include <fcntl.h>
11930#include <stdio.h>
11931#include <semaphore.h>
11932#include <sys/stat.h>
11933
11934int main(void) {
11935 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11936 if (a == SEM_FAILED) {
11937 perror("sem_open");
11938 return 1;
11939 }
11940 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011941 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011942 return 0;
11943}
11944
11945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011946if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011947 ac_cv_posix_semaphores_enabled=yes
11948else
Matthias Kloseb9621712010-04-24 17:59:49 +000011949 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011951rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11952 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011953fi
11954
11955
Mark Dickinsona614f042009-11-28 12:48:43 +000011956fi
11957
Matthias Kloseb9621712010-04-24 17:59:49 +000011958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11959$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011960if test $ac_cv_posix_semaphores_enabled = no
11961then
11962
Matthias Kloseb9621712010-04-24 17:59:49 +000011963$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011964
11965fi
11966
Mark Dickinson10683072009-04-18 21:18:19 +000011967# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11969$as_echo_n "checking for broken sem_getvalue... " >&6; }
11970if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11971 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011972else
Matthias Kloseb9621712010-04-24 17:59:49 +000011973 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011974 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000011975else
Matthias Kloseb9621712010-04-24 17:59:49 +000011976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011977/* end confdefs.h. */
11978
11979#include <unistd.h>
11980#include <fcntl.h>
11981#include <stdio.h>
11982#include <semaphore.h>
11983#include <sys/stat.h>
11984
11985int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000011986 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000011987 int count;
11988 int res;
11989 if(a==SEM_FAILED){
11990 perror("sem_open");
11991 return 1;
11992
11993 }
11994 res = sem_getvalue(a, &count);
11995 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011996 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000011997 return res==-1 ? 1 : 0;
11998}
11999
Mark Dickinson10683072009-04-18 21:18:19 +000012000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012001if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012002 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012003else
Matthias Kloseb9621712010-04-24 17:59:49 +000012004 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012005fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012006rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12007 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012008fi
12009
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012010
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012011fi
12012
Matthias Kloseb9621712010-04-24 17:59:49 +000012013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12014$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012015if test $ac_cv_broken_sem_getvalue = yes
12016then
12017
Matthias Kloseb9621712010-04-24 17:59:49 +000012018$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012019
12020fi
12021
Mark Dickinsonbd792642009-03-18 20:06:12 +000012022# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12024$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012025# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012026if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012027 enableval=$enable_big_digits; case $enable_big_digits in
12028yes)
12029 enable_big_digits=30 ;;
12030no)
12031 enable_big_digits=15 ;;
1203215|30)
12033 ;;
12034*)
Matthias Kloseb9621712010-04-24 17:59:49 +000012035 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 +000012036esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12038$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012039
12040cat >>confdefs.h <<_ACEOF
12041#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12042_ACEOF
12043
12044
12045else
Matthias Kloseb9621712010-04-24 17:59:49 +000012046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12047$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012048fi
12049
12050
Guido van Rossumef2255b2000-03-10 22:30:29 +000012051# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012052ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12053if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012054
12055
Matthias Kloseb9621712010-04-24 17:59:49 +000012056$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012057
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012058 wchar_h="yes"
12059
Guido van Rossumef2255b2000-03-10 22:30:29 +000012060else
Martin v. Löwis11437992002-04-12 09:54:03 +000012061 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012062
12063fi
12064
Michael W. Hudson54241132001-12-07 15:38:26 +000012065
Martin v. Löwis11437992002-04-12 09:54:03 +000012066
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012067# determine wchar_t size
12068if test "$wchar_h" = yes
12069then
Matthias Kloseb9621712010-04-24 17:59:49 +000012070 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012071# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12072# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12073# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12075$as_echo_n "checking size of wchar_t... " >&6; }
12076if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12077 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012078else
Matthias Kloseb9621712010-04-24 17:59:49 +000012079 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12080"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012081
Martin v. Löwis11437992002-04-12 09:54:03 +000012082else
Matthias Kloseb9621712010-04-24 17:59:49 +000012083 if test "$ac_cv_type_wchar_t" = yes; then
12084 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12085$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12086{ as_fn_set_status 77
12087as_fn_error "cannot compute sizeof (wchar_t)
12088See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012089 else
12090 ac_cv_sizeof_wchar_t=0
12091 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012093
Martin v. Löwis11437992002-04-12 09:54:03 +000012094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12096$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012097
12098
12099
Martin v. Löwis11437992002-04-12 09:54:03 +000012100cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012101#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012102_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012103
Michael W. Hudson54241132001-12-07 15:38:26 +000012104
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012105fi
12106
Matthias Kloseb9621712010-04-24 17:59:49 +000012107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12108$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012109have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012111/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012112
12113#include <tcl.h>
12114#if TCL_UTF_MAX != 6
12115# error "NOT UCS4_TCL"
12116#endif
12117int
12118main ()
12119{
12120
12121 ;
12122 return 0;
12123}
12124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012125if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012126
12127
Matthias Kloseb9621712010-04-24 17:59:49 +000012128$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012129
12130 have_ucs4_tcl=yes
12131
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12135$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012136
Skip Montanaro6dead952003-09-25 14:50:04 +000012137# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012138if test "$wchar_h" = yes
12139then
12140 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12142$as_echo_n "checking whether wchar_t is signed... " >&6; }
12143 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12144 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012145else
12146
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012148 ac_cv_wchar_t_signed=yes
12149else
Matthias Kloseb9621712010-04-24 17:59:49 +000012150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012151/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012152
12153 #include <wchar.h>
12154 int main()
12155 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012156 /* Success: exit code 0 */
12157 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012158 }
12159
12160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012161if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012162 ac_cv_wchar_t_signed=yes
12163else
Matthias Kloseb9621712010-04-24 17:59:49 +000012164 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12167 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012168fi
12169
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012170fi
12171
Matthias Kloseb9621712010-04-24 17:59:49 +000012172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12173$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012174fi
12175
Matthias Kloseb9621712010-04-24 17:59:49 +000012176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12177$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012178
12179# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012180if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012181 withval=$with_wide_unicode;
12182if test "$withval" != no
12183then unicode_size="4"
12184else unicode_size="2"
12185fi
12186
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012187else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012188
Georg Brandl52d168a2008-01-07 18:10:24 +000012189case "$have_ucs4_tcl" in
12190 yes) unicode_size="4" ;;
12191 *) unicode_size="2" ;;
12192esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012193
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012194fi
12195
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012196
12197
Georg Brandl52d168a2008-01-07 18:10:24 +000012198case "$unicode_size" in
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 4) $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012200 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012202 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012203esac
12204
Michael W. Hudson54241132001-12-07 15:38:26 +000012205
Martin v. Löwis11437992002-04-12 09:54:03 +000012206
Georg Brandl52d168a2008-01-07 18:10:24 +000012207# wchar_t is only usable if it maps to an unsigned type
12208if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012209 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012210then
12211 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012212
Matthias Kloseb9621712010-04-24 17:59:49 +000012213$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012214
Matthias Kloseb9621712010-04-24 17:59:49 +000012215 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012216
Georg Brandl52d168a2008-01-07 18:10:24 +000012217elif test "$ac_cv_sizeof_short" = "$unicode_size"
12218then
12219 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012220 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012221
Georg Brandl52d168a2008-01-07 18:10:24 +000012222elif test "$ac_cv_sizeof_long" = "$unicode_size"
12223then
12224 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012225 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012226
Georg Brandl52d168a2008-01-07 18:10:24 +000012227else
12228 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12231$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012232
12233# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12235$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12236if test "${ac_cv_c_bigendian+set}" = set; then :
12237 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012238else
Matthias Kloseb9621712010-04-24 17:59:49 +000012239 ac_cv_c_bigendian=unknown
12240 # See if we're dealing with a universal compiler.
12241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12242/* end confdefs.h. */
12243#ifndef __APPLE_CC__
12244 not a universal capable compiler
12245 #endif
12246 typedef int dummy;
12247
Skip Montanaro6dead952003-09-25 14:50:04 +000012248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012249if ac_fn_c_try_compile "$LINENO"; then :
12250
12251 # Check for potential -arch flags. It is not universal unless
12252 # there are at least two -arch flags with different values.
12253 ac_arch=
12254 ac_prev=
12255 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12256 if test -n "$ac_prev"; then
12257 case $ac_word in
12258 i?86 | x86_64 | ppc | ppc64)
12259 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12260 ac_arch=$ac_word
12261 else
12262 ac_cv_c_bigendian=universal
12263 break
12264 fi
12265 ;;
12266 esac
12267 ac_prev=
12268 elif test "x$ac_word" = "x-arch"; then
12269 ac_prev=arch
12270 fi
12271 done
12272fi
12273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12274 if test $ac_cv_c_bigendian = unknown; then
12275 # See if sys/param.h defines the BYTE_ORDER macro.
12276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012277/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012278#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012280
Martin v. Löwis11437992002-04-12 09:54:03 +000012281int
12282main ()
12283{
Matthias Kloseb9621712010-04-24 17:59:49 +000012284#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12285 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12286 && LITTLE_ENDIAN)
12287 bogus endian macros
12288 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012289
12290 ;
12291 return 0;
12292}
12293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012294if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012295 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012297/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012298#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012299 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012300
Martin v. Löwis11437992002-04-12 09:54:03 +000012301int
12302main ()
12303{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012304#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012305 not big endian
12306 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012307
12308 ;
12309 return 0;
12310}
12311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012312if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012313 ac_cv_c_bigendian=yes
12314else
Matthias Kloseb9621712010-04-24 17:59:49 +000012315 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012318fi
12319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12320 fi
12321 if test $ac_cv_c_bigendian = unknown; then
12322 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012324/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012325#include <limits.h>
12326
Martin v. Löwis11437992002-04-12 09:54:03 +000012327int
12328main ()
12329{
Matthias Kloseb9621712010-04-24 17:59:49 +000012330#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12331 bogus endian macros
12332 #endif
12333
Martin v. Löwis11437992002-04-12 09:54:03 +000012334 ;
12335 return 0;
12336}
12337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012338if ac_fn_c_try_compile "$LINENO"; then :
12339 # It does; now see whether it defined to _BIG_ENDIAN or not.
12340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12341/* end confdefs.h. */
12342#include <limits.h>
12343
12344int
12345main ()
12346{
12347#ifndef _BIG_ENDIAN
12348 not big endian
12349 #endif
12350
12351 ;
12352 return 0;
12353}
12354_ACEOF
12355if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012356 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012357else
Matthias Kloseb9621712010-04-24 17:59:49 +000012358 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012359fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12361fi
12362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12363 fi
12364 if test $ac_cv_c_bigendian = unknown; then
12365 # Compile a test program.
12366 if test "$cross_compiling" = yes; then :
12367 # Try to guess by grepping values from an object file.
12368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12369/* end confdefs.h. */
12370short int ascii_mm[] =
12371 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12372 short int ascii_ii[] =
12373 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12374 int use_ascii (int i) {
12375 return ascii_mm[i] + ascii_ii[i];
12376 }
12377 short int ebcdic_ii[] =
12378 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12379 short int ebcdic_mm[] =
12380 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12381 int use_ebcdic (int i) {
12382 return ebcdic_mm[i] + ebcdic_ii[i];
12383 }
12384 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385
Matthias Kloseb9621712010-04-24 17:59:49 +000012386int
12387main ()
12388{
12389return use_ascii (foo) == use_ebcdic (foo);
12390 ;
12391 return 0;
12392}
12393_ACEOF
12394if ac_fn_c_try_compile "$LINENO"; then :
12395 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12396 ac_cv_c_bigendian=yes
12397 fi
12398 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12399 if test "$ac_cv_c_bigendian" = unknown; then
12400 ac_cv_c_bigendian=no
12401 else
12402 # finding both strings is unlikely to happen, but who knows?
12403 ac_cv_c_bigendian=unknown
12404 fi
12405 fi
12406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012408else
Matthias Kloseb9621712010-04-24 17:59:49 +000012409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012410/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012411$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012412int
12413main ()
12414{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012415
Matthias Kloseb9621712010-04-24 17:59:49 +000012416 /* Are we little or big endian? From Harbison&Steele. */
12417 union
12418 {
12419 long int l;
12420 char c[sizeof (long int)];
12421 } u;
12422 u.l = 1;
12423 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012424
12425 ;
12426 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012427}
Martin v. Löwis11437992002-04-12 09:54:03 +000012428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012429if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012430 ac_cv_c_bigendian=no
12431else
Matthias Kloseb9621712010-04-24 17:59:49 +000012432 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012433fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012434rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12435 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437
Matthias Kloseb9621712010-04-24 17:59:49 +000012438 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012439fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12441$as_echo "$ac_cv_c_bigendian" >&6; }
12442 case $ac_cv_c_bigendian in #(
12443 yes)
12444 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12445;; #(
12446 no)
12447 ;; #(
12448 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012449
Matthias Kloseb9621712010-04-24 17:59:49 +000012450$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012451
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 ;; #(
12453 *)
12454 as_fn_error "unknown endianness
12455 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12456 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012457
Michael W. Hudson54241132001-12-07 15:38:26 +000012458
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012459# Check whether right shifting a negative integer extends the sign bit
12460# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12462$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12463if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12464 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012465else
Martin v. Löwis11437992002-04-12 09:54:03 +000012466
Matthias Kloseb9621712010-04-24 17:59:49 +000012467if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012468 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012469else
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012471/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012472
12473int main()
12474{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012475 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012476}
12477
Martin v. Löwis11437992002-04-12 09:54:03 +000012478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012479if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012480 ac_cv_rshift_extends_sign=yes
12481else
Matthias Kloseb9621712010-04-24 17:59:49 +000012482 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012483fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12485 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012486fi
12487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012488fi
12489
Matthias Kloseb9621712010-04-24 17:59:49 +000012490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12491$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012492if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012493then
Martin v. Löwis11437992002-04-12 09:54:03 +000012494
Matthias Kloseb9621712010-04-24 17:59:49 +000012495$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012496
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012497fi
12498
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012499# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12501$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12502if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12503 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012504else
Martin v. Löwis11437992002-04-12 09:54:03 +000012505
Matthias Kloseb9621712010-04-24 17:59:49 +000012506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012507/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012508#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012509int
12510main ()
12511{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012512
12513 FILE *f = fopen("/dev/null", "r");
12514 flockfile(f);
12515 getc_unlocked(f);
12516 funlockfile(f);
12517
Martin v. Löwis11437992002-04-12 09:54:03 +000012518 ;
12519 return 0;
12520}
12521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012522if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012523 ac_cv_have_getc_unlocked=yes
12524else
Matthias Kloseb9621712010-04-24 17:59:49 +000012525 ac_cv_have_getc_unlocked=no
12526fi
12527rm -f core conftest.err conftest.$ac_objext \
12528 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012530
Matthias Kloseb9621712010-04-24 17:59:49 +000012531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12532$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012533if test "$ac_cv_have_getc_unlocked" = yes
12534then
Martin v. Löwis11437992002-04-12 09:54:03 +000012535
Matthias Kloseb9621712010-04-24 17:59:49 +000012536$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012537
12538fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012539
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012540# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012541# save the value of LIBS so we don't actually link Python with readline
12542LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012543
Gregory P. Smith18820942008-09-07 06:24:49 +000012544# On some systems we need to link readline to a termcap compatible
12545# library. NOTE: Keep the precedence of listed libraries synchronised
12546# with setup.py.
12547py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12549$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012550for py_libtermcap in "" ncursesw ncurses curses termcap; do
12551 if test -z "$py_libtermcap"; then
12552 READLINE_LIBS="-lreadline"
12553 else
12554 READLINE_LIBS="-lreadline -l$py_libtermcap"
12555 fi
12556 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012558/* end confdefs.h. */
12559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012560/* Override any GCC internal prototype to avoid an error.
12561 Use char because int might match the return type of a GCC
12562 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012563#ifdef __cplusplus
12564extern "C"
12565#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012566char readline ();
12567int
12568main ()
12569{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012570return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012571 ;
12572 return 0;
12573}
12574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012575if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012576 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012578rm -f core conftest.err conftest.$ac_objext \
12579 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012580 if test $py_cv_lib_readline = yes; then
12581 break
12582 fi
12583done
12584# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12585#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012586if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12588$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012589else
Matthias Kloseb9621712010-04-24 17:59:49 +000012590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12591$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012592
Matthias Kloseb9621712010-04-24 17:59:49 +000012593$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012594
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012595fi
12596
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012597# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12599$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12600if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12601 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012602else
12603 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012604LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012606/* end confdefs.h. */
12607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012608/* Override any GCC internal prototype to avoid an error.
12609 Use char because int might match the return type of a GCC
12610 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012611#ifdef __cplusplus
12612extern "C"
12613#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012614char rl_callback_handler_install ();
12615int
12616main ()
12617{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012618return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012619 ;
12620 return 0;
12621}
12622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012623if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012624 ac_cv_lib_readline_rl_callback_handler_install=yes
12625else
Matthias Kloseb9621712010-04-24 17:59:49 +000012626 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012627fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012628rm -f core conftest.err conftest.$ac_objext \
12629 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012630LIBS=$ac_check_lib_save_LIBS
12631fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12633$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12634if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012635
Matthias Kloseb9621712010-04-24 17:59:49 +000012636$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012637
12638fi
12639
12640
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012641# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012643/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012644#include <readline/readline.h>
12645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012646if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012647 have_readline=yes
12648else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012649 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012650
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012651fi
12652rm -f conftest.err conftest.$ac_ext
12653if test $have_readline = yes
12654then
Matthias Kloseb9621712010-04-24 17:59:49 +000012655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012656/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012657#include <readline/readline.h>
12658
12659_ACEOF
12660if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012661 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012662
Matthias Kloseb9621712010-04-24 17:59:49 +000012663$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012664
12665fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012666rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012667
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012669/* end confdefs.h. */
12670#include <readline/readline.h>
12671
12672_ACEOF
12673if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012674 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012675
Matthias Kloseb9621712010-04-24 17:59:49 +000012676$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012677
12678fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012679rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012680
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012681fi
12682
Martin v. Löwis0daad592001-09-30 21:09:59 +000012683# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12685$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12686if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12687 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012688else
Martin v. Löwis11437992002-04-12 09:54:03 +000012689 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012690LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012692/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012693
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694/* Override any GCC internal prototype to avoid an error.
12695 Use char because int might match the return type of a GCC
12696 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012697#ifdef __cplusplus
12698extern "C"
12699#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012700char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012701int
12702main ()
12703{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012704return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012705 ;
12706 return 0;
12707}
12708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012709if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012710 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012711else
Matthias Kloseb9621712010-04-24 17:59:49 +000012712 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012713fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012714rm -f core conftest.err conftest.$ac_objext \
12715 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012716LIBS=$ac_check_lib_save_LIBS
12717fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12719$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12720if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012721
Matthias Kloseb9621712010-04-24 17:59:49 +000012722$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012723
Martin v. Löwis0daad592001-09-30 21:09:59 +000012724fi
12725
Michael W. Hudson54241132001-12-07 15:38:26 +000012726
Thomas Wouters89d996e2007-09-08 17:39:28 +000012727# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12729$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12730if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12731 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012732else
12733 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012734LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012736/* end confdefs.h. */
12737
12738/* Override any GCC internal prototype to avoid an error.
12739 Use char because int might match the return type of a GCC
12740 builtin and then its argument prototype would still apply. */
12741#ifdef __cplusplus
12742extern "C"
12743#endif
12744char rl_completion_display_matches_hook ();
12745int
12746main ()
12747{
12748return rl_completion_display_matches_hook ();
12749 ;
12750 return 0;
12751}
12752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012753if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012754 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12755else
Matthias Kloseb9621712010-04-24 17:59:49 +000012756 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012758rm -f core conftest.err conftest.$ac_objext \
12759 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012760LIBS=$ac_check_lib_save_LIBS
12761fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12763$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12764if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012765
Matthias Kloseb9621712010-04-24 17:59:49 +000012766$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012767
12768fi
12769
12770
Martin v. Löwis0daad592001-09-30 21:09:59 +000012771# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12773$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12774if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12775 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012776else
Martin v. Löwis11437992002-04-12 09:54:03 +000012777 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012778LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012782/* Override any GCC internal prototype to avoid an error.
12783 Use char because int might match the return type of a GCC
12784 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012785#ifdef __cplusplus
12786extern "C"
12787#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012788char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012789int
12790main ()
12791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012793 ;
12794 return 0;
12795}
12796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012797if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012798 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012799else
Matthias Kloseb9621712010-04-24 17:59:49 +000012800 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012802rm -f core conftest.err conftest.$ac_objext \
12803 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012804LIBS=$ac_check_lib_save_LIBS
12805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12807$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12808if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012809
Matthias Kloseb9621712010-04-24 17:59:49 +000012810$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012811
Guido van Rossum353ae582001-07-10 16:45:32 +000012812fi
12813
Jack Jansendd19cf82001-12-06 22:36:17 +000012814
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012815# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012817/* end confdefs.h. */
12818#include <readline/readline.h>
12819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012820if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012821 have_readline=yes
12822else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012823 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012824
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012825fi
12826rm -f conftest.err conftest.$ac_ext
12827if test $have_readline = yes
12828then
Matthias Kloseb9621712010-04-24 17:59:49 +000012829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012830/* end confdefs.h. */
12831#include <readline/readline.h>
12832
12833_ACEOF
12834if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012835 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012836
Matthias Kloseb9621712010-04-24 17:59:49 +000012837$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012838
12839fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012840rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012841
12842fi
12843
Martin v. Löwis82bca632006-02-10 20:49:30 +000012844# End of readline checks: restore LIBS
12845LIBS=$LIBS_no_readline
12846
Matthias Kloseb9621712010-04-24 17:59:49 +000012847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12848$as_echo_n "checking for broken nice()... " >&6; }
12849if test "${ac_cv_broken_nice+set}" = set; then :
12850 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012851else
Martin v. Löwis11437992002-04-12 09:54:03 +000012852
Matthias Kloseb9621712010-04-24 17:59:49 +000012853if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012854 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012855else
Matthias Kloseb9621712010-04-24 17:59:49 +000012856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012857/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012858
12859int main()
12860{
12861 int val1 = nice(1);
12862 if (val1 != -1 && val1 == nice(2))
12863 exit(0);
12864 exit(1);
12865}
12866
Martin v. Löwis11437992002-04-12 09:54:03 +000012867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012868if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012869 ac_cv_broken_nice=yes
12870else
Matthias Kloseb9621712010-04-24 17:59:49 +000012871 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12874 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012875fi
12876
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012877fi
12878
Matthias Kloseb9621712010-04-24 17:59:49 +000012879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12880$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012881if test "$ac_cv_broken_nice" = yes
12882then
Martin v. Löwis11437992002-04-12 09:54:03 +000012883
Matthias Kloseb9621712010-04-24 17:59:49 +000012884$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012885
12886fi
12887
Matthias Kloseb9621712010-04-24 17:59:49 +000012888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12889$as_echo_n "checking for broken poll()... " >&6; }
12890if test "${ac_cv_broken_poll+set}" = set; then :
12891 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012892else
Matthias Kloseb9621712010-04-24 17:59:49 +000012893 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012894 ac_cv_broken_poll=no
12895else
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012897/* end confdefs.h. */
12898
12899#include <poll.h>
12900
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012901int main()
12902{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012903 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012904 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012905
12906 close (42);
12907
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012908 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012909 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012910 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012911 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012912 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012913 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012914 return 1;
12915}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012916
12917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012918if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012919 ac_cv_broken_poll=yes
12920else
Matthias Kloseb9621712010-04-24 17:59:49 +000012921 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012923rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12924 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012926
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012927fi
12928
Matthias Kloseb9621712010-04-24 17:59:49 +000012929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
12930$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012931if test "$ac_cv_broken_poll" = yes
12932then
12933
Matthias Kloseb9621712010-04-24 17:59:49 +000012934$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012935
12936fi
12937
Brett Cannon43802422005-02-10 20:48:03 +000012938# 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 +000012939# (which is not required by ISO C or UNIX spec) and/or if we support
12940# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000012941ac_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 +000012942#include <$ac_cv_struct_tm>
12943
Matthias Kloseb9621712010-04-24 17:59:49 +000012944"
12945if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000012946
12947cat >>confdefs.h <<_ACEOF
12948#define HAVE_STRUCT_TM_TM_ZONE 1
12949_ACEOF
12950
12951
12952fi
12953
12954if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12955
Matthias Kloseb9621712010-04-24 17:59:49 +000012956$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012957
12958else
Matthias Kloseb9621712010-04-24 17:59:49 +000012959 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12960"
12961if test "x$ac_cv_have_decl_tzname" = x""yes; then :
12962 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012963else
Matthias Kloseb9621712010-04-24 17:59:49 +000012964 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012965fi
12966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012967cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012968#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012969_ACEOF
12970
Matthias Kloseb9621712010-04-24 17:59:49 +000012971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12972$as_echo_n "checking for tzname... " >&6; }
12973if test "${ac_cv_var_tzname+set}" = set; then :
12974 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012975else
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012977/* end confdefs.h. */
12978#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012979#if !HAVE_DECL_TZNAME
12980extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000012981#endif
12982
12983int
12984main ()
12985{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012986return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000012987 ;
12988 return 0;
12989}
12990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012991if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000012992 ac_cv_var_tzname=yes
12993else
Matthias Kloseb9621712010-04-24 17:59:49 +000012994 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000012995fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012996rm -f core conftest.err conftest.$ac_objext \
12997 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13000$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013001 if test $ac_cv_var_tzname = yes; then
13002
Matthias Kloseb9621712010-04-24 17:59:49 +000013003$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013004
13005 fi
13006fi
13007
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013008
Martin v. Löwis1d459062005-03-14 21:23:33 +000013009# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13011$as_echo_n "checking for working tzset()... " >&6; }
13012if test "${ac_cv_working_tzset+set}" = set; then :
13013 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013014else
13015
Matthias Kloseb9621712010-04-24 17:59:49 +000013016if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013017 ac_cv_working_tzset=no
13018else
Matthias Kloseb9621712010-04-24 17:59:49 +000013019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013020/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013021
13022#include <stdlib.h>
13023#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013024#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013025
13026#if HAVE_TZNAME
13027extern char *tzname[];
13028#endif
13029
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013030int main()
13031{
Brett Cannon18367812003-09-19 00:59:16 +000013032 /* Note that we need to ensure that not only does tzset(3)
13033 do 'something' with localtime, but it works as documented
13034 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013035 This includes making sure that tzname is set properly if
13036 tm->tm_zone does not exist since it is the alternative way
13037 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013038
13039 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013040 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013041 */
13042
Martin v. Löwis1d459062005-03-14 21:23:33 +000013043 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013044 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13045
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013046 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013047 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013048 if (localtime(&groundhogday)->tm_hour != 0)
13049 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013050#if HAVE_TZNAME
13051 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13052 if (strcmp(tzname[0], "UTC") ||
13053 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13054 exit(1);
13055#endif
Brett Cannon18367812003-09-19 00:59:16 +000013056
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013057 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013058 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013059 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013060 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013061#if HAVE_TZNAME
13062 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13063 exit(1);
13064#endif
Brett Cannon18367812003-09-19 00:59:16 +000013065
13066 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13067 tzset();
13068 if (localtime(&groundhogday)->tm_hour != 11)
13069 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013070#if HAVE_TZNAME
13071 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13072 exit(1);
13073#endif
13074
13075#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013076 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13077 exit(1);
13078 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13079 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013080#endif
Brett Cannon18367812003-09-19 00:59:16 +000013081
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013082 exit(0);
13083}
13084
13085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013086if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013087 ac_cv_working_tzset=yes
13088else
Matthias Kloseb9621712010-04-24 17:59:49 +000013089 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13092 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013093fi
13094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013095fi
13096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13098$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013099if test "$ac_cv_working_tzset" = yes
13100then
13101
Matthias Kloseb9621712010-04-24 17:59:49 +000013102$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013103
13104fi
13105
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013106# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13108$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13109if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13110 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013111else
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013113/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013114#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013115int
13116main ()
13117{
13118
13119struct stat st;
13120st.st_mtim.tv_nsec = 1;
13121
13122 ;
13123 return 0;
13124}
13125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013126if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013127 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013128else
Matthias Kloseb9621712010-04-24 17:59:49 +000013129 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13132fi
13133
Matthias Kloseb9621712010-04-24 17:59:49 +000013134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13135$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013136if test "$ac_cv_stat_tv_nsec" = yes
13137then
13138
Matthias Kloseb9621712010-04-24 17:59:49 +000013139$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013140
13141fi
13142
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013143# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13145$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13146if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13147 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013148else
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013150/* end confdefs.h. */
13151#include <sys/stat.h>
13152int
13153main ()
13154{
13155
13156struct stat st;
13157st.st_mtimespec.tv_nsec = 1;
13158
13159 ;
13160 return 0;
13161}
13162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013163if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013164 ac_cv_stat_tv_nsec2=yes
13165else
Matthias Kloseb9621712010-04-24 17:59:49 +000013166 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13169fi
13170
Matthias Kloseb9621712010-04-24 17:59:49 +000013171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13172$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013173if test "$ac_cv_stat_tv_nsec2" = yes
13174then
13175
Matthias Kloseb9621712010-04-24 17:59:49 +000013176$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013177
13178fi
13179
Jack Jansen666b1e72001-10-31 12:11:48 +000013180# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13182$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13183if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13184 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013185else
Matthias Kloseb9621712010-04-24 17:59:49 +000013186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013187/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013188#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013189int
13190main ()
13191{
Jack Jansen666b1e72001-10-31 12:11:48 +000013192
13193 int rtn;
13194 rtn = mvwdelch(0,0,0);
13195
Martin v. Löwis11437992002-04-12 09:54:03 +000013196 ;
13197 return 0;
13198}
13199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013200if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013201 ac_cv_mvwdelch_is_expression=yes
13202else
Matthias Kloseb9621712010-04-24 17:59:49 +000013203 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13206fi
13207
Matthias Kloseb9621712010-04-24 17:59:49 +000013208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13209$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013210
13211if test "$ac_cv_mvwdelch_is_expression" = yes
13212then
Martin v. Löwis11437992002-04-12 09:54:03 +000013213
Matthias Kloseb9621712010-04-24 17:59:49 +000013214$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013215
13216fi
13217
Matthias Kloseb9621712010-04-24 17:59:49 +000013218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13219$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13220if test "${ac_cv_window_has_flags+set}" = set; then :
13221 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013222else
Matthias Kloseb9621712010-04-24 17:59:49 +000013223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013224/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013225#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013226int
13227main ()
13228{
Jack Jansen666b1e72001-10-31 12:11:48 +000013229
13230 WINDOW *w;
13231 w->_flags = 0;
13232
Martin v. Löwis11437992002-04-12 09:54:03 +000013233 ;
13234 return 0;
13235}
13236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013237if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013238 ac_cv_window_has_flags=yes
13239else
Matthias Kloseb9621712010-04-24 17:59:49 +000013240 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13243fi
13244
Matthias Kloseb9621712010-04-24 17:59:49 +000013245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13246$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013247
Jack Jansen666b1e72001-10-31 12:11:48 +000013248
13249if test "$ac_cv_window_has_flags" = yes
13250then
Martin v. Löwis11437992002-04-12 09:54:03 +000013251
Matthias Kloseb9621712010-04-24 17:59:49 +000013252$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013253
13254fi
13255
Matthias Kloseb9621712010-04-24 17:59:49 +000013256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13257$as_echo_n "checking for is_term_resized... " >&6; }
13258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013259/* end confdefs.h. */
13260#include <curses.h>
13261int
13262main ()
13263{
13264void *x=is_term_resized
13265 ;
13266 return 0;
13267}
13268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013269if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013270
Matthias Kloseb9621712010-04-24 17:59:49 +000013271$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013272
Matthias Kloseb159a552010-04-25 21:00:44 +000013273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013274$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013275else
Matthias Kloseb9621712010-04-24 17:59:49 +000013276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13277$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013278
13279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13281
Matthias Kloseb9621712010-04-24 17:59:49 +000013282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13283$as_echo_n "checking for resize_term... " >&6; }
13284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013285/* end confdefs.h. */
13286#include <curses.h>
13287int
13288main ()
13289{
13290void *x=resize_term
13291 ;
13292 return 0;
13293}
13294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013295if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013296
Matthias Kloseb9621712010-04-24 17:59:49 +000013297$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013298
Matthias Kloseb159a552010-04-25 21:00:44 +000013299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013300$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013301else
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13303$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013304
13305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13307
Matthias Kloseb9621712010-04-24 17:59:49 +000013308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13309$as_echo_n "checking for resizeterm... " >&6; }
13310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013311/* end confdefs.h. */
13312#include <curses.h>
13313int
13314main ()
13315{
13316void *x=resizeterm
13317 ;
13318 return 0;
13319}
13320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013321if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013322
Matthias Kloseb9621712010-04-24 17:59:49 +000013323$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013324
Matthias Kloseb159a552010-04-25 21:00:44 +000013325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013326$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013327else
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13329$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013330
13331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13333
Matthias Kloseb9621712010-04-24 17:59:49 +000013334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13335$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013336
13337if test -r /dev/ptmx
13338then
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13340$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013341
Matthias Kloseb9621712010-04-24 17:59:49 +000013342$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013343
Thomas Wouters89f507f2006-12-13 04:49:30 +000013344else
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13346$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013347fi
13348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13350$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013351
13352if test -r /dev/ptc
13353then
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13355$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013358
Thomas Wouters89f507f2006-12-13 04:49:30 +000013359else
Matthias Kloseb9621712010-04-24 17:59:49 +000013360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13361$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013362fi
13363
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013364if test "$have_long_long" = yes
13365then
Matthias Kloseb9621712010-04-24 17:59:49 +000013366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13367$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13368 if test "${ac_cv_have_long_long_format+set}" = set; then :
13369 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013370else
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013372 ac_cv_have_long_long_format=no
13373else
Matthias Kloseb9621712010-04-24 17:59:49 +000013374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013375/* end confdefs.h. */
13376
13377 #include <stdio.h>
13378 #include <stddef.h>
13379 #include <string.h>
13380
13381 #ifdef HAVE_SYS_TYPES_H
13382 #include <sys/types.h>
13383 #endif
13384
13385 int main()
13386 {
13387 char buffer[256];
13388
13389 if (sprintf(buffer, "%lld", (long long)123) < 0)
13390 return 1;
13391 if (strcmp(buffer, "123"))
13392 return 1;
13393
13394 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13395 return 1;
13396 if (strcmp(buffer, "-123"))
13397 return 1;
13398
13399 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13400 return 1;
13401 if (strcmp(buffer, "123"))
13402 return 1;
13403
13404 return 0;
13405 }
13406
13407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013408if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013409 ac_cv_have_long_long_format=yes
13410else
Matthias Kloseb9621712010-04-24 17:59:49 +000013411 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013413rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13414 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013415fi
13416
13417
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013418fi
13419
Matthias Kloseb9621712010-04-24 17:59:49 +000013420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13421$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013422fi
13423
Mark Dickinson89d7d412009-12-31 20:50:59 +000013424if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013425then
13426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013428
13429fi
13430
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013431if test $ac_sys_system = Darwin
13432then
13433 LIBS="$LIBS -framework CoreFoundation"
13434fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013435
Matthias Kloseb9621712010-04-24 17:59:49 +000013436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13437$as_echo_n "checking for %zd printf() format support... " >&6; }
13438if test "${ac_cv_have_size_t_format+set}" = set; then :
13439 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013440else
Matthias Kloseb9621712010-04-24 17:59:49 +000013441 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013442 ac_cv_have_size_t_format="cross -- assuming yes"
13443
Thomas Wouters477c8d52006-05-27 19:21:47 +000013444else
Matthias Kloseb9621712010-04-24 17:59:49 +000013445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013446/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013447
Thomas Wouters477c8d52006-05-27 19:21:47 +000013448#include <stdio.h>
13449#include <stddef.h>
13450#include <string.h>
13451
Christian Heimes2c181612007-12-17 20:04:13 +000013452#ifdef HAVE_SYS_TYPES_H
13453#include <sys/types.h>
13454#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013455
13456#ifdef HAVE_SSIZE_T
13457typedef ssize_t Py_ssize_t;
13458#elif SIZEOF_VOID_P == SIZEOF_LONG
13459typedef long Py_ssize_t;
13460#else
13461typedef int Py_ssize_t;
13462#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013463
Christian Heimes2c181612007-12-17 20:04:13 +000013464int main()
13465{
13466 char buffer[256];
13467
Thomas Wouters477c8d52006-05-27 19:21:47 +000013468 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13469 return 1;
13470
Thomas Wouters89f507f2006-12-13 04:49:30 +000013471 if (strcmp(buffer, "123"))
13472 return 1;
13473
13474 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13475 return 1;
13476
13477 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013478 return 1;
13479
13480 return 0;
13481}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013482
Thomas Wouters477c8d52006-05-27 19:21:47 +000013483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013484if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013485 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013486else
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13490 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013491fi
13492
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13495$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013496if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013497
Matthias Kloseb9621712010-04-24 17:59:49 +000013498$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013499
13500fi
13501
Matthias Kloseb9621712010-04-24 17:59:49 +000013502ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013503#ifdef HAVE_SYS_TYPES_H
13504#include <sys/types.h>
13505#endif
13506#ifdef HAVE_SYS_SOCKET_H
13507#include <sys/socket.h>
13508#endif
13509
Matthias Kloseb9621712010-04-24 17:59:49 +000013510"
13511if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013512
Martin v. Löwis11437992002-04-12 09:54:03 +000013513else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013516
13517fi
13518
Michael W. Hudson54241132001-12-07 15:38:26 +000013519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13521$as_echo_n "checking for broken mbstowcs... " >&6; }
13522if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13523 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013524else
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013526 ac_cv_broken_mbstowcs=no
13527else
Matthias Kloseb9621712010-04-24 17:59:49 +000013528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013529/* end confdefs.h. */
13530
13531#include<stdlib.h>
13532int main() {
13533 size_t len = -1;
13534 const char *str = "text";
13535 len = mbstowcs(NULL, str, 0);
13536 return (len != 4);
13537}
13538
13539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013540if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013541 ac_cv_broken_mbstowcs=no
13542else
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013544fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013545rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13546 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013547fi
13548
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013549fi
13550
Matthias Kloseb9621712010-04-24 17:59:49 +000013551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13552$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013553if test "$ac_cv_broken_mbstowcs" = yes
13554then
13555
Matthias Kloseb9621712010-04-24 17:59:49 +000013556$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013557
13558fi
13559
Antoine Pitrou042b1282010-08-13 21:15:58 +000013560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13561$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
13562if test "${ac_cv_computed_gotos+set}" = set; then :
13563 $as_echo_n "(cached) " >&6
13564else
13565 if test "$cross_compiling" = yes; then :
13566 ac_cv_computed_gotos=no
13567else
13568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13569/* end confdefs.h. */
13570
13571int main(int argc, char **argv)
13572{
13573 static void *targets[1] = { &&LABEL1 };
13574 goto LABEL2;
13575LABEL1:
13576 return 0;
13577LABEL2:
13578 goto *targets[0];
13579 return 1;
13580}
13581
13582_ACEOF
13583if ac_fn_c_try_run "$LINENO"; then :
13584 ac_cv_computed_gotos=yes
13585else
13586 ac_cv_computed_gotos=no
13587fi
13588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13589 conftest.$ac_objext conftest.beam conftest.$ac_ext
13590fi
13591
13592fi
13593
13594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13595$as_echo "$ac_cv_computed_gotos" >&6; }
13596if test "$ac_cv_computed_gotos" = yes
13597then
13598
13599$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13600
13601fi
13602
Antoine Pitroub52ec782009-01-25 16:34:23 +000013603# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13605$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013606
13607# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013608if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013609 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013610if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013611then
13612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013614
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13616$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013617fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013618if test "$withval" = no
13619then
13620
13621$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13622
Matthias Kloseb9621712010-04-24 17:59:49 +000013623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13624$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013625fi
13626
Antoine Pitrou042b1282010-08-13 21:15:58 +000013627else
13628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13629$as_echo "no value specified" >&6; }
13630fi
13631
Antoine Pitroub52ec782009-01-25 16:34:23 +000013632
13633
Michael W. Hudson54241132001-12-07 15:38:26 +000013634
Jesus Cea6a792292010-05-03 21:18:48 +000013635case $ac_sys_system in
13636 OSF*) as_fn_error "OSF* systems are deprecated unless somebody volunteers. Check http://bugs.python.org/issue8606" "$LINENO" 5 ;;
13637esac
13638
13639
13640
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013641
13642
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013643for h in `(cd $srcdir;echo Python/thread_*.h)`
13644do
13645 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13646done
13647
Michael W. Hudson54241132001-12-07 15:38:26 +000013648
Neal Norwitzd24499d2005-12-18 21:36:39 +000013649SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13651$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013652for dir in $SRCDIRS; do
13653 if test ! -d $dir; then
13654 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013655 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013656done
Matthias Kloseb9621712010-04-24 17:59:49 +000013657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13658$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013659
Guido van Rossum627b2d71993-12-24 10:39:16 +000013660# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013661ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013662
Martin v. Löwis11437992002-04-12 09:54:03 +000013663cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013664# This file is a shell script that caches the results of configure
13665# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013666# scripts and configure runs, see configure's option --config-cache.
13667# It is not useful on other systems. If it contains results you don't
13668# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013669#
Martin v. Löwis11437992002-04-12 09:54:03 +000013670# config.status only pays attention to the cache file if you give it
13671# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013672#
Skip Montanaro6dead952003-09-25 14:50:04 +000013673# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013674# loading this file, other *unset* `ac_cv_foo' will be assigned the
13675# following values.
13676
13677_ACEOF
13678
Guido van Rossumf78abae1997-01-21 22:02:36 +000013679# The following way of writing the cache mishandles newlines in values,
13680# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013681# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013682# Ultrix sh set writes to stderr and can't be redirected directly,
13683# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013684(
13685 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13686 eval ac_val=\$$ac_var
13687 case $ac_val in #(
13688 *${as_nl}*)
13689 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013690 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13691$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013692 esac
13693 case $ac_var in #(
13694 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013695 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13696 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013697 esac ;;
13698 esac
13699 done
13700
Martin v. Löwis11437992002-04-12 09:54:03 +000013701 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013702 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13703 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 # `set' does not quote correctly, so add quotes: double-quote
13705 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013706 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013707 "s/'/'\\\\''/g;
13708 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013709 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013710 *)
13711 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013712 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013713 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013714 esac |
13715 sort
13716) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013717 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013718 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013719 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013720 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013721 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13722 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013723 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13724 :end' >>confcache
13725if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13726 if test -w "$cache_file"; then
13727 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13729$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013730 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013731 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013732 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13733$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013734 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013735fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013736rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013737
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013738test "x$prefix" = xNONE && prefix=$ac_default_prefix
13739# Let make expand exec_prefix.
13740test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013741
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013742DEFS=-DHAVE_CONFIG_H
13743
Skip Montanaro6dead952003-09-25 14:50:04 +000013744ac_libobjs=
13745ac_ltlibobjs=
13746for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13747 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013748 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013749 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13751 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013752 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13753 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013754done
13755LIBOBJS=$ac_libobjs
13756
13757LTLIBOBJS=$ac_ltlibobjs
13758
13759
Martin v. Löwis11437992002-04-12 09:54:03 +000013760
Matthias Kloseb9621712010-04-24 17:59:49 +000013761
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013762: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013763ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013764ac_clean_files_save=$ac_clean_files
13765ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013766{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13767$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13768as_write_fail=0
13769cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013770#! $SHELL
13771# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013772# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013773# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013774# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013775
Martin v. Löwis11437992002-04-12 09:54:03 +000013776debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013777ac_cs_recheck=false
13778ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013779
Matthias Kloseb9621712010-04-24 17:59:49 +000013780SHELL=\${CONFIG_SHELL-$SHELL}
13781export SHELL
13782_ASEOF
13783cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13784## -------------------- ##
13785## M4sh Initialization. ##
13786## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013788# Be more Bourne compatible
13789DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013790if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013791 emulate sh
13792 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013793 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013794 # is contrary to our usage. Disable this feature.
13795 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013796 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013797else
Matthias Kloseb9621712010-04-24 17:59:49 +000013798 case `(set -o) 2>/dev/null` in #(
13799 *posix*) :
13800 set -o posix ;; #(
13801 *) :
13802 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013803esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013804fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013805
13806
Matthias Kloseb9621712010-04-24 17:59:49 +000013807as_nl='
13808'
13809export as_nl
13810# Printing a long string crashes Solaris 7 /usr/bin/printf.
13811as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13812as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13813as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13814# Prefer a ksh shell builtin over an external printf program on Solaris,
13815# but without wasting forks for bash or zsh.
13816if test -z "$BASH_VERSION$ZSH_VERSION" \
13817 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13818 as_echo='print -r --'
13819 as_echo_n='print -rn --'
13820elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13821 as_echo='printf %s\n'
13822 as_echo_n='printf %s'
13823else
13824 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13825 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13826 as_echo_n='/usr/ucb/echo -n'
13827 else
13828 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13829 as_echo_n_body='eval
13830 arg=$1;
13831 case $arg in #(
13832 *"$as_nl"*)
13833 expr "X$arg" : "X\\(.*\\)$as_nl";
13834 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13835 esac;
13836 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13837 '
13838 export as_echo_n_body
13839 as_echo_n='sh -c $as_echo_n_body as_echo'
13840 fi
13841 export as_echo_body
13842 as_echo='sh -c $as_echo_body as_echo'
13843fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013844
13845# The user is always right.
13846if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013847 PATH_SEPARATOR=:
13848 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13849 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13850 PATH_SEPARATOR=';'
13851 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013852fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013853
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013854
13855# IFS
13856# We need space, tab and new line, in precisely that order. Quoting is
13857# there to prevent editors from complaining about space-tab.
13858# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13859# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013860IFS=" "" $as_nl"
13861
13862# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013863case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013864 *[\\/]* ) as_myself=$0 ;;
13865 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013866for as_dir in $PATH
13867do
13868 IFS=$as_save_IFS
13869 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013870 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13871 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013872IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013874 ;;
13875esac
13876# We did not find ourselves, most probably we were run as `sh COMMAND'
13877# in which case we are not to be found in the path.
13878if test "x$as_myself" = x; then
13879 as_myself=$0
13880fi
13881if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013882 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13883 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013884fi
13885
Matthias Kloseb9621712010-04-24 17:59:49 +000013886# Unset variables that we do not need and which cause bugs (e.g. in
13887# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13888# suppresses any "Segmentation fault" message there. '((' could
13889# trigger a bug in pdksh 5.2.14.
13890for as_var in BASH_ENV ENV MAIL MAILPATH
13891do eval test x\${$as_var+set} = xset \
13892 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013893done
13894PS1='$ '
13895PS2='> '
13896PS4='+ '
13897
13898# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013899LC_ALL=C
13900export LC_ALL
13901LANGUAGE=C
13902export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013903
Matthias Kloseb9621712010-04-24 17:59:49 +000013904# CDPATH.
13905(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13906
13907
13908# as_fn_error ERROR [LINENO LOG_FD]
13909# ---------------------------------
13910# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13911# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13912# script with status $?, using 1 if that was 0.
13913as_fn_error ()
13914{
13915 as_status=$?; test $as_status -eq 0 && as_status=1
13916 if test "$3"; then
13917 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13918 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
13919 fi
13920 $as_echo "$as_me: error: $1" >&2
13921 as_fn_exit $as_status
13922} # as_fn_error
13923
13924
13925# as_fn_set_status STATUS
13926# -----------------------
13927# Set $? to STATUS, without forking.
13928as_fn_set_status ()
13929{
13930 return $1
13931} # as_fn_set_status
13932
13933# as_fn_exit STATUS
13934# -----------------
13935# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13936as_fn_exit ()
13937{
13938 set +e
13939 as_fn_set_status $1
13940 exit $1
13941} # as_fn_exit
13942
13943# as_fn_unset VAR
13944# ---------------
13945# Portably unset VAR.
13946as_fn_unset ()
13947{
13948 { eval $1=; unset $1;}
13949}
13950as_unset=as_fn_unset
13951# as_fn_append VAR VALUE
13952# ----------------------
13953# Append the text in VALUE to the end of the definition contained in VAR. Take
13954# advantage of any shell optimizations that allow amortized linear growth over
13955# repeated appends, instead of the typical quadratic growth present in naive
13956# implementations.
13957if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13958 eval 'as_fn_append ()
13959 {
13960 eval $1+=\$2
13961 }'
13962else
13963 as_fn_append ()
13964 {
13965 eval $1=\$$1\$2
13966 }
13967fi # as_fn_append
13968
13969# as_fn_arith ARG...
13970# ------------------
13971# Perform arithmetic evaluation on the ARGs, and store the result in the
13972# global $as_val. Take advantage of shells that can avoid forks. The arguments
13973# must be portable across $(()) and expr.
13974if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13975 eval 'as_fn_arith ()
13976 {
13977 as_val=$(( $* ))
13978 }'
13979else
13980 as_fn_arith ()
13981 {
13982 as_val=`expr "$@" || test $? -eq 1`
13983 }
13984fi # as_fn_arith
13985
13986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013987if expr a : '\(a\)' >/dev/null 2>&1 &&
13988 test "X`expr 00001 : '.*\(...\)'`" = X001; then
13989 as_expr=expr
13990else
13991 as_expr=false
13992fi
13993
13994if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13995 as_basename=basename
13996else
13997 as_basename=false
13998fi
13999
Matthias Kloseb9621712010-04-24 17:59:49 +000014000if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14001 as_dirname=dirname
14002else
14003 as_dirname=false
14004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014006as_me=`$as_basename -- "$0" ||
14007$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14008 X"$0" : 'X\(//\)$' \| \
14009 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014010$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014011 sed '/^.*\/\([^/][^/]*\)\/*$/{
14012 s//\1/
14013 q
14014 }
14015 /^X\/\(\/\/\)$/{
14016 s//\1/
14017 q
14018 }
14019 /^X\/\(\/\).*/{
14020 s//\1/
14021 q
14022 }
14023 s/.*/./; q'`
14024
Matthias Kloseb9621712010-04-24 17:59:49 +000014025# Avoid depending upon Character Ranges.
14026as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14027as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14028as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14029as_cr_digits='0123456789'
14030as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014031
14032ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014033case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014034-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014035 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014036 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014037 xy) ECHO_C='\c';;
14038 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14039 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014040 esac;;
14041*)
14042 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014043esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014044
Martin v. Löwis11437992002-04-12 09:54:03 +000014045rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014046if test -d conf$$.dir; then
14047 rm -f conf$$.dir/conf$$.file
14048else
14049 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014050 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014052if (echo >conf$$.file) 2>/dev/null; then
14053 if ln -s conf$$.file conf$$ 2>/dev/null; then
14054 as_ln_s='ln -s'
14055 # ... but there are two gotchas:
14056 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14057 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14058 # In both cases, we have to default to `cp -p'.
14059 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14060 as_ln_s='cp -p'
14061 elif ln conf$$.file conf$$ 2>/dev/null; then
14062 as_ln_s=ln
14063 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014064 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014065 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014066else
14067 as_ln_s='cp -p'
14068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014069rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14070rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014071
Matthias Kloseb9621712010-04-24 17:59:49 +000014072
14073# as_fn_mkdir_p
14074# -------------
14075# Create "$as_dir" as a directory, including parents if necessary.
14076as_fn_mkdir_p ()
14077{
14078
14079 case $as_dir in #(
14080 -*) as_dir=./$as_dir;;
14081 esac
14082 test -d "$as_dir" || eval $as_mkdir_p || {
14083 as_dirs=
14084 while :; do
14085 case $as_dir in #(
14086 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14087 *) as_qdir=$as_dir;;
14088 esac
14089 as_dirs="'$as_qdir' $as_dirs"
14090 as_dir=`$as_dirname -- "$as_dir" ||
14091$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14092 X"$as_dir" : 'X\(//\)[^/]' \| \
14093 X"$as_dir" : 'X\(//\)$' \| \
14094 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14095$as_echo X"$as_dir" |
14096 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14097 s//\1/
14098 q
14099 }
14100 /^X\(\/\/\)[^/].*/{
14101 s//\1/
14102 q
14103 }
14104 /^X\(\/\/\)$/{
14105 s//\1/
14106 q
14107 }
14108 /^X\(\/\).*/{
14109 s//\1/
14110 q
14111 }
14112 s/.*/./; q'`
14113 test -d "$as_dir" && break
14114 done
14115 test -z "$as_dirs" || eval "mkdir $as_dirs"
14116 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
14117
14118
14119} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014120if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014121 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014122else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014123 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014124 as_mkdir_p=false
14125fi
14126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014127if test -x / >/dev/null 2>&1; then
14128 as_test_x='test -x'
14129else
14130 if ls -dL / >/dev/null 2>&1; then
14131 as_ls_L_option=L
14132 else
14133 as_ls_L_option=
14134 fi
14135 as_test_x='
14136 eval sh -c '\''
14137 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014138 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014139 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014140 case $1 in #(
14141 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014142 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014143 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014144 ???[sx]*):;;*)false;;esac;fi
14145 '\'' sh
14146 '
14147fi
14148as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014149
14150# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014151as_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 +000014152
14153# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014154as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014155
14156
Martin v. Löwis11437992002-04-12 09:54:03 +000014157exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014158## ----------------------------------- ##
14159## Main body of $CONFIG_STATUS script. ##
14160## ----------------------------------- ##
14161_ASEOF
14162test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014163
Matthias Kloseb9621712010-04-24 17:59:49 +000014164cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14165# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014166# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014167# values after options handling.
14168ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014169This file was extended by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +000014170generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014171
14172 CONFIG_FILES = $CONFIG_FILES
14173 CONFIG_HEADERS = $CONFIG_HEADERS
14174 CONFIG_LINKS = $CONFIG_LINKS
14175 CONFIG_COMMANDS = $CONFIG_COMMANDS
14176 $ $0 $@
14177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014178on `(hostname || uname -n) 2>/dev/null | sed 1q`
14179"
14180
Martin v. Löwis11437992002-04-12 09:54:03 +000014181_ACEOF
14182
Matthias Kloseb9621712010-04-24 17:59:49 +000014183case $ac_config_files in *"
14184"*) set x $ac_config_files; shift; ac_config_files=$*;;
14185esac
14186
14187case $ac_config_headers in *"
14188"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14189esac
14190
14191
14192cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014193# Files that config.status was made for.
Antoine Pitrou042b1282010-08-13 21:15:58 +000014194config_files="`echo $ac_config_files`"
14195config_headers="`echo $ac_config_headers`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014197_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014198
Matthias Kloseb9621712010-04-24 17:59:49 +000014199cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014200ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014201\`$as_me' instantiates files and other configuration actions
14202from templates according to the current configuration. Unless the files
14203and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014204
Matthias Kloseb9621712010-04-24 17:59:49 +000014205Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014206
14207 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014208 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014209 --config print configuration, then exit
14210 -q, --quiet, --silent
14211 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014212 -d, --debug don't remove temporary files
14213 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014214 --file=FILE[:TEMPLATE]
14215 instantiate the configuration file FILE
14216 --header=FILE[:TEMPLATE]
14217 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014218
14219Configuration files:
14220$config_files
14221
14222Configuration headers:
14223$config_headers
14224
Matthias Kloseb9621712010-04-24 17:59:49 +000014225Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014226
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014228cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14229ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014230ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014231python config.status 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014232configured by $0, generated by GNU Autoconf 2.65,
14233 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014234
Matthias Kloseb9621712010-04-24 17:59:49 +000014235Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014236This config.status script is free software; the Free Software Foundation
14237gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014238
14239ac_pwd='$ac_pwd'
14240srcdir='$srcdir'
14241INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014242test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014243_ACEOF
14244
Matthias Kloseb9621712010-04-24 17:59:49 +000014245cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14246# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014247ac_need_defaults=:
14248while test $# != 0
14249do
14250 case $1 in
14251 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014252 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14253 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014254 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014255 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014256 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014257 ac_option=$1
14258 ac_optarg=$2
14259 ac_shift=shift
14260 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014261 esac
14262
Skip Montanaro6dead952003-09-25 14:50:04 +000014263 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014264 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014265 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14266 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014267 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 $as_echo "$ac_cs_version"; exit ;;
14269 --config | --confi | --conf | --con | --co | --c )
14270 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014271 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014272 debug=: ;;
14273 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014274 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014275 case $ac_optarg in
14276 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14277 esac
14278 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014279 ac_need_defaults=false;;
14280 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014281 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014282 case $ac_optarg in
14283 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14284 esac
14285 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014286 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287 --he | --h)
14288 # Conflict between --help and --header
Matthias Kloseb9621712010-04-24 17:59:49 +000014289 as_fn_error "ambiguous option: \`$1'
14290Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014291 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014292 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014293 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14294 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14295 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014296
14297 # This is an error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014298 -*) as_fn_error "unrecognized option: \`$1'
14299Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014300
Matthias Kloseb9621712010-04-24 17:59:49 +000014301 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014302 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014303
14304 esac
14305 shift
14306done
14307
Skip Montanaro6dead952003-09-25 14:50:04 +000014308ac_configure_extra_args=
14309
14310if $ac_cs_silent; then
14311 exec 6>/dev/null
14312 ac_configure_extra_args="$ac_configure_extra_args --silent"
14313fi
14314
14315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014316cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014317if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014318 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14319 shift
14320 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14321 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014322 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014324fi
14325
Martin v. Löwis11437992002-04-12 09:54:03 +000014326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014327cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014328exec 5>>config.log
14329{
14330 echo
14331 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14332## Running $as_me. ##
14333_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014334 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014335} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014338cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014339_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014340
Matthias Kloseb9621712010-04-24 17:59:49 +000014341cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014342
14343# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014344for ac_config_target in $ac_config_targets
14345do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014346 case $ac_config_target in
14347 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14348 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14349 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014350 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14351 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014352 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14353 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014354 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014355
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014357 esac
14358done
14359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014360
Martin v. Löwis11437992002-04-12 09:54:03 +000014361# If the user did not use the arguments to specify the items to instantiate,
14362# then the envvar interface is used. Set only those that are not.
14363# We use the long form for the default assignment because of an extremely
14364# bizarre bug on SunOS 4.1.3.
14365if $ac_need_defaults; then
14366 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14367 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14368fi
14369
Skip Montanaro6dead952003-09-25 14:50:04 +000014370# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014371# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014372# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014373# Hook for its removal unless debugging.
14374# Note that there is a small window in which the directory will not be cleaned:
14375# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014376$debug ||
14377{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014378 tmp=
14379 trap 'exit_status=$?
14380 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14381' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014382 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014383}
Martin v. Löwis11437992002-04-12 09:54:03 +000014384# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014385
Martin v. Löwis11437992002-04-12 09:54:03 +000014386{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014387 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014388 test -n "$tmp" && test -d "$tmp"
14389} ||
14390{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014391 tmp=./conf$$-$RANDOM
14392 (umask 077 && mkdir "$tmp")
Matthias Kloseb9621712010-04-24 17:59:49 +000014393} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014394
Matthias Kloseb9621712010-04-24 17:59:49 +000014395# Set up the scripts for CONFIG_FILES section.
14396# No need to generate them if there are no CONFIG_FILES.
14397# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014398if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014399
Matthias Kloseb9621712010-04-24 17:59:49 +000014400
14401ac_cr=`echo X | tr X '\015'`
14402# On cygwin, bash can eat \r inside `` if the user requested igncr.
14403# But we know of no other shell where ac_cr would be empty at this
14404# point, so we can use a bashism as a fallback.
14405if test "x$ac_cr" = x; then
14406 eval ac_cr=\$\'\\r\'
14407fi
14408ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14409if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14410 ac_cs_awk_cr='\r'
14411else
14412 ac_cs_awk_cr=$ac_cr
14413fi
14414
14415echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014416_ACEOF
14417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014418
Matthias Kloseb9621712010-04-24 17:59:49 +000014419{
14420 echo "cat >conf$$subs.awk <<_ACEOF" &&
14421 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14422 echo "_ACEOF"
14423} >conf$$subs.sh ||
14424 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14425ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014426ac_delim='%!_!# '
14427for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014428 . ./conf$$subs.sh ||
14429 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014430
Matthias Kloseb9621712010-04-24 17:59:49 +000014431 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14432 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014433 break
14434 elif $ac_last_try; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014435 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014436 else
14437 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014438 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014439done
Matthias Kloseb9621712010-04-24 17:59:49 +000014440rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014441
Matthias Kloseb9621712010-04-24 17:59:49 +000014442cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14443cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014445sed -n '
14446h
14447s/^/S["/; s/!.*/"]=/
14448p
14449g
14450s/^[^!]*!//
14451:repl
14452t repl
14453s/'"$ac_delim"'$//
14454t delim
14455:nl
14456h
14457s/\(.\{148\}\)..*/\1/
14458t more1
14459s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14460p
14461n
14462b repl
14463:more1
14464s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14465p
14466g
14467s/.\{148\}//
14468t nl
14469:delim
14470h
14471s/\(.\{148\}\)..*/\1/
14472t more2
14473s/["\\]/\\&/g; s/^/"/; s/$/"/
14474p
14475b
14476:more2
14477s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14478p
14479g
14480s/.\{148\}//
14481t delim
14482' <conf$$subs.awk | sed '
14483/^[^""]/{
14484 N
14485 s/\n//
14486}
14487' >>$CONFIG_STATUS || ac_write_fail=1
14488rm -f conf$$subs.awk
14489cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14490_ACAWK
14491cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14492 for (key in S) S_is_set[key] = 1
14493 FS = ""
14494
14495}
14496{
14497 line = $ 0
14498 nfields = split(line, field, "@")
14499 substed = 0
14500 len = length(field[1])
14501 for (i = 2; i < nfields; i++) {
14502 key = field[i]
14503 keylen = length(key)
14504 if (S_is_set[key]) {
14505 value = S[key]
14506 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14507 len += length(value) + length(field[++i])
14508 substed = 1
14509 } else
14510 len += 1 + keylen
14511 }
14512
14513 print line
14514}
14515
14516_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014518cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14519if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14520 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14521else
14522 cat
14523fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14524 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014525_ACEOF
14526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014527# VPATH may cause trouble with some makes, so we remove $(srcdir),
14528# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14529# trailing colons and then remove the whole line if VPATH becomes empty
14530# (actually we leave an empty line to preserve line numbers).
14531if test "x$srcdir" = x.; then
14532 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14533s/:*\$(srcdir):*/:/
14534s/:*\${srcdir}:*/:/
14535s/:*@srcdir@:*/:/
14536s/^\([^=]*=[ ]*\):*/\1/
14537s/:*$//
14538s/^[^=]*=[ ]*$//
14539}'
14540fi
14541
Matthias Kloseb9621712010-04-24 17:59:49 +000014542cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014543fi # test -n "$CONFIG_FILES"
14544
Matthias Kloseb9621712010-04-24 17:59:49 +000014545# Set up the scripts for CONFIG_HEADERS section.
14546# No need to generate them if there are no CONFIG_HEADERS.
14547# This happens for instance with `./config.status Makefile'.
14548if test -n "$CONFIG_HEADERS"; then
14549cat >"$tmp/defines.awk" <<\_ACAWK ||
14550BEGIN {
14551_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014552
Matthias Kloseb9621712010-04-24 17:59:49 +000014553# Transform confdefs.h into an awk script `defines.awk', embedded as
14554# here-document in config.status, that substitutes the proper values into
14555# config.h.in to produce config.h.
14556
14557# Create a delimiter string that does not exist in confdefs.h, to ease
14558# handling of long lines.
14559ac_delim='%!_!# '
14560for ac_last_try in false false :; do
14561 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14562 if test -z "$ac_t"; then
14563 break
14564 elif $ac_last_try; then
14565 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14566 else
14567 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14568 fi
14569done
14570
14571# For the awk script, D is an array of macro values keyed by name,
14572# likewise P contains macro parameters if any. Preserve backslash
14573# newline sequences.
14574
14575ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14576sed -n '
14577s/.\{148\}/&'"$ac_delim"'/g
14578t rset
14579:rset
14580s/^[ ]*#[ ]*define[ ][ ]*/ /
14581t def
14582d
14583:def
14584s/\\$//
14585t bsnl
14586s/["\\]/\\&/g
14587s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14588D["\1"]=" \3"/p
14589s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14590d
14591:bsnl
14592s/["\\]/\\&/g
14593s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14594D["\1"]=" \3\\\\\\n"\\/p
14595t cont
14596s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14597t cont
14598d
14599:cont
14600n
14601s/.\{148\}/&'"$ac_delim"'/g
14602t clear
14603:clear
14604s/\\$//
14605t bsnlc
14606s/["\\]/\\&/g; s/^/"/; s/$/"/p
14607d
14608:bsnlc
14609s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14610b cont
14611' <confdefs.h | sed '
14612s/'"$ac_delim"'/"\\\
14613"/g' >>$CONFIG_STATUS || ac_write_fail=1
14614
14615cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14616 for (key in D) D_is_set[key] = 1
14617 FS = ""
14618}
14619/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14620 line = \$ 0
14621 split(line, arg, " ")
14622 if (arg[1] == "#") {
14623 defundef = arg[2]
14624 mac1 = arg[3]
14625 } else {
14626 defundef = substr(arg[1], 2)
14627 mac1 = arg[2]
14628 }
14629 split(mac1, mac2, "(") #)
14630 macro = mac2[1]
14631 prefix = substr(line, 1, index(line, defundef) - 1)
14632 if (D_is_set[macro]) {
14633 # Preserve the white space surrounding the "#".
14634 print prefix "define", macro P[macro] D[macro]
14635 next
14636 } else {
14637 # Replace #undef with comments. This is necessary, for example,
14638 # in the case of _POSIX_SOURCE, which is predefined and required
14639 # on some systems where configure will not decide to define it.
14640 if (defundef == "undef") {
14641 print "/*", prefix defundef, macro, "*/"
14642 next
14643 }
14644 }
14645}
14646{ print }
14647_ACAWK
14648_ACEOF
14649cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14650 as_fn_error "could not setup config headers machinery" "$LINENO" 5
14651fi # test -n "$CONFIG_HEADERS"
14652
14653
14654eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14655shift
14656for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014657do
14658 case $ac_tag in
14659 :[FHLC]) ac_mode=$ac_tag; continue;;
14660 esac
14661 case $ac_mode$ac_tag in
14662 :[FHL]*:*);;
Matthias Kloseb9621712010-04-24 17:59:49 +000014663 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014664 :[FH]-) ac_tag=-:-;;
14665 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14666 esac
14667 ac_save_IFS=$IFS
14668 IFS=:
14669 set x $ac_tag
14670 IFS=$ac_save_IFS
14671 shift
14672 ac_file=$1
14673 shift
14674
14675 case $ac_mode in
14676 :L) ac_source=$1;;
14677 :[FH])
14678 ac_file_inputs=
14679 for ac_f
14680 do
14681 case $ac_f in
14682 -) ac_f="$tmp/stdin";;
14683 *) # Look for the file first in the build tree, then in the source tree
14684 # (if the path is not absolute). The absolute path cannot be DOS-style,
14685 # because $ac_f cannot contain `:'.
14686 test -f "$ac_f" ||
14687 case $ac_f in
14688 [\\/$]*) false;;
14689 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14690 esac ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014691 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014692 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014693 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14694 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014695 done
14696
14697 # Let's still pretend it is `configure' which instantiates (i.e., don't
14698 # use $as_me), people would be surprised to read:
14699 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014700 configure_input='Generated from '`
14701 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14702 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014703 if test x"$ac_file" != x-; then
14704 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014705 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14706$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014707 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014708 # Neutralize special characters interpreted by sed in replacement strings.
14709 case $configure_input in #(
14710 *\&* | *\|* | *\\* )
14711 ac_sed_conf_input=`$as_echo "$configure_input" |
14712 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14713 *) ac_sed_conf_input=$configure_input;;
14714 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014715
14716 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014717 *:-:* | *:-) cat >"$tmp/stdin" \
14718 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014719 esac
14720 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014721 esac
14722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014723 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014724$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014725 X"$ac_file" : 'X\(//\)[^/]' \| \
14726 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014727 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014728$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014729 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14730 s//\1/
14731 q
14732 }
14733 /^X\(\/\/\)[^/].*/{
14734 s//\1/
14735 q
14736 }
14737 /^X\(\/\/\)$/{
14738 s//\1/
14739 q
14740 }
14741 /^X\(\/\).*/{
14742 s//\1/
14743 q
14744 }
14745 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014746 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014747 ac_builddir=.
14748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014749case "$ac_dir" in
14750.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14751*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014752 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014753 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014754 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014755 case $ac_top_builddir_sub in
14756 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14757 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14758 esac ;;
14759esac
14760ac_abs_top_builddir=$ac_pwd
14761ac_abs_builddir=$ac_pwd$ac_dir_suffix
14762# for backward compatibility:
14763ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014764
14765case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014766 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014767 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014768 ac_top_srcdir=$ac_top_builddir_sub
14769 ac_abs_top_srcdir=$ac_pwd ;;
14770 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014771 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014772 ac_top_srcdir=$srcdir
14773 ac_abs_top_srcdir=$srcdir ;;
14774 *) # Relative name.
14775 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14776 ac_top_srcdir=$ac_top_build_prefix$srcdir
14777 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014778esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014779ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014780
Martin v. Löwis11437992002-04-12 09:54:03 +000014781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014782 case $ac_mode in
14783 :F)
14784 #
14785 # CONFIG_FILE
14786 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014787
14788 case $INSTALL in
14789 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014790 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014791 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014792_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014793
Matthias Kloseb9621712010-04-24 17:59:49 +000014794cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014795# If the template does not know about datarootdir, expand it.
14796# FIXME: This hack should be removed a few years after 2.60.
14797ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014798ac_sed_dataroot='
14799/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014800 p
14801 q
14802}
14803/@datadir@/p
14804/@docdir@/p
14805/@infodir@/p
14806/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014807/@mandir@/p'
14808case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014809*datarootdir*) ac_datarootdir_seen=yes;;
14810*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014811 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14812$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014814cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815 ac_datarootdir_hack='
14816 s&@datadir@&$datadir&g
14817 s&@docdir@&$docdir&g
14818 s&@infodir@&$infodir&g
14819 s&@localedir@&$localedir&g
14820 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014821 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014822esac
14823_ACEOF
14824
14825# Neutralize VPATH when `$srcdir' = `.'.
14826# Shell code in configure.ac might set extrasub.
14827# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014828cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14829ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014830$extrasub
14831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014832cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014833:t
14834/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014835s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014836s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014837s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014838s&@srcdir@&$ac_srcdir&;t t
14839s&@abs_srcdir@&$ac_abs_srcdir&;t t
14840s&@top_srcdir@&$ac_top_srcdir&;t t
14841s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14842s&@builddir@&$ac_builddir&;t t
14843s&@abs_builddir@&$ac_abs_builddir&;t t
14844s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14845s&@INSTALL@&$ac_INSTALL&;t t
14846$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014847"
14848eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
14849 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014851test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14852 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14853 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014854 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014855which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014856$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014857which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014859 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014860 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014861 -) cat "$tmp/out" && rm -f "$tmp/out";;
14862 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14863 esac \
14864 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014865 ;;
14866 :H)
14867 #
14868 # CONFIG_HEADER
14869 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014870 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014871 {
14872 $as_echo "/* $configure_input */" \
14873 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14874 } >"$tmp/config.h" \
14875 || as_fn_error "could not create $ac_file" "$LINENO" 5
14876 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14877 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14878$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014879 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014880 rm -f "$ac_file"
14881 mv "$tmp/config.h" "$ac_file" \
14882 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014883 fi
14884 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014885 $as_echo "/* $configure_input */" \
14886 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
14887 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014888 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014891
14892 esac
14893
14894done # for ac_tag
14895
Guido van Rossum627b2d71993-12-24 10:39:16 +000014896
Matthias Kloseb9621712010-04-24 17:59:49 +000014897as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014898_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014899ac_clean_files=$ac_clean_files_save
14900
Matthias Kloseb9621712010-04-24 17:59:49 +000014901test $ac_write_fail = 0 ||
14902 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14903
Martin v. Löwis11437992002-04-12 09:54:03 +000014904
14905# configure is writing to config.log, and then calls config.status.
14906# config.status does its own redirection, appending to config.log.
14907# Unfortunately, on DOS this fails, as config.log is still kept open
14908# by configure, so config.status won't be able to write to it; its
14909# output is simply discarded. So we exec the FD to /dev/null,
14910# effectively closing config.log, so it can be properly (re)opened and
14911# appended to by config.status. When coming back to configure, we
14912# need to make the FD available again.
14913if test "$no_create" != yes; then
14914 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014915 ac_config_status_args=
14916 test "$silent" = yes &&
14917 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000014918 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000014919 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000014920 exec 5>>config.log
14921 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14922 # would make configure fail if this is the last instruction.
Matthias Kloseb9621712010-04-24 17:59:49 +000014923 $ac_cs_success || as_fn_exit $?
14924fi
14925if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14926 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14927$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014928fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014929
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014930
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014931echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014932if test ! -f Modules/Setup
14933then
14934 cp $srcdir/Modules/Setup.dist Modules/Setup
14935fi
14936
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014937echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014938if test ! -f Modules/Setup.local
14939then
14940 echo "# Edit this file for local setup changes" >Modules/Setup.local
14941fi
14942
14943echo "creating Makefile"
14944$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
14945 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000014946 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014947mv config.c Modules