blob: 3655b27aa337665a2701a8c45d2144d0b9eaf361 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis1a415762010-05-28 15:44:20 +00002# From configure.in Revision: 81078 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Matthias Kloseb9621712010-04-24 17:59:49 +00004# Generated by GNU Autoconf 2.65 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Matthias Kloseb9621712010-04-24 17:59:49 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
11# Inc.
12#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
220 BASH_ENV=/dev/null
221 ENV=/dev/null
222 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
223 export CONFIG_SHELL
224 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
225fi
226
227 if test x$as_have_required = xno; then :
228 $as_echo "$0: This script requires a shell more modern than all"
229 $as_echo "$0: the shells that I found on your system."
230 if test x${ZSH_VERSION+set} = xset ; then
231 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
232 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
233 else
234 $as_echo "$0: Please tell bug-autoconf@gnu.org and
235$0: http://bugs.python.org/ about your system, including
236$0: any error possibly output before this message. Then
237$0: install a modern shell, or manually run the script
238$0: under such a shell if you do have one."
239 fi
240 exit 1
241fi
242fi
243fi
244SHELL=${CONFIG_SHELL-/bin/sh}
245export SHELL
246# Unset more variables known to interfere with behavior of common tools.
247CLICOLOR_FORCE= GREP_OPTIONS=
248unset CLICOLOR_FORCE GREP_OPTIONS
249
250## --------------------- ##
251## M4sh Shell Functions. ##
252## --------------------- ##
253# as_fn_unset VAR
254# ---------------
255# Portably unset VAR.
256as_fn_unset ()
257{
258 { eval $1=; unset $1;}
259}
260as_unset=as_fn_unset
261
262# as_fn_set_status STATUS
263# -----------------------
264# Set $? to STATUS, without forking.
265as_fn_set_status ()
266{
267 return $1
268} # as_fn_set_status
269
270# as_fn_exit STATUS
271# -----------------
272# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
273as_fn_exit ()
274{
275 set +e
276 as_fn_set_status $1
277 exit $1
278} # as_fn_exit
279
280# as_fn_mkdir_p
281# -------------
282# Create "$as_dir" as a directory, including parents if necessary.
283as_fn_mkdir_p ()
284{
285
286 case $as_dir in #(
287 -*) as_dir=./$as_dir;;
288 esac
289 test -d "$as_dir" || eval $as_mkdir_p || {
290 as_dirs=
291 while :; do
292 case $as_dir in #(
293 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
294 *) as_qdir=$as_dir;;
295 esac
296 as_dirs="'$as_qdir' $as_dirs"
297 as_dir=`$as_dirname -- "$as_dir" ||
298$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
299 X"$as_dir" : 'X\(//\)[^/]' \| \
300 X"$as_dir" : 'X\(//\)$' \| \
301 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
302$as_echo X"$as_dir" |
303 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)[^/].*/{
308 s//\1/
309 q
310 }
311 /^X\(\/\/\)$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\).*/{
316 s//\1/
317 q
318 }
319 s/.*/./; q'`
320 test -d "$as_dir" && break
321 done
322 test -z "$as_dirs" || eval "mkdir $as_dirs"
323 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
324
325
326} # as_fn_mkdir_p
327# as_fn_append VAR VALUE
328# ----------------------
329# Append the text in VALUE to the end of the definition contained in VAR. Take
330# advantage of any shell optimizations that allow amortized linear growth over
331# repeated appends, instead of the typical quadratic growth present in naive
332# implementations.
333if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
334 eval 'as_fn_append ()
335 {
336 eval $1+=\$2
337 }'
338else
339 as_fn_append ()
340 {
341 eval $1=\$$1\$2
342 }
343fi # as_fn_append
344
345# as_fn_arith ARG...
346# ------------------
347# Perform arithmetic evaluation on the ARGs, and store the result in the
348# global $as_val. Take advantage of shells that can avoid forks. The arguments
349# must be portable across $(()) and expr.
350if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
351 eval 'as_fn_arith ()
352 {
353 as_val=$(( $* ))
354 }'
355else
356 as_fn_arith ()
357 {
358 as_val=`expr "$@" || test $? -eq 1`
359 }
360fi # as_fn_arith
361
362
363# as_fn_error ERROR [LINENO LOG_FD]
364# ---------------------------------
365# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
366# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
367# script with status $?, using 1 if that was 0.
368as_fn_error ()
369{
370 as_status=$?; test $as_status -eq 0 && as_status=1
371 if test "$3"; then
372 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
374 fi
375 $as_echo "$as_me: error: $1" >&2
376 as_fn_exit $as_status
377} # as_fn_error
378
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000379if expr a : '\(a\)' >/dev/null 2>&1 &&
380 test "X`expr 00001 : '.*\(...\)'`" = X001; then
381 as_expr=expr
382else
383 as_expr=false
384fi
385
386if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
387 as_basename=basename
388else
389 as_basename=false
390fi
391
Matthias Kloseb9621712010-04-24 17:59:49 +0000392if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
393 as_dirname=dirname
394else
395 as_dirname=false
396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000397
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000398as_me=`$as_basename -- "$0" ||
399$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
400 X"$0" : 'X\(//\)$' \| \
401 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000402$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000403 sed '/^.*\/\([^/][^/]*\)\/*$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\/\)$/{
408 s//\1/
409 q
410 }
411 /^X\/\(\/\).*/{
412 s//\1/
413 q
414 }
415 s/.*/./; q'`
416
Matthias Kloseb9621712010-04-24 17:59:49 +0000417# Avoid depending upon Character Ranges.
418as_cr_letters='abcdefghijklmnopqrstuvwxyz'
419as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
420as_cr_Letters=$as_cr_letters$as_cr_LETTERS
421as_cr_digits='0123456789'
422as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000423
424
Matthias Kloseb9621712010-04-24 17:59:49 +0000425 as_lineno_1=$LINENO as_lineno_1a=$LINENO
426 as_lineno_2=$LINENO as_lineno_2a=$LINENO
427 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
428 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
429 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430 sed -n '
431 p
432 /[$]LINENO/=
433 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000434 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000435 s/[$]LINENO.*/&-/
436 t lineno
437 b
438 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000439 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440 :loop
441 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000443 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000444 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000445 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000446 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000447
448 # Don't try to exec as it changes $[0], causing all sort of problems
449 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 # original and so on. Autoconf is especially sensitive to this).
451 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 # Exit status is that of the last command.
453 exit
454}
455
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000457case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000458-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000459 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000460 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000461 xy) ECHO_C='\c';;
462 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
463 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000464 esac;;
465*)
466 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000467esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000468
Martin v. Löwis11437992002-04-12 09:54:03 +0000469rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000470if test -d conf$$.dir; then
471 rm -f conf$$.dir/conf$$.file
472else
473 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000474 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000475fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000476if (echo >conf$$.file) 2>/dev/null; then
477 if ln -s conf$$.file conf$$ 2>/dev/null; then
478 as_ln_s='ln -s'
479 # ... but there are two gotchas:
480 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
481 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
482 # In both cases, we have to default to `cp -p'.
483 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
484 as_ln_s='cp -p'
485 elif ln conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s=ln
487 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000490else
491 as_ln_s='cp -p'
492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000493rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
494rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000495
Skip Montanaro6dead952003-09-25 14:50:04 +0000496if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000497 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000498else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000499 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000500 as_mkdir_p=false
501fi
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503if test -x / >/dev/null 2>&1; then
504 as_test_x='test -x'
505else
506 if ls -dL / >/dev/null 2>&1; then
507 as_ls_L_option=L
508 else
509 as_ls_L_option=
510 fi
511 as_test_x='
512 eval sh -c '\''
513 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000514 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000515 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000516 case $1 in #(
517 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000519 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000520 ???[sx]*):;;*)false;;esac;fi
521 '\'' sh
522 '
523fi
524as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000525
526# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000527as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000528
529# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000530as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000531
532
Matthias Kloseb9621712010-04-24 17:59:49 +0000533test -n "$DJDIR" || exec 7<&0 </dev/null
534exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000535
536# Name of the host.
537# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
538# so uname gets run too.
539ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
540
Martin v. Löwis11437992002-04-12 09:54:03 +0000541#
542# Initializations.
543#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000545ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000546ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000547LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000548cross_compiling=no
549subdirs=
550MFLAGS=
551MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
Martin v. Löwis11437992002-04-12 09:54:03 +0000553# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000554PACKAGE_NAME='python'
555PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000556PACKAGE_VERSION='3.2'
557PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000558PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000559PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
561ac_unique_file="Include/object.h"
562# Factoring default headers for most tests.
563ac_includes_default="\
564#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000565#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# include <sys/types.h>
567#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000569# include <sys/stat.h>
570#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000571#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000572# include <stdlib.h>
573# include <stddef.h>
574#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <stdlib.h>
577# endif
578#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000579#ifdef HAVE_STRING_H
580# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# include <memory.h>
582# endif
583# include <string.h>
584#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000585#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000586# include <strings.h>
587#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000588#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000590#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000591#ifdef HAVE_STDINT_H
592# include <stdint.h>
593#endif
594#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000595# include <unistd.h>
596#endif"
597
Matthias Kloseb9621712010-04-24 17:59:49 +0000598ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000599SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000600THREADHEADERS
601LIBC
602LIBM
603HAVE_GETHOSTBYNAME
604HAVE_GETHOSTBYNAME_R
605HAVE_GETHOSTBYNAME_R_3_ARG
606HAVE_GETHOSTBYNAME_R_5_ARG
607HAVE_GETHOSTBYNAME_R_6_ARG
608LIBOBJS
609TRUE
610MACHDEP_OBJS
611DYNLOADFILE
612DLINCLDIR
613THREADOBJ
614LDLAST
615USE_THREAD_MODULE
616SIGNAL_OBJS
617USE_SIGNAL_MODULE
618LIBFFI_INCLUDEDIR
619PKG_CONFIG
620SHLIBS
621CFLAGSFORSHARED
622LINKFORSHARED
623CCSHARED
624BLDSHARED
625LDCXXSHARED
626LDSHARED
627SO
628LIBTOOL_CRUFT
629OTHER_LIBTOOL_OPT
630UNIVERSAL_ARCH_FLAGS
631BASECFLAGS
632OPT
633LN
634INSTALL_DATA
635INSTALL_SCRIPT
636INSTALL_PROGRAM
637SVNVERSION
638ARFLAGS
639AR
640RANLIB
641GNULD
642LINKCC
643RUNSHARED
644INSTSONAME
645LDLIBRARYDIR
646BLDLIBRARY
647DLLLIBRARY
648LDLIBRARY
649LIBRARY
650BUILDEXEEXT
651EGREP
652GREP
653CPP
654MAINCC
655CXX
656OBJEXT
657EXEEXT
658ac_ct_CC
659CPPFLAGS
660LDFLAGS
661CFLAGS
662CC
663EXPORT_MACOSX_DEPLOYMENT_TARGET
664CONFIGURE_MACOSX_DEPLOYMENT_TARGET
665SGI_ABI
666MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000667FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000668FRAMEWORKUNIXTOOLSPREFIX
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKALTINSTALLFIRST
671FRAMEWORKINSTALLLAST
672FRAMEWORKINSTALLFIRST
673PYTHONFRAMEWORKINSTALLDIR
674PYTHONFRAMEWORKPREFIX
675PYTHONFRAMEWORKDIR
676PYTHONFRAMEWORKIDENTIFIER
677PYTHONFRAMEWORK
678LIPO_32BIT_FLAGS
679ARCH_RUN_32BIT
680UNIVERSALSDK
681CONFIG_ARGS
682SOVERSION
683VERSION
684target_alias
685host_alias
686build_alias
687LIBS
688ECHO_T
689ECHO_N
690ECHO_C
691DEFS
692mandir
693localedir
694libdir
695psdir
696pdfdir
697dvidir
698htmldir
699infodir
700docdir
701oldincludedir
702includedir
703localstatedir
704sharedstatedir
705sysconfdir
706datadir
707datarootdir
708libexecdir
709sbindir
710bindir
711program_transform_name
712prefix
713exec_prefix
714PACKAGE_URL
715PACKAGE_BUGREPORT
716PACKAGE_STRING
717PACKAGE_VERSION
718PACKAGE_TARNAME
719PACKAGE_NAME
720PATH_SEPARATOR
721SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000722ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000723ac_user_opts='
724enable_option_checking
725enable_universalsdk
726with_universal_archs
727with_framework_name
728enable_framework
729with_gcc
730with_cxx_main
731with_suffix
732enable_shared
733enable_profiling
734with_pydebug
735with_libs
736with_system_expat
737with_system_ffi
738with_dbmliborder
739with_signal_module
740with_dec_threads
741with_threads
742with_thread
743enable_ipv6
744with_doc_strings
745with_tsc
746with_pymalloc
747with_valgrind
748with_wctype_functions
749with_fpectl
750with_libm
751with_libc
752enable_big_digits
753with_wide_unicode
754with_computed_gotos
755'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000756 ac_precious_vars='build_alias
757host_alias
758target_alias
759CC
760CFLAGS
761LDFLAGS
762LIBS
763CPPFLAGS
764CPP'
765
Guido van Rossum627b2d71993-12-24 10:39:16 +0000766
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000768ac_init_help=
769ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000770ac_unrecognized_opts=
771ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000772# The variables have the same names as the options, with
773# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000774cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000775exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000776no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000777no_recursion=
778prefix=NONE
779program_prefix=NONE
780program_suffix=NONE
781program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000782silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000783site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000786x_includes=NONE
787x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000788
789# Installation directory options.
790# These are left unexpanded so users can "make install exec_prefix=/foo"
791# and all the variables that are supposed to be based on exec_prefix
792# by default will actually change.
793# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000794# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000795bindir='${exec_prefix}/bin'
796sbindir='${exec_prefix}/sbin'
797libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000798datarootdir='${prefix}/share'
799datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000800sysconfdir='${prefix}/etc'
801sharedstatedir='${prefix}/com'
802localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000803includedir='${prefix}/include'
804oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000805docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
806infodir='${datarootdir}/info'
807htmldir='${docdir}'
808dvidir='${docdir}'
809pdfdir='${docdir}'
810psdir='${docdir}'
811libdir='${exec_prefix}/lib'
812localedir='${datarootdir}/locale'
813mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814
Guido van Rossum7f43da71994-08-01 12:15:30 +0000815ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000816ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000818do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819 # If the previous option needs an argument, assign it.
820 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822 ac_prev=
823 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000824 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826 case $ac_option in
827 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
828 *) ac_optarg=yes ;;
829 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831 # Accept the important Cygnus configure options, so we can diagnose typos.
832
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833 case $ac_dashdash$ac_option in
834 --)
835 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000837 -bindir | --bindir | --bindi | --bind | --bin | --bi)
838 ac_prev=bindir ;;
839 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841
842 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000845 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000847 -cache-file | --cache-file | --cache-fil | --cache-fi \
848 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
849 ac_prev=cache_file ;;
850 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
851 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000852 cache_file=$ac_optarg ;;
853
854 --config-cache | -C)
855 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000860 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000861
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
863 | --dataroo | --dataro | --datar)
864 ac_prev=datarootdir ;;
865 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
866 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
867 datarootdir=$ac_optarg ;;
868
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000870 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000872 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
873 as_fn_error "invalid feature name: $ac_useropt"
874 ac_useropt_orig=$ac_useropt
875 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
876 case $ac_user_opts in
877 *"
878"enable_$ac_useropt"
879"*) ;;
880 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
881 ac_unrecognized_sep=', ';;
882 esac
883 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884
885 -docdir | --docdir | --docdi | --doc | --do)
886 ac_prev=docdir ;;
887 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
888 docdir=$ac_optarg ;;
889
890 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
891 ac_prev=dvidir ;;
892 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
893 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894
895 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000896 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000897 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000898 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
899 as_fn_error "invalid feature name: $ac_useropt"
900 ac_useropt_orig=$ac_useropt
901 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
902 case $ac_user_opts in
903 *"
904"enable_$ac_useropt"
905"*) ;;
906 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
907 ac_unrecognized_sep=', ';;
908 esac
909 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
912 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
913 | --exec | --exe | --ex)
914 ac_prev=exec_prefix ;;
915 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
916 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
917 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
920 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000921 # Obsolete; use --with-gas.
922 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 -help | --help | --hel | --he | -h)
925 ac_init_help=long ;;
926 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
927 ac_init_help=recursive ;;
928 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
929 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930
931 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000936 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
937 ac_prev=htmldir ;;
938 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
939 | --ht=*)
940 htmldir=$ac_optarg ;;
941
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 -includedir | --includedir | --includedi | --included | --include \
943 | --includ | --inclu | --incl | --inc)
944 ac_prev=includedir ;;
945 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
946 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
949 -infodir | --infodir | --infodi | --infod | --info | --inf)
950 ac_prev=infodir ;;
951 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953
954 -libdir | --libdir | --libdi | --libd)
955 ac_prev=libdir ;;
956 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
959 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
960 | --libexe | --libex | --libe)
961 ac_prev=libexecdir ;;
962 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
963 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000964 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000965
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000966 -localedir | --localedir | --localedi | --localed | --locale)
967 ac_prev=localedir ;;
968 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
969 localedir=$ac_optarg ;;
970
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000972 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000973 ac_prev=localstatedir ;;
974 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000975 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977
978 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
979 ac_prev=mandir ;;
980 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984 # Obsolete; use --without-fp.
985 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989 no_create=yes ;;
990
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000991 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
992 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
993 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
996 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
997 | --oldin | --oldi | --old | --ol | --o)
998 ac_prev=oldincludedir ;;
999 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1000 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1001 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001003
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1005 ac_prev=prefix ;;
1006 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
1009 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1010 | --program-pre | --program-pr | --program-p)
1011 ac_prev=program_prefix ;;
1012 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1013 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1017 | --program-suf | --program-su | --program-s)
1018 ac_prev=program_suffix ;;
1019 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1020 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
1023 -program-transform-name | --program-transform-name \
1024 | --program-transform-nam | --program-transform-na \
1025 | --program-transform-n | --program-transform- \
1026 | --program-transform | --program-transfor \
1027 | --program-transfo | --program-transf \
1028 | --program-trans | --program-tran \
1029 | --progr-tra | --program-tr | --program-t)
1030 ac_prev=program_transform_name ;;
1031 -program-transform-name=* | --program-transform-name=* \
1032 | --program-transform-nam=* | --program-transform-na=* \
1033 | --program-transform-n=* | --program-transform-=* \
1034 | --program-transform=* | --program-transfor=* \
1035 | --program-transfo=* | --program-transf=* \
1036 | --program-trans=* | --program-tran=* \
1037 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001040 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1041 ac_prev=pdfdir ;;
1042 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1043 pdfdir=$ac_optarg ;;
1044
1045 -psdir | --psdir | --psdi | --psd | --ps)
1046 ac_prev=psdir ;;
1047 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1048 psdir=$ac_optarg ;;
1049
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1051 | -silent | --silent | --silen | --sile | --sil)
1052 silent=yes ;;
1053
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1055 ac_prev=sbindir ;;
1056 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1057 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
1060 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1061 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1062 | --sharedst | --shareds | --shared | --share | --shar \
1063 | --sha | --sh)
1064 ac_prev=sharedstatedir ;;
1065 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1066 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1067 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1068 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071 -site | --site | --sit)
1072 ac_prev=site ;;
1073 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1077 ac_prev=srcdir ;;
1078 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1082 | --syscon | --sysco | --sysc | --sys | --sy)
1083 ac_prev=sysconfdir ;;
1084 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1085 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1094 verbose=yes ;;
1095
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 -version | --version | --versio | --versi | --vers | -V)
1097 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
1099 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001100 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001101 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001102 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1103 as_fn_error "invalid package name: $ac_useropt"
1104 ac_useropt_orig=$ac_useropt
1105 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1106 case $ac_user_opts in
1107 *"
1108"with_$ac_useropt"
1109"*) ;;
1110 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1111 ac_unrecognized_sep=', ';;
1112 esac
1113 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001116 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001117 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001118 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1119 as_fn_error "invalid package name: $ac_useropt"
1120 ac_useropt_orig=$ac_useropt
1121 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1122 case $ac_user_opts in
1123 *"
1124"with_$ac_useropt"
1125"*) ;;
1126 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1127 ac_unrecognized_sep=', ';;
1128 esac
1129 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001131 --x)
1132 # Obsolete; use --with-x.
1133 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
1135 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1136 | --x-incl | --x-inc | --x-in | --x-i)
1137 ac_prev=x_includes ;;
1138 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1139 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141
1142 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1143 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1144 ac_prev=x_libraries ;;
1145 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1146 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
Matthias Kloseb9621712010-04-24 17:59:49 +00001149 -*) as_fn_error "unrecognized option: \`$ac_option'
1150Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151 ;;
1152
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 *=*)
1154 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1155 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001156 case $ac_envvar in #(
1157 '' | [0-9]* | *[!_$as_cr_alnum]* )
1158 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1159 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001160 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 export $ac_envvar ;;
1162
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001163 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001165 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001167 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 ;;
1170
1171 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001172done
1173
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001176 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177fi
1178
Matthias Kloseb9621712010-04-24 17:59:49 +00001179if test -n "$ac_unrecognized_opts"; then
1180 case $enable_option_checking in
1181 no) ;;
1182 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1183 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1184 esac
1185fi
1186
1187# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001188for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1189 datadir sysconfdir sharedstatedir localstatedir includedir \
1190 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1191 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001192do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001193 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001194 # Remove trailing slashes.
1195 case $ac_val in
1196 */ )
1197 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1198 eval $ac_var=\$ac_val;;
1199 esac
1200 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001202 [\\/$]* | ?:[\\/]* ) continue;;
1203 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001206done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001207
Martin v. Löwis11437992002-04-12 09:54:03 +00001208# There might be people who depend on the old broken behavior: `$host'
1209# used to hold the argument of --host etc.
1210# FIXME: To remove some day.
1211build=$build_alias
1212host=$host_alias
1213target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214
Martin v. Löwis11437992002-04-12 09:54:03 +00001215# FIXME: To remove some day.
1216if test "x$host_alias" != x; then
1217 if test "x$build_alias" = x; then
1218 cross_compiling=maybe
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 If a cross compiler is detected then cross compile mode will be used." >&2
1221 elif test "x$build_alias" != "x$host_alias"; then
1222 cross_compiling=yes
1223 fi
1224fi
1225
1226ac_tool_prefix=
1227test -n "$host_alias" && ac_tool_prefix=$host_alias-
1228
1229test "$silent" = yes && exec 6>/dev/null
1230
Guido van Rossum627b2d71993-12-24 10:39:16 +00001231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001232ac_pwd=`pwd` && test -n "$ac_pwd" &&
1233ac_ls_di=`ls -di .` &&
1234ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Matthias Kloseb9621712010-04-24 17:59:49 +00001235 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001236test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Matthias Kloseb9621712010-04-24 17:59:49 +00001237 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001238
1239
Guido van Rossum627b2d71993-12-24 10:39:16 +00001240# Find the source files, if location was not specified.
1241if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001243 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001244 ac_confdir=`$as_dirname -- "$as_myself" ||
1245$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1246 X"$as_myself" : 'X\(//\)[^/]' \| \
1247 X"$as_myself" : 'X\(//\)$' \| \
1248 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1249$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1251 s//\1/
1252 q
1253 }
1254 /^X\(\/\/\)[^/].*/{
1255 s//\1/
1256 q
1257 }
1258 /^X\(\/\/\)$/{
1259 s//\1/
1260 q
1261 }
1262 /^X\(\/\).*/{
1263 s//\1/
1264 q
1265 }
1266 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001268 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269 srcdir=..
1270 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001271else
1272 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001274if test ! -r "$srcdir/$ac_unique_file"; then
1275 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Matthias Kloseb9621712010-04-24 17:59:49 +00001276 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1279ac_abs_confdir=`(
Matthias Kloseb9621712010-04-24 17:59:49 +00001280 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001281 pwd)`
1282# When building in place, set srcdir=.
1283if test "$ac_abs_confdir" = "$ac_pwd"; then
1284 srcdir=.
1285fi
1286# Remove unnecessary trailing slashes from srcdir.
1287# Double slashes in file names in object file debugging info
1288# mess up M-x gdb in Emacs.
1289case $srcdir in
1290*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1291esac
1292for ac_var in $ac_precious_vars; do
1293 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1294 eval ac_env_${ac_var}_value=\$${ac_var}
1295 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1296 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1297done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001298
Martin v. Löwis11437992002-04-12 09:54:03 +00001299#
1300# Report the --help message.
1301#
1302if test "$ac_init_help" = "long"; then
1303 # Omit some internal or obsolete options to make the list less imposing.
1304 # This message is too long to be a string in the A/UX 3.1 sh.
1305 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001306\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001307
1308Usage: $0 [OPTION]... [VAR=VALUE]...
1309
1310To assign environment variables (e.g., CC, CFLAGS...), specify them as
1311VAR=VALUE. See below for descriptions of some of the useful variables.
1312
1313Defaults for the options are specified in brackets.
1314
1315Configuration:
1316 -h, --help display this help and exit
1317 --help=short display options specific to this package
1318 --help=recursive display the short help of all the included packages
1319 -V, --version display version information and exit
1320 -q, --quiet, --silent do not print \`checking...' messages
1321 --cache-file=FILE cache test results in FILE [disabled]
1322 -C, --config-cache alias for \`--cache-file=config.cache'
1323 -n, --no-create do not create output files
1324 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1325
Martin v. Löwis11437992002-04-12 09:54:03 +00001326Installation directories:
1327 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001328 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001329 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001330 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001331
1332By default, \`make install' will install all the files in
1333\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1334an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1335for instance \`--prefix=\$HOME'.
1336
1337For better control, use the options below.
1338
1339Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001340 --bindir=DIR user executables [EPREFIX/bin]
1341 --sbindir=DIR system admin executables [EPREFIX/sbin]
1342 --libexecdir=DIR program executables [EPREFIX/libexec]
1343 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1344 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1345 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1346 --libdir=DIR object code libraries [EPREFIX/lib]
1347 --includedir=DIR C header files [PREFIX/include]
1348 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1349 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1350 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1351 --infodir=DIR info documentation [DATAROOTDIR/info]
1352 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1353 --mandir=DIR man documentation [DATAROOTDIR/man]
1354 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1355 --htmldir=DIR html documentation [DOCDIR]
1356 --dvidir=DIR dvi documentation [DOCDIR]
1357 --pdfdir=DIR pdf documentation [DOCDIR]
1358 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001359_ACEOF
1360
1361 cat <<\_ACEOF
1362_ACEOF
1363fi
1364
1365if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001366 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001367 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001368 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001369 cat <<\_ACEOF
1370
1371Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001372 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1374 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001375 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001376 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001377 --enable-framework[=INSTALLDIR]
1378 Build (MacOSX|Darwin) framework
1379 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001380 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001381 --enable-ipv6 Enable ipv6 (with ipv4) support
1382 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001383 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001384 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001385
1386Optional Packages:
1387 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1388 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001389 --with-universal-archs=ARCH
1390 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001391 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001392 --with-framework-name=FRAMEWORK
1393 specify an alternate name of the framework built
1394 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001396 --with-cxx-main=<compiler>
1397 compile main() and link python executable with C++
1398 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001399 --with-suffix=.exe set executable suffix
1400 --with-pydebug build with Py_DEBUG defined
1401 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001402 --with-system-expat build pyexpat module using an installed expat
1403 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001404 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001405 --with-dbmliborder=db1:db2:...
1406 order to check db backends for dbm. Valid value is a
1407 colon separated string with the backend names
1408 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001409 --with-signal-module disable/enable signal module
1410 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1411 --with(out)-threads[=DIRECTORY]
1412 disable/enable thread support
1413 --with(out)-thread[=DIRECTORY]
1414 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001416 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001417 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001418 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --with-fpectl enable SIGFPE catching
1421 --with-libm=STRING math library
1422 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001423 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001424 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1425 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
1427Some influential environment variables:
1428 CC C compiler command
1429 CFLAGS C compiler flags
1430 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1431 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001432 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001434 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 CPP C preprocessor
1436
1437Use these variables to override the choices made by `configure' or to help
1438it to find libraries and programs with nonstandard names/locations.
1439
Georg Brandle2e15612009-05-20 18:25:10 +00001440Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001441_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001442ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001443fi
1444
1445if test "$ac_init_help" = "recursive"; then
1446 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001447 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001448 test -d "$ac_dir" ||
1449 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1450 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001451 ac_builddir=.
1452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453case "$ac_dir" in
1454.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1455*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001456 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001457 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001458 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001459 case $ac_top_builddir_sub in
1460 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1461 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1462 esac ;;
1463esac
1464ac_abs_top_builddir=$ac_pwd
1465ac_abs_builddir=$ac_pwd$ac_dir_suffix
1466# for backward compatibility:
1467ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001468
1469case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001470 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001472 ac_top_srcdir=$ac_top_builddir_sub
1473 ac_abs_top_srcdir=$ac_pwd ;;
1474 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476 ac_top_srcdir=$srcdir
1477 ac_abs_top_srcdir=$srcdir ;;
1478 *) # Relative name.
1479 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1480 ac_top_srcdir=$ac_top_build_prefix$srcdir
1481 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001482esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485 cd "$ac_dir" || { ac_status=$?; continue; }
1486 # Check for guested configure.
1487 if test -f "$ac_srcdir/configure.gnu"; then
1488 echo &&
1489 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1490 elif test -f "$ac_srcdir/configure"; then
1491 echo &&
1492 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001493 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001494 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 fi || ac_status=$?
1496 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001497 done
1498fi
1499
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001501if $ac_init_version; then
1502 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001503python configure 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +00001504generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001505
Matthias Kloseb9621712010-04-24 17:59:49 +00001506Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001507This configure script is free software; the Free Software Foundation
1508gives unlimited permission to copy, distribute and modify it.
1509_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001510 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001511fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001512
1513## ------------------------ ##
1514## Autoconf initialization. ##
1515## ------------------------ ##
1516
1517# ac_fn_c_try_compile LINENO
1518# --------------------------
1519# Try to compile conftest.$ac_ext, and return whether this succeeded.
1520ac_fn_c_try_compile ()
1521{
1522 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1523 rm -f conftest.$ac_objext
1524 if { { ac_try="$ac_compile"
1525case "(($ac_try" in
1526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1527 *) ac_try_echo=$ac_try;;
1528esac
1529eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1530$as_echo "$ac_try_echo"; } >&5
1531 (eval "$ac_compile") 2>conftest.err
1532 ac_status=$?
1533 if test -s conftest.err; then
1534 grep -v '^ *+' conftest.err >conftest.er1
1535 cat conftest.er1 >&5
1536 mv -f conftest.er1 conftest.err
1537 fi
1538 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1539 test $ac_status = 0; } && {
1540 test -z "$ac_c_werror_flag" ||
1541 test ! -s conftest.err
1542 } && test -s conftest.$ac_objext; then :
1543 ac_retval=0
1544else
1545 $as_echo "$as_me: failed program was:" >&5
1546sed 's/^/| /' conftest.$ac_ext >&5
1547
1548 ac_retval=1
1549fi
1550 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1551 as_fn_set_status $ac_retval
1552
1553} # ac_fn_c_try_compile
1554
1555# ac_fn_c_try_cpp LINENO
1556# ----------------------
1557# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1558ac_fn_c_try_cpp ()
1559{
1560 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1561 if { { ac_try="$ac_cpp conftest.$ac_ext"
1562case "(($ac_try" in
1563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1564 *) ac_try_echo=$ac_try;;
1565esac
1566eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1567$as_echo "$ac_try_echo"; } >&5
1568 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1569 ac_status=$?
1570 if test -s conftest.err; then
1571 grep -v '^ *+' conftest.err >conftest.er1
1572 cat conftest.er1 >&5
1573 mv -f conftest.er1 conftest.err
1574 fi
1575 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1576 test $ac_status = 0; } >/dev/null && {
1577 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1578 test ! -s conftest.err
1579 }; then :
1580 ac_retval=0
1581else
1582 $as_echo "$as_me: failed program was:" >&5
1583sed 's/^/| /' conftest.$ac_ext >&5
1584
1585 ac_retval=1
1586fi
1587 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1588 as_fn_set_status $ac_retval
1589
1590} # ac_fn_c_try_cpp
1591
1592# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1593# -------------------------------------------------------
1594# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1595# the include files in INCLUDES and setting the cache variable VAR
1596# accordingly.
1597ac_fn_c_check_header_mongrel ()
1598{
1599 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1600 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1602$as_echo_n "checking for $2... " >&6; }
1603if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1604 $as_echo_n "(cached) " >&6
1605fi
1606eval ac_res=\$$3
1607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1608$as_echo "$ac_res" >&6; }
1609else
1610 # Is the header compilable?
1611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1612$as_echo_n "checking $2 usability... " >&6; }
1613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1614/* end confdefs.h. */
1615$4
1616#include <$2>
1617_ACEOF
1618if ac_fn_c_try_compile "$LINENO"; then :
1619 ac_header_compiler=yes
1620else
1621 ac_header_compiler=no
1622fi
1623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1625$as_echo "$ac_header_compiler" >&6; }
1626
1627# Is the header present?
1628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1629$as_echo_n "checking $2 presence... " >&6; }
1630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1631/* end confdefs.h. */
1632#include <$2>
1633_ACEOF
1634if ac_fn_c_try_cpp "$LINENO"; then :
1635 ac_header_preproc=yes
1636else
1637 ac_header_preproc=no
1638fi
1639rm -f conftest.err conftest.$ac_ext
1640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1641$as_echo "$ac_header_preproc" >&6; }
1642
1643# So? What about this header?
1644case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1645 yes:no: )
1646 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1647$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1648 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1649$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1650 ;;
1651 no:yes:* )
1652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1653$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1655$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1657$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1659$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1661$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1662( cat <<\_ASBOX
1663## -------------------------------------- ##
1664## Report this to http://bugs.python.org/ ##
1665## -------------------------------------- ##
1666_ASBOX
1667 ) | sed "s/^/$as_me: WARNING: /" >&2
1668 ;;
1669esac
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1671$as_echo_n "checking for $2... " >&6; }
1672if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1673 $as_echo_n "(cached) " >&6
1674else
1675 eval "$3=\$ac_header_compiler"
1676fi
1677eval ac_res=\$$3
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1679$as_echo "$ac_res" >&6; }
1680fi
1681 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1682
1683} # ac_fn_c_check_header_mongrel
1684
1685# ac_fn_c_try_run LINENO
1686# ----------------------
1687# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1688# that executables *can* be run.
1689ac_fn_c_try_run ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 if { { ac_try="$ac_link"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_link") 2>&5
1700 ac_status=$?
1701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1702 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1703 { { case "(($ac_try" in
1704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1705 *) ac_try_echo=$ac_try;;
1706esac
1707eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1708$as_echo "$ac_try_echo"; } >&5
1709 (eval "$ac_try") 2>&5
1710 ac_status=$?
1711 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1712 test $ac_status = 0; }; }; then :
1713 ac_retval=0
1714else
1715 $as_echo "$as_me: program exited with status $ac_status" >&5
1716 $as_echo "$as_me: failed program was:" >&5
1717sed 's/^/| /' conftest.$ac_ext >&5
1718
1719 ac_retval=$ac_status
1720fi
1721 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1722 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1723 as_fn_set_status $ac_retval
1724
1725} # ac_fn_c_try_run
1726
1727# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1728# -------------------------------------------------------
1729# Tests whether HEADER exists and can be compiled using the include files in
1730# INCLUDES, setting the cache variable VAR accordingly.
1731ac_fn_c_check_header_compile ()
1732{
1733 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1735$as_echo_n "checking for $2... " >&6; }
1736if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1737 $as_echo_n "(cached) " >&6
1738else
1739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1740/* end confdefs.h. */
1741$4
1742#include <$2>
1743_ACEOF
1744if ac_fn_c_try_compile "$LINENO"; then :
1745 eval "$3=yes"
1746else
1747 eval "$3=no"
1748fi
1749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1750fi
1751eval ac_res=\$$3
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1753$as_echo "$ac_res" >&6; }
1754 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1755
1756} # ac_fn_c_check_header_compile
1757
1758# ac_fn_c_try_link LINENO
1759# -----------------------
1760# Try to link conftest.$ac_ext, and return whether this succeeded.
1761ac_fn_c_try_link ()
1762{
1763 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1764 rm -f conftest.$ac_objext conftest$ac_exeext
1765 if { { ac_try="$ac_link"
1766case "(($ac_try" in
1767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1768 *) ac_try_echo=$ac_try;;
1769esac
1770eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1771$as_echo "$ac_try_echo"; } >&5
1772 (eval "$ac_link") 2>conftest.err
1773 ac_status=$?
1774 if test -s conftest.err; then
1775 grep -v '^ *+' conftest.err >conftest.er1
1776 cat conftest.er1 >&5
1777 mv -f conftest.er1 conftest.err
1778 fi
1779 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1780 test $ac_status = 0; } && {
1781 test -z "$ac_c_werror_flag" ||
1782 test ! -s conftest.err
1783 } && test -s conftest$ac_exeext && {
1784 test "$cross_compiling" = yes ||
1785 $as_test_x conftest$ac_exeext
1786 }; then :
1787 ac_retval=0
1788else
1789 $as_echo "$as_me: failed program was:" >&5
1790sed 's/^/| /' conftest.$ac_ext >&5
1791
1792 ac_retval=1
1793fi
1794 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1795 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1796 # interfere with the next link command; also delete a directory that is
1797 # left behind by Apple's compiler. We do this before executing the actions.
1798 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1799 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1800 as_fn_set_status $ac_retval
1801
1802} # ac_fn_c_try_link
1803
1804# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1805# -------------------------------------------
1806# Tests whether TYPE exists after having included INCLUDES, setting cache
1807# variable VAR accordingly.
1808ac_fn_c_check_type ()
1809{
1810 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1812$as_echo_n "checking for $2... " >&6; }
1813if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1814 $as_echo_n "(cached) " >&6
1815else
1816 eval "$3=no"
1817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1818/* end confdefs.h. */
1819$4
1820int
1821main ()
1822{
1823if (sizeof ($2))
1824 return 0;
1825 ;
1826 return 0;
1827}
1828_ACEOF
1829if ac_fn_c_try_compile "$LINENO"; then :
1830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1831/* end confdefs.h. */
1832$4
1833int
1834main ()
1835{
1836if (sizeof (($2)))
1837 return 0;
1838 ;
1839 return 0;
1840}
1841_ACEOF
1842if ac_fn_c_try_compile "$LINENO"; then :
1843
1844else
1845 eval "$3=yes"
1846fi
1847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1848fi
1849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1850fi
1851eval ac_res=\$$3
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1853$as_echo "$ac_res" >&6; }
1854 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1855
1856} # ac_fn_c_check_type
1857
1858# ac_fn_c_find_uintX_t LINENO BITS VAR
1859# ------------------------------------
1860# Finds an unsigned integer type with width BITS, setting cache variable VAR
1861# accordingly.
1862ac_fn_c_find_uintX_t ()
1863{
1864 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1866$as_echo_n "checking for uint$2_t... " >&6; }
1867if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1868 $as_echo_n "(cached) " >&6
1869else
1870 eval "$3=no"
1871 # Order is important - never check a type that is potentially smaller
1872 # than half of the expected target width.
1873 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1874 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1876/* end confdefs.h. */
1877$ac_includes_default
1878int
1879main ()
1880{
1881static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1882test_array [0] = 0
1883
1884 ;
1885 return 0;
1886}
1887_ACEOF
1888if ac_fn_c_try_compile "$LINENO"; then :
1889 case $ac_type in #(
1890 uint$2_t) :
1891 eval "$3=yes" ;; #(
1892 *) :
1893 eval "$3=\$ac_type" ;;
1894esac
1895fi
1896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1897 eval as_val=\$$3
1898 if test "x$as_val" = x""no; then :
1899
1900else
1901 break
1902fi
1903 done
1904fi
1905eval ac_res=\$$3
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1907$as_echo "$ac_res" >&6; }
1908 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1909
1910} # ac_fn_c_find_uintX_t
1911
1912# ac_fn_c_find_intX_t LINENO BITS VAR
1913# -----------------------------------
1914# Finds a signed integer type with width BITS, setting cache variable VAR
1915# accordingly.
1916ac_fn_c_find_intX_t ()
1917{
1918 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1920$as_echo_n "checking for int$2_t... " >&6; }
1921if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1922 $as_echo_n "(cached) " >&6
1923else
1924 eval "$3=no"
1925 # Order is important - never check a type that is potentially smaller
1926 # than half of the expected target width.
1927 for ac_type in int$2_t 'int' 'long int' \
1928 'long long int' 'short int' 'signed char'; do
1929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1930/* end confdefs.h. */
1931$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001932int
1933main ()
1934{
Martin v. Löwis1a415762010-05-28 15:44:20 +00001935static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1936 0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001937test_array [0] = 0
1938
1939 ;
1940 return 0;
1941}
1942_ACEOF
1943if ac_fn_c_try_compile "$LINENO"; then :
1944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945/* end confdefs.h. */
1946$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001947int
1948main ()
1949{
Martin v. Löwis1a415762010-05-28 15:44:20 +00001950static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1951 ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001952 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1953test_array [0] = 0
1954
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960
1961else
1962 case $ac_type in #(
1963 int$2_t) :
1964 eval "$3=yes" ;; #(
1965 *) :
1966 eval "$3=\$ac_type" ;;
1967esac
1968fi
1969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1970fi
1971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1972 eval as_val=\$$3
1973 if test "x$as_val" = x""no; then :
1974
1975else
1976 break
1977fi
1978 done
1979fi
1980eval ac_res=\$$3
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982$as_echo "$ac_res" >&6; }
1983 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1984
1985} # ac_fn_c_find_intX_t
1986
1987# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1988# --------------------------------------------
1989# Tries to find the compile-time value of EXPR in a program that includes
1990# INCLUDES, setting VAR accordingly. Returns whether the value could be
1991# computed
1992ac_fn_c_compute_int ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 if test "$cross_compiling" = yes; then
1996 # Depending upon the size, compute the lo and hi bounds.
1997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) >= 0)];
2004test_array [0] = 0
2005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 ac_lo=0 ac_mid=0
2012 while :; do
2013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2020test_array [0] = 0
2021
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 ac_hi=$ac_mid; break
2028else
2029 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2030 if test $ac_lo -le $ac_mid; then
2031 ac_lo= ac_hi=
2032 break
2033 fi
2034 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2035fi
2036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2037 done
2038else
2039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h. */
2041$4
2042int
2043main ()
2044{
2045static int test_array [1 - 2 * !(($2) < 0)];
2046test_array [0] = 0
2047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 ac_hi=-1 ac_mid=-1
2054 while :; do
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2062test_array [0] = 0
2063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_lo=$ac_mid; break
2070else
2071 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2072 if test $ac_mid -le $ac_hi; then
2073 ac_lo= ac_hi=
2074 break
2075 fi
2076 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079 done
2080else
2081 ac_lo= ac_hi=
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086# Binary search between lo and hi bounds.
2087while test "x$ac_lo" != "x$ac_hi"; do
2088 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2090/* end confdefs.h. */
2091$4
2092int
2093main ()
2094{
2095static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2096test_array [0] = 0
2097
2098 ;
2099 return 0;
2100}
2101_ACEOF
2102if ac_fn_c_try_compile "$LINENO"; then :
2103 ac_hi=$ac_mid
2104else
2105 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108done
2109case $ac_lo in #((
2110?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2111'') ac_retval=1 ;;
2112esac
2113 else
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117static long int longval () { return $2; }
2118static unsigned long int ulongval () { return $2; }
2119#include <stdio.h>
2120#include <stdlib.h>
2121int
2122main ()
2123{
2124
2125 FILE *f = fopen ("conftest.val", "w");
2126 if (! f)
2127 return 1;
2128 if (($2) < 0)
2129 {
2130 long int i = longval ();
2131 if (i != ($2))
2132 return 1;
2133 fprintf (f, "%ld", i);
2134 }
2135 else
2136 {
2137 unsigned long int i = ulongval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%lu", i);
2141 }
2142 /* Do not output a trailing newline, as this causes \r\n confusion
2143 on some platforms. */
2144 return ferror (f) || fclose (f) != 0;
2145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_run "$LINENO"; then :
2151 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2152else
2153 ac_retval=1
2154fi
2155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2156 conftest.$ac_objext conftest.beam conftest.$ac_ext
2157rm -f conftest.val
2158
2159 fi
2160 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2161 as_fn_set_status $ac_retval
2162
2163} # ac_fn_c_compute_int
2164
2165# ac_fn_c_check_func LINENO FUNC VAR
2166# ----------------------------------
2167# Tests whether FUNC exists, setting the cache variable VAR accordingly
2168ac_fn_c_check_func ()
2169{
2170 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2172$as_echo_n "checking for $2... " >&6; }
2173if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2174 $as_echo_n "(cached) " >&6
2175else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2179 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2180#define $2 innocuous_$2
2181
2182/* System header to define __stub macros and hopefully few prototypes,
2183 which can conflict with char $2 (); below.
2184 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2185 <limits.h> exists even on freestanding compilers. */
2186
2187#ifdef __STDC__
2188# include <limits.h>
2189#else
2190# include <assert.h>
2191#endif
2192
2193#undef $2
2194
2195/* Override any GCC internal prototype to avoid an error.
2196 Use char because int might match the return type of a GCC
2197 builtin and then its argument prototype would still apply. */
2198#ifdef __cplusplus
2199extern "C"
2200#endif
2201char $2 ();
2202/* The GNU C library defines this for functions which it implements
2203 to always fail with ENOSYS. Some functions are actually named
2204 something starting with __ and the normal name is an alias. */
2205#if defined __stub_$2 || defined __stub___$2
2206choke me
2207#endif
2208
2209int
2210main ()
2211{
2212return $2 ();
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_link "$LINENO"; then :
2218 eval "$3=yes"
2219else
2220 eval "$3=no"
2221fi
2222rm -f core conftest.err conftest.$ac_objext \
2223 conftest$ac_exeext conftest.$ac_ext
2224fi
2225eval ac_res=\$$3
2226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2227$as_echo "$ac_res" >&6; }
2228 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2229
2230} # ac_fn_c_check_func
2231
2232# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2233# ----------------------------------------------------
2234# Tries to find if the field MEMBER exists in type AGGR, after including
2235# INCLUDES, setting cache variable VAR accordingly.
2236ac_fn_c_check_member ()
2237{
2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2240$as_echo_n "checking for $2.$3... " >&6; }
2241if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2242 $as_echo_n "(cached) " >&6
2243else
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h. */
2246$5
2247int
2248main ()
2249{
2250static $2 ac_aggr;
2251if (ac_aggr.$3)
2252return 0;
2253 ;
2254 return 0;
2255}
2256_ACEOF
2257if ac_fn_c_try_compile "$LINENO"; then :
2258 eval "$4=yes"
2259else
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
2262$5
2263int
2264main ()
2265{
2266static $2 ac_aggr;
2267if (sizeof ac_aggr.$3)
2268return 0;
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"; then :
2274 eval "$4=yes"
2275else
2276 eval "$4=no"
2277fi
2278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279fi
2280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2281fi
2282eval ac_res=\$$4
2283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2284$as_echo "$ac_res" >&6; }
2285 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2286
2287} # ac_fn_c_check_member
2288
2289# ac_fn_c_check_decl LINENO SYMBOL VAR
2290# ------------------------------------
2291# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2292ac_fn_c_check_decl ()
2293{
2294 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2296$as_echo_n "checking whether $2 is declared... " >&6; }
2297if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2298 $as_echo_n "(cached) " >&6
2299else
2300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2301/* end confdefs.h. */
2302$4
2303int
2304main ()
2305{
2306#ifndef $2
2307 (void) $2;
2308#endif
2309
2310 ;
2311 return 0;
2312}
2313_ACEOF
2314if ac_fn_c_try_compile "$LINENO"; then :
2315 eval "$3=yes"
2316else
2317 eval "$3=no"
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320fi
2321eval ac_res=\$$3
2322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2323$as_echo "$ac_res" >&6; }
2324 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2325
2326} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002327cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002328This file contains any messages produced by compilers while
2329running configure, to aid debugging if configure makes a mistake.
2330
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002331It was created by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +00002332generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002333
2334 $ $0 $@
2335
2336_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002337exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002338{
2339cat <<_ASUNAME
2340## --------- ##
2341## Platform. ##
2342## --------- ##
2343
2344hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2345uname -m = `(uname -m) 2>/dev/null || echo unknown`
2346uname -r = `(uname -r) 2>/dev/null || echo unknown`
2347uname -s = `(uname -s) 2>/dev/null || echo unknown`
2348uname -v = `(uname -v) 2>/dev/null || echo unknown`
2349
2350/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2351/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2352
2353/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2354/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2355/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002356/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002357/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2358/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2359/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2360
2361_ASUNAME
2362
2363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2364for as_dir in $PATH
2365do
2366 IFS=$as_save_IFS
2367 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002368 $as_echo "PATH: $as_dir"
2369 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002370IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002371
2372} >&5
2373
2374cat >&5 <<_ACEOF
2375
2376
2377## ----------- ##
2378## Core tests. ##
2379## ----------- ##
2380
2381_ACEOF
2382
2383
2384# Keep a trace of the command line.
2385# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002386# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002387# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002388# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002389ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002390ac_configure_args0=
2391ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002392ac_must_keep_next=false
2393for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002394do
Skip Montanaro6dead952003-09-25 14:50:04 +00002395 for ac_arg
2396 do
2397 case $ac_arg in
2398 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2399 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2400 | -silent | --silent | --silen | --sile | --sil)
2401 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002402 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002403 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002404 esac
2405 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002406 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002407 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002408 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002410 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002412 case $ac_arg in
2413 *=* | --config-cache | -C | -disable-* | --disable-* \
2414 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2415 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2416 | -with-* | --with-* | -without-* | --without-* | --x)
2417 case "$ac_configure_args0 " in
2418 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2419 esac
2420 ;;
2421 -* ) ac_must_keep_next=true ;;
2422 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002424 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 ;;
2426 esac
2427 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002428done
Matthias Kloseb9621712010-04-24 17:59:49 +00002429{ ac_configure_args0=; unset ac_configure_args0;}
2430{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002431
2432# When interrupted or exit'd, cleanup temporary files, and complete
2433# config.log. We remove comments because anyway the quotes in there
2434# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002435# WARNING: Use '\'' to represent an apostrophe within the trap.
2436# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002437trap 'exit_status=$?
2438 # Save into config.log some information that might help in debugging.
2439 {
2440 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002441
Martin v. Löwis11437992002-04-12 09:54:03 +00002442 cat <<\_ASBOX
2443## ---------------- ##
2444## Cache variables. ##
2445## ---------------- ##
2446_ASBOX
2447 echo
2448 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002449(
2450 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2451 eval ac_val=\$$ac_var
2452 case $ac_val in #(
2453 *${as_nl}*)
2454 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002455 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2456$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457 esac
2458 case $ac_var in #(
2459 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2461 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac ;;
2463 esac
2464 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2467 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 "s/'\''/'\''\\\\'\'''\''/g;
2470 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2471 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002472 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002474 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 esac |
2476 sort
2477)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002479
2480 cat <<\_ASBOX
2481## ----------------- ##
2482## Output variables. ##
2483## ----------------- ##
2484_ASBOX
2485 echo
2486 for ac_var in $ac_subst_vars
2487 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 eval ac_val=\$$ac_var
2489 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002490 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002492 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 done | sort
2494 echo
2495
2496 if test -n "$ac_subst_files"; then
2497 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498## ------------------- ##
2499## File substitutions. ##
2500## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002501_ASBOX
2502 echo
2503 for ac_var in $ac_subst_files
2504 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 eval ac_val=\$$ac_var
2506 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 done | sort
2511 echo
2512 fi
2513
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 if test -s confdefs.h; then
2515 cat <<\_ASBOX
2516## ----------- ##
2517## confdefs.h. ##
2518## ----------- ##
2519_ASBOX
2520 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 echo
2523 fi
2524 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 $as_echo "$as_me: caught signal $ac_signal"
2526 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 rm -f core *.core core.conftest.* &&
2529 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002532for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002533 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002534done
2535ac_signal=0
2536
2537# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002539
Matthias Kloseb9621712010-04-24 17:59:49 +00002540$as_echo "/* confdefs.h */" > confdefs.h
2541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542# Predefined preprocessor variables.
2543
2544cat >>confdefs.h <<_ACEOF
2545#define PACKAGE_NAME "$PACKAGE_NAME"
2546_ACEOF
2547
Martin v. Löwis11437992002-04-12 09:54:03 +00002548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2550_ACEOF
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_VERSION "$PACKAGE_VERSION"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_STRING "$PACKAGE_STRING"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2562_ACEOF
2563
Matthias Kloseb9621712010-04-24 17:59:49 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_URL "$PACKAGE_URL"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568
2569# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002570# Prefer an explicitly selected file to automatically selected ones.
2571ac_site_file1=NONE
2572ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573if test -n "$CONFIG_SITE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002576 ac_site_file1=$prefix/share/config.site
2577 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578else
Matthias Kloseb9621712010-04-24 17:59:49 +00002579 ac_site_file1=$ac_default_prefix/share/config.site
2580 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002582for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583do
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 test "x$ac_site_file" = xNONE && continue
2585 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2586 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2587$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002589 . "$ac_site_file"
2590 fi
2591done
2592
2593if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 # Some versions of bash will fail to source /dev/null (special files
2595 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2596 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2597 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2598$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2601 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 esac
2603 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604else
Matthias Kloseb9621712010-04-24 17:59:49 +00002605 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2606$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 >$cache_file
2608fi
2609
2610# Check that the precious variables saved in the cache have kept the same
2611# value.
2612ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2615 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2617 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 case $ac_old_set,$ac_new_set in
2619 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2621$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 ac_cache_corrupted=: ;;
2623 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002624 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2625$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 ac_cache_corrupted=: ;;
2627 ,);;
2628 *)
2629 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 # differences in whitespace do not lead to failure.
2631 ac_old_val_w=`echo x $ac_old_val`
2632 ac_new_val_w=`echo x $ac_new_val`
2633 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2635$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2636 ac_cache_corrupted=:
2637 else
2638 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2639$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2640 eval $ac_var=\$ac_old_val
2641 fi
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2643$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2645$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 fi;;
2647 esac
2648 # Pass precious variables to config.status.
2649 if test "$ac_new_set" = set; then
2650 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 *) ac_arg=$ac_var=$ac_new_val ;;
2653 esac
2654 case " $ac_configure_args " in
2655 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002656 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 esac
2658 fi
2659done
2660if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002661 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2664$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2665 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002667## -------------------- ##
2668## Main body of script. ##
2669## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670
Guido van Rossum7f43da71994-08-01 12:15:30 +00002671ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002672ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002673ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2674ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2675ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002676
Guido van Rossum627b2d71993-12-24 10:39:16 +00002677
Michael W. Hudson54241132001-12-07 15:38:26 +00002678
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002679ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002680
2681
Martin v. Löwis11437992002-04-12 09:54:03 +00002682
Benjamin Petersond23f8222009-04-05 19:13:16 +00002683if test "$prefix" != "/"; then
2684 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2685fi
2686
2687
Martin v. Löwis11437992002-04-12 09:54:03 +00002688
2689
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002690# We don't use PACKAGE_ variables, and they cause conflicts
2691# with other autoconf-based packages that include Python.h
2692grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2693rm confdefs.h
2694mv confdefs.h.new confdefs.h
2695
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002696
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002697VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002698
Martin v. Löwis1142de32002-03-29 16:28:31 +00002699
2700SOVERSION=1.0
2701
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002702# The later defininition of _XOPEN_SOURCE disables certain features
2703# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2704
Matthias Kloseb9621712010-04-24 17:59:49 +00002705$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002706
2707
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002708# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2709# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2710# them.
2711
Matthias Kloseb9621712010-04-24 17:59:49 +00002712$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002713
2714
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002715# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2716# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2717# them.
2718
Matthias Kloseb9621712010-04-24 17:59:49 +00002719$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002720
2721
Martin v. Löwisd6320502004-08-12 13:45:08 +00002722# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2723# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2724
Matthias Kloseb9621712010-04-24 17:59:49 +00002725$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002726
2727
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002728# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2729# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2730# them.
2731
Matthias Kloseb9621712010-04-24 17:59:49 +00002732$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002733
2734
2735
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002736define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002737
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002738# Arguments passed to configure.
2739
2740CONFIG_ARGS="$ac_configure_args"
2741
Matthias Kloseb9621712010-04-24 17:59:49 +00002742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2743$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002744# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002745if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002746 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002747 case $enableval in
2748 yes)
2749 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002750 if test ! -d "${enableval}"
2751 then
2752 enableval=/
2753 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002754 ;;
2755 esac
2756 case $enableval in
2757 no)
2758 UNIVERSALSDK=
2759 enable_universalsdk=
2760 ;;
2761 *)
2762 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002763 if test ! -d "${UNIVERSALSDK}"
2764 then
Matthias Kloseb9621712010-04-24 17:59:49 +00002765 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002766 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002767 ;;
2768 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002769
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002770
Thomas Wouters477c8d52006-05-27 19:21:47 +00002771else
2772
2773 UNIVERSALSDK=
2774 enable_universalsdk=
2775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002776fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002777
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002778if test -n "${UNIVERSALSDK}"
2779then
Matthias Kloseb9621712010-04-24 17:59:49 +00002780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2781$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002782else
Matthias Kloseb9621712010-04-24 17:59:49 +00002783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2784$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002785fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002787
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002788
2789
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002790UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002791
Matthias Kloseb9621712010-04-24 17:59:49 +00002792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2793$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002794
2795# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002796if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002797 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2799$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002800 UNIVERSAL_ARCHS="$withval"
2801
2802else
2803
Matthias Kloseb9621712010-04-24 17:59:49 +00002804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2805$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002806
2807fi
2808
2809
2810
2811
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002812
2813# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002814if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002815 withval=$with_framework_name;
2816 PYTHONFRAMEWORK=${withval}
2817 PYTHONFRAMEWORKDIR=${withval}.framework
2818 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2819
2820else
2821
2822 PYTHONFRAMEWORK=Python
2823 PYTHONFRAMEWORKDIR=Python.framework
2824 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2825
2826fi
2827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002828# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002829if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002830 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002831 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002832 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002833 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002834 esac
2835 case $enableval in
2836 no)
2837 PYTHONFRAMEWORK=
2838 PYTHONFRAMEWORKDIR=no-framework
2839 PYTHONFRAMEWORKPREFIX=
2840 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002841 FRAMEWORKINSTALLFIRST=
2842 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002843 FRAMEWORKALTINSTALLFIRST=
2844 FRAMEWORKALTINSTALLLAST=
2845 if test "x${prefix}" = "xNONE"; then
2846 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2847 else
2848 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2849 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002850 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002851 ;;
2852 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002853 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002854 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002855 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002856 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002857 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2858 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002859 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002860
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002861 if test "x${prefix}" = "xNONE" ; then
2862 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002863
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002864 else
2865 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2866 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002867
2868 case "${enableval}" in
2869 /System*)
2870 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2871 if test "${prefix}" = "NONE" ; then
2872 # See below
2873 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2874 fi
2875 ;;
2876
2877 /Library*)
2878 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2879 ;;
2880
2881 */Library/Frameworks)
2882 MDIR="`dirname "${enableval}"`"
2883 MDIR="`dirname "${MDIR}"`"
2884 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2885
2886 if test "${prefix}" = "NONE"; then
2887 # User hasn't specified the
2888 # --prefix option, but wants to install
2889 # the framework in a non-default location,
2890 # ensure that the compatibility links get
2891 # installed relative to that prefix as well
2892 # instead of in /usr/local.
2893 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2894 fi
2895 ;;
2896
2897 *)
2898 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2899 ;;
2900 esac
2901
Jack Jansen127e56e2001-09-11 14:41:54 +00002902 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002903
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002904 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002905 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002906 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002908 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002909
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002910 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2911
2912 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2913
Jack Jansene578a632001-08-15 01:27:14 +00002914 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002915
Guido van Rossum563e7081996-09-10 18:20:48 +00002916else
Martin v. Löwis11437992002-04-12 09:54:03 +00002917
Jack Jansene578a632001-08-15 01:27:14 +00002918 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002919 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002920 PYTHONFRAMEWORKPREFIX=
2921 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002922 FRAMEWORKINSTALLFIRST=
2923 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002924 FRAMEWORKALTINSTALLFIRST=
2925 FRAMEWORKALTINSTALLLAST=
2926 if test "x${prefix}" = "xNONE" ; then
2927 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2928 else
2929 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2930 fi
Jack Jansene578a632001-08-15 01:27:14 +00002931 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002932
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002933
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002934fi
2935
Thomas Wouters477c8d52006-05-27 19:21:47 +00002936
2937
Michael W. Hudson54241132001-12-07 15:38:26 +00002938
2939
2940
2941
Jack Jansene578a632001-08-15 01:27:14 +00002942
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002943
2944
2945
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002946
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002947
Jack Jansene578a632001-08-15 01:27:14 +00002948##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002949## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002950## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002951##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002952# Set name for machine-dependent library files
2953
Matthias Kloseb9621712010-04-24 17:59:49 +00002954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2955$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002956if test -z "$MACHDEP"
2957then
Guido van Rossum563e7081996-09-10 18:20:48 +00002958 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002959 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002960 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002961 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002962 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002963 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002964 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002965 ac_md_system=`echo $ac_sys_system |
2966 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2967 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002968 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002969 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002970
Guido van Rossum07397971997-04-29 21:49:50 +00002971 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002972 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002973 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002974 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002975 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002976 esac
2977fi
Guido van Rossum91922671997-10-09 20:24:13 +00002978
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002979# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2980# disable features if it is defined, without any means to access these
2981# features as extensions. For these systems, we skip the definition of
2982# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2983# some feature, make sure there is no alternative way to access this
2984# feature. Also, when using wildcards, make sure you have verified the
2985# need for not defining _XOPEN_SOURCE on all systems matching the
2986# wildcard, and that the wildcard does not include future systems
2987# (which may remove their limitations).
2988case $ac_sys_system/$ac_sys_release in
2989 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2990 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002991 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002992 # In addition, Stefan Krah confirms that issue #1244610 exists through
2993 # OpenBSD 4.6, but is fixed in 4.7.
2994 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002995 define_xopen_source=no
2996 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2997 # also defined. This can be overridden by defining _BSD_SOURCE
2998 # As this has a different meaning on Linux, only define it on OpenBSD
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003001
3002 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003003 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003004 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3005 # also defined. This can be overridden by defining _BSD_SOURCE
3006 # As this has a different meaning on Linux, only define it on OpenBSD
3007
Matthias Kloseb9621712010-04-24 17:59:49 +00003008$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003009
3010 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003011 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3012 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3013 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003014 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003015 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003016 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3017 # request to enable features supported by the standard as a request
3018 # to disable features not supported by the standard. The best way
3019 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3020 # entirely and define __EXTENSIONS__ instead.
3021 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003022 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003023 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3024 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003025 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003026 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003027 define_xopen_source=no;;
3028 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003029 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003030 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003031 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003032 # On FreeBSD 4, the math functions C89 does not cover are never defined
3033 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3034 FreeBSD/4.*)
3035 define_xopen_source=no;;
3036 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3037 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3038 # identifies itself as Darwin/7.*
3039 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3040 # disables platform specific features beyond repair.
3041 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3042 # has no effect, don't bother defining them
3043 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003044 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003045 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003046 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003047 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3048 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3049 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003050 AIX/4)
3051 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003052 AIX/5)
3053 if test `uname -r` -eq 1; then
3054 define_xopen_source=no
3055 fi
3056 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003057 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3058 # defining NI_NUMERICHOST.
3059 QNX/6.3.2)
3060 define_xopen_source=no
3061 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003062
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003063esac
3064
3065if test $define_xopen_source = yes
3066then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003067
Matthias Kloseb9621712010-04-24 17:59:49 +00003068$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003069
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003070
3071 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3072 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3073 # several APIs are not declared. Since this is also needed in some
3074 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003075
Matthias Kloseb9621712010-04-24 17:59:49 +00003076$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003077
3078
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003079
Matthias Kloseb9621712010-04-24 17:59:49 +00003080$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003081
3082
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003083fi
3084
Guido van Rossum91922671997-10-09 20:24:13 +00003085#
3086# SGI compilers allow the specification of the both the ABI and the
3087# ISA on the command line. Depending on the values of these switches,
3088# different and often incompatable code will be generated.
3089#
3090# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3091# thus supply support for various ABI/ISA combinations. The MACHDEP
3092# variable is also adjusted.
3093#
3094
3095if test ! -z "$SGI_ABI"
3096then
3097 CC="cc $SGI_ABI"
3098 LDFLAGS="$SGI_ABI $LDFLAGS"
3099 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3102$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003103
Jack Jansen6b08a402004-06-03 12:41:45 +00003104# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3105# it may influence the way we can build extensions, so distutils
3106# needs to check it
3107
Thomas Wouters477c8d52006-05-27 19:21:47 +00003108
Jack Jansen6b08a402004-06-03 12:41:45 +00003109CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003110EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003111
Matthias Kloseb9621712010-04-24 17:59:49 +00003112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3113$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003114ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3116$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003117
Guido van Rossum627b2d71993-12-24 10:39:16 +00003118# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003119
3120# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3121# for debug/optimization stuff. BASECFLAGS is for flags that are required
3122# just to get things to compile and link. Users are free to override OPT
3123# when running configure or make. The build should not break if they do.
3124# BASECFLAGS should generally not be messed with, however.
3125
3126# XXX shouldn't some/most/all of this code be merged with the stuff later
3127# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3129$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003130
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003131# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003132if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003133 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003134 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003135 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003136 without_gcc=yes;;
3137 yes) CC=gcc
3138 without_gcc=no;;
3139 *) CC=$withval
3140 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003141 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003142else
Martin v. Löwis11437992002-04-12 09:54:03 +00003143
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003144 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003145 AIX*) CC=cc_r
3146 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003147 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003148 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149fi
3150
Matthias Kloseb9621712010-04-24 17:59:49 +00003151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3152$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003153
Guido van Rossum8b131c51995-03-09 14:10:13 +00003154# If the user switches compilers, we can't believe the cache
3155if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3156then
Matthias Kloseb9621712010-04-24 17:59:49 +00003157 as_fn_error "cached CC is different -- throw away $cache_file
3158(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003159fi
3160
Marc-André Lemburgdf700f02010-04-30 17:29:56 +00003161# If the user set CFLAGS, use this instead of the automatically
3162# determined setting
3163preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003164ac_ext=c
3165ac_cpp='$CPP $CPPFLAGS'
3166ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3167ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3168ac_compiler_gnu=$ac_cv_c_compiler_gnu
3169if test -n "$ac_tool_prefix"; then
3170 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3171set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3173$as_echo_n "checking for $ac_word... " >&6; }
3174if test "${ac_cv_prog_CC+set}" = set; then :
3175 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003176else
3177 if test -n "$CC"; then
3178 ac_cv_prog_CC="$CC" # Let the user override the test.
3179else
Martin v. Löwis11437992002-04-12 09:54:03 +00003180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3181for as_dir in $PATH
3182do
3183 IFS=$as_save_IFS
3184 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003185 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003186 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 +00003187 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003188 $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 +00003189 break 2
3190 fi
3191done
Matthias Kloseb9621712010-04-24 17:59:49 +00003192 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003193IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003194
Jack Jansendd19cf82001-12-06 22:36:17 +00003195fi
3196fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003197CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003198if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3200$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003201else
Matthias Kloseb9621712010-04-24 17:59:49 +00003202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3203$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003204fi
3205
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003206
Martin v. Löwis11437992002-04-12 09:54:03 +00003207fi
3208if test -z "$ac_cv_prog_CC"; then
3209 ac_ct_CC=$CC
3210 # Extract the first word of "gcc", so it can be a program name with args.
3211set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3213$as_echo_n "checking for $ac_word... " >&6; }
3214if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3215 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003216else
3217 if test -n "$ac_ct_CC"; then
3218 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3219else
3220as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3221for as_dir in $PATH
3222do
3223 IFS=$as_save_IFS
3224 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003225 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003226 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 +00003227 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003228 $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 +00003229 break 2
3230 fi
3231done
Matthias Kloseb9621712010-04-24 17:59:49 +00003232 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003233IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003234
3235fi
3236fi
3237ac_ct_CC=$ac_cv_prog_ac_ct_CC
3238if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3240$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003241else
Matthias Kloseb9621712010-04-24 17:59:49 +00003242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3243$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003244fi
3245
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003246 if test "x$ac_ct_CC" = x; then
3247 CC=""
3248 else
3249 case $cross_compiling:$ac_tool_warned in
3250yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003251{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3252$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003253ac_tool_warned=yes ;;
3254esac
3255 CC=$ac_ct_CC
3256 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003257else
3258 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003259fi
3260
Jack Jansendd19cf82001-12-06 22:36:17 +00003261if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003262 if test -n "$ac_tool_prefix"; then
3263 # 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 +00003264set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3266$as_echo_n "checking for $ac_word... " >&6; }
3267if test "${ac_cv_prog_CC+set}" = set; then :
3268 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003269else
3270 if test -n "$CC"; then
3271 ac_cv_prog_CC="$CC" # Let the user override the test.
3272else
Martin v. Löwis11437992002-04-12 09:54:03 +00003273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3274for as_dir in $PATH
3275do
3276 IFS=$as_save_IFS
3277 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003278 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003279 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 +00003280 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003281 $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 +00003282 break 2
3283 fi
3284done
Matthias Kloseb9621712010-04-24 17:59:49 +00003285 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003286IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003287
3288fi
3289fi
3290CC=$ac_cv_prog_CC
3291if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3293$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003294else
Matthias Kloseb9621712010-04-24 17:59:49 +00003295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3296$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003297fi
3298
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003299
Martin v. Löwis11437992002-04-12 09:54:03 +00003300 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003301fi
3302if test -z "$CC"; then
3303 # Extract the first word of "cc", so it can be a program name with args.
3304set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3306$as_echo_n "checking for $ac_word... " >&6; }
3307if test "${ac_cv_prog_CC+set}" = set; then :
3308 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003309else
3310 if test -n "$CC"; then
3311 ac_cv_prog_CC="$CC" # Let the user override the test.
3312else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003313 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3315for as_dir in $PATH
3316do
3317 IFS=$as_save_IFS
3318 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003319 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003320 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 +00003321 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3322 ac_prog_rejected=yes
3323 continue
3324 fi
3325 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003326 $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 +00003327 break 2
3328 fi
3329done
Matthias Kloseb9621712010-04-24 17:59:49 +00003330 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003331IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003332
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003333if test $ac_prog_rejected = yes; then
3334 # We found a bogon in the path, so make sure we never use it.
3335 set dummy $ac_cv_prog_CC
3336 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003337 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003338 # We chose a different compiler from the bogus one.
3339 # However, it has the same basename, so the bogon will be chosen
3340 # first if we set CC to just the basename; use the full file name.
3341 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003342 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003343 fi
3344fi
3345fi
3346fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003347CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003348if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3350$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003351else
Matthias Kloseb9621712010-04-24 17:59:49 +00003352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3353$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003354fi
3355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003356
Martin v. Löwis11437992002-04-12 09:54:03 +00003357fi
3358if test -z "$CC"; then
3359 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003360 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003361 do
3362 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3363set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3365$as_echo_n "checking for $ac_word... " >&6; }
3366if test "${ac_cv_prog_CC+set}" = set; then :
3367 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003368else
3369 if test -n "$CC"; then
3370 ac_cv_prog_CC="$CC" # Let the user override the test.
3371else
Martin v. Löwis11437992002-04-12 09:54:03 +00003372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3373for as_dir in $PATH
3374do
3375 IFS=$as_save_IFS
3376 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003377 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003378 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 +00003379 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003380 $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 +00003381 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003382 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003383done
Matthias Kloseb9621712010-04-24 17:59:49 +00003384 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003385IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003386
3387fi
3388fi
3389CC=$ac_cv_prog_CC
3390if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3392$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003393else
Matthias Kloseb9621712010-04-24 17:59:49 +00003394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3395$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003396fi
3397
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003398
Martin v. Löwis11437992002-04-12 09:54:03 +00003399 test -n "$CC" && break
3400 done
3401fi
3402if test -z "$CC"; then
3403 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003404 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003405do
3406 # Extract the first word of "$ac_prog", so it can be a program name with args.
3407set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3409$as_echo_n "checking for $ac_word... " >&6; }
3410if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3411 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003412else
3413 if test -n "$ac_ct_CC"; then
3414 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3415else
3416as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3417for as_dir in $PATH
3418do
3419 IFS=$as_save_IFS
3420 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003421 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003422 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 +00003423 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003424 $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 +00003425 break 2
3426 fi
3427done
Matthias Kloseb9621712010-04-24 17:59:49 +00003428 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003429IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003430
Martin v. Löwis11437992002-04-12 09:54:03 +00003431fi
3432fi
3433ac_ct_CC=$ac_cv_prog_ac_ct_CC
3434if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3436$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003437else
Matthias Kloseb9621712010-04-24 17:59:49 +00003438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3439$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003440fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003441
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003442
Martin v. Löwis11437992002-04-12 09:54:03 +00003443 test -n "$ac_ct_CC" && break
3444done
Michael W. Hudson54241132001-12-07 15:38:26 +00003445
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003446 if test "x$ac_ct_CC" = x; then
3447 CC=""
3448 else
3449 case $cross_compiling:$ac_tool_warned in
3450yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003451{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3452$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453ac_tool_warned=yes ;;
3454esac
3455 CC=$ac_ct_CC
3456 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003457fi
3458
3459fi
3460
3461
Matthias Kloseb9621712010-04-24 17:59:49 +00003462test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3463$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3464as_fn_error "no acceptable C compiler found in \$PATH
3465See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003466
3467# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003468$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3469set X $ac_compile
3470ac_compiler=$2
3471for ac_option in --version -v -V -qversion; do
3472 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473case "(($ac_try" in
3474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3475 *) ac_try_echo=$ac_try;;
3476esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003477eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3478$as_echo "$ac_try_echo"; } >&5
3479 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003480 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003481 if test -s conftest.err; then
3482 sed '10a\
3483... rest of stderr output deleted ...
3484 10q' conftest.err >conftest.er1
3485 cat conftest.er1 >&5
3486 fi
3487 rm -f conftest.er1 conftest.err
3488 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3489 test $ac_status = 0; }
3490done
Martin v. Löwis11437992002-04-12 09:54:03 +00003491
Matthias Kloseb9621712010-04-24 17:59:49 +00003492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003493/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003494
Martin v. Löwis11437992002-04-12 09:54:03 +00003495int
3496main ()
3497{
3498
3499 ;
3500 return 0;
3501}
3502_ACEOF
3503ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003504ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003505# Try to create an executable without -o first, disregard a.out.
3506# It will help us diagnose broken compilers, and finding out an intuition
3507# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3509$as_echo_n "checking whether the C compiler works... " >&6; }
3510ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3511
3512# The possible output files:
3513ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3514
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003515ac_rmfiles=
3516for ac_file in $ac_files
3517do
3518 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003519 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003520 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3521 esac
3522done
3523rm -f $ac_rmfiles
3524
Matthias Kloseb9621712010-04-24 17:59:49 +00003525if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003526case "(($ac_try" in
3527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3528 *) ac_try_echo=$ac_try;;
3529esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003530eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3531$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003532 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003533 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003534 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3535 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003536 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3537# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3538# in a Makefile. We should not override ac_cv_exeext if it was cached,
3539# so that the user can short-circuit this test for compilers unknown to
3540# Autoconf.
3541for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003542do
3543 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003545 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003546 ;;
3547 [ab].out )
3548 # We found the default executable, but exeext='' is most
3549 # certainly right.
3550 break;;
3551 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003552 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003553 then :; else
3554 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3555 fi
3556 # We set ac_cv_exeext here because the later test for it is not
3557 # safe: cross compilers may not add the suffix if given an `-o'
3558 # argument, so we may need to know it at that point already.
3559 # Even if this section looks crufty: it has the advantage of
3560 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003561 break;;
3562 * )
3563 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003564 esac
3565done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003566test "$ac_cv_exeext" = no && ac_cv_exeext=
3567
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003568else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003569 ac_file=''
3570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003571if test -z "$ac_file"; then :
3572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3573$as_echo "no" >&6; }
3574$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003575sed 's/^/| /' conftest.$ac_ext >&5
3576
Matthias Kloseb9621712010-04-24 17:59:49 +00003577{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3578$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3579{ as_fn_set_status 77
3580as_fn_error "C compiler cannot create executables
3581See \`config.log' for more details." "$LINENO" 5; }; }
3582else
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3584$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3587$as_echo_n "checking for C compiler default output file name... " >&6; }
3588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3589$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003590ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003591
Matthias Kloseb9621712010-04-24 17:59:49 +00003592rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003593ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3595$as_echo_n "checking for suffix of executables... " >&6; }
3596if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003597case "(($ac_try" in
3598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3599 *) ac_try_echo=$ac_try;;
3600esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003601eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3602$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003604 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3606 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003607 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3608# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3609# work properly (i.e., refer to `conftest.exe'), while it won't with
3610# `rm'.
3611for ac_file in conftest.exe conftest conftest.*; do
3612 test -f "$ac_file" || continue
3613 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003615 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3616 break;;
3617 * ) break;;
3618 esac
3619done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003620else
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3622$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3623as_fn_error "cannot compute suffix of executables: cannot compile and link
3624See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003626rm -f conftest conftest$ac_cv_exeext
3627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3628$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003629
3630rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003631EXEEXT=$ac_cv_exeext
3632ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3634/* end confdefs.h. */
3635#include <stdio.h>
3636int
3637main ()
3638{
3639FILE *f = fopen ("conftest.out", "w");
3640 return ferror (f) || fclose (f) != 0;
3641
3642 ;
3643 return 0;
3644}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003646ac_clean_files="$ac_clean_files conftest.out"
3647# Check that the compiler produces executables we can run. If not, either
3648# the compiler is broken, or we cross compile.
3649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3650$as_echo_n "checking whether we are cross compiling... " >&6; }
3651if test "$cross_compiling" != yes; then
3652 { { ac_try="$ac_link"
3653case "(($ac_try" in
3654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3655 *) ac_try_echo=$ac_try;;
3656esac
3657eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3658$as_echo "$ac_try_echo"; } >&5
3659 (eval "$ac_link") 2>&5
3660 ac_status=$?
3661 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3662 test $ac_status = 0; }
3663 if { ac_try='./conftest$ac_cv_exeext'
3664 { { case "(($ac_try" in
3665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3666 *) ac_try_echo=$ac_try;;
3667esac
3668eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3669$as_echo "$ac_try_echo"; } >&5
3670 (eval "$ac_try") 2>&5
3671 ac_status=$?
3672 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3673 test $ac_status = 0; }; }; then
3674 cross_compiling=no
3675 else
3676 if test "$cross_compiling" = maybe; then
3677 cross_compiling=yes
3678 else
3679 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3681as_fn_error "cannot run C compiled programs.
3682If you meant to cross compile, use \`--host'.
3683See \`config.log' for more details." "$LINENO" 5; }
3684 fi
3685 fi
3686fi
3687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3688$as_echo "$cross_compiling" >&6; }
3689
3690rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3691ac_clean_files=$ac_clean_files_save
3692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3693$as_echo_n "checking for suffix of object files... " >&6; }
3694if test "${ac_cv_objext+set}" = set; then :
3695 $as_echo_n "(cached) " >&6
3696else
3697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003698/* end confdefs.h. */
3699
3700int
3701main ()
3702{
3703
3704 ;
3705 return 0;
3706}
3707_ACEOF
3708rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003709if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003710case "(($ac_try" in
3711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3712 *) ac_try_echo=$ac_try;;
3713esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003714eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3715$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003716 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003717 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3719 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003720 for ac_file in conftest.o conftest.obj conftest.*; do
3721 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003722 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003724 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3725 break;;
3726 esac
3727done
3728else
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003730sed 's/^/| /' conftest.$ac_ext >&5
3731
Matthias Kloseb9621712010-04-24 17:59:49 +00003732{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3733$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3734as_fn_error "cannot compute suffix of object files: cannot compile
3735See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003737rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3740$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003741OBJEXT=$ac_cv_objext
3742ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3744$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3745if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3746 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003747else
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003750
Martin v. Löwis11437992002-04-12 09:54:03 +00003751int
3752main ()
3753{
3754#ifndef __GNUC__
3755 choke me
3756#endif
3757
3758 ;
3759 return 0;
3760}
3761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003762if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 ac_compiler_gnu=yes
3764else
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003766fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003768ac_cv_c_compiler_gnu=$ac_compiler_gnu
3769
3770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3772$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3773if test $ac_compiler_gnu = yes; then
3774 GCC=yes
3775else
3776 GCC=
3777fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003778ac_test_CFLAGS=${CFLAGS+set}
3779ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3781$as_echo_n "checking whether $CC accepts -g... " >&6; }
3782if test "${ac_cv_prog_cc_g+set}" = set; then :
3783 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003784else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003785 ac_save_c_werror_flag=$ac_c_werror_flag
3786 ac_c_werror_flag=yes
3787 ac_cv_prog_cc_g=no
3788 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003791
Martin v. Löwis11437992002-04-12 09:54:03 +00003792int
3793main ()
3794{
3795
3796 ;
3797 return 0;
3798}
3799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003800if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003801 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003802else
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 CFLAGS=""
3804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805/* end confdefs.h. */
3806
3807int
3808main ()
3809{
3810
3811 ;
3812 return 0;
3813}
3814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003815if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816
Matthias Kloseb9621712010-04-24 17:59:49 +00003817else
3818 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003819 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821/* end confdefs.h. */
3822
3823int
3824main ()
3825{
3826
3827 ;
3828 return 0;
3829}
3830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003831if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3839 ac_c_werror_flag=$ac_save_c_werror_flag
3840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3842$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003843if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003844 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003845elif test $ac_cv_prog_cc_g = yes; then
3846 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003847 CFLAGS="-g -O2"
3848 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003849 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003850 fi
3851else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003852 if test "$GCC" = yes; then
3853 CFLAGS="-O2"
3854 else
3855 CFLAGS=
3856 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3859$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3860if test "${ac_cv_prog_cc_c89+set}" = set; then :
3861 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003862else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003863 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003864ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003866/* end confdefs.h. */
3867#include <stdarg.h>
3868#include <stdio.h>
3869#include <sys/types.h>
3870#include <sys/stat.h>
3871/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3872struct buf { int x; };
3873FILE * (*rcsopen) (struct buf *, struct stat *, int);
3874static char *e (p, i)
3875 char **p;
3876 int i;
3877{
3878 return p[i];
3879}
3880static char *f (char * (*g) (char **, int), char **p, ...)
3881{
3882 char *s;
3883 va_list v;
3884 va_start (v,p);
3885 s = g (p, va_arg (v,int));
3886 va_end (v);
3887 return s;
3888}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003889
3890/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3891 function prototypes and stuff, but not '\xHH' hex character constants.
3892 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003894 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3895 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003897int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3898
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3900 inside strings and character constants. */
3901#define FOO(x) 'x'
3902int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3903
Skip Montanaro6dead952003-09-25 14:50:04 +00003904int test (int i, double x);
3905struct s1 {int (*f) (int a);};
3906struct s2 {int (*f) (double a);};
3907int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3908int argc;
3909char **argv;
3910int
3911main ()
3912{
3913return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3914 ;
3915 return 0;
3916}
3917_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3919 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003920do
3921 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003922 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003925rm -f core conftest.err conftest.$ac_objext
3926 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003927done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003929CC=$ac_save_CC
3930
3931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003932# AC_CACHE_VAL
3933case "x$ac_cv_prog_cc_c89" in
3934 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3936$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003937 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3939$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003940 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3943$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003944esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003945if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003946
Matthias Kloseb9621712010-04-24 17:59:49 +00003947fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003948
Martin v. Löwis11437992002-04-12 09:54:03 +00003949ac_ext=c
3950ac_cpp='$CPP $CPPFLAGS'
3951ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3952ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3953ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003954
Marc-André Lemburgdf700f02010-04-30 17:29:56 +00003955if test ! -z "$preset_cflags"
3956then
3957 CFLAGS=$preset_cflags
3958fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003959
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003960
3961
Matthias Kloseb9621712010-04-24 17:59:49 +00003962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3963$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003964
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003966if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003968
3969 case $withval in
3970 no) with_cxx_main=no
3971 MAINCC='$(CC)';;
3972 yes) with_cxx_main=yes
3973 MAINCC='$(CXX)';;
3974 *) with_cxx_main=yes
3975 MAINCC=$withval
3976 if test -z "$CXX"
3977 then
3978 CXX=$withval
3979 fi;;
3980 esac
3981else
3982
3983 with_cxx_main=no
3984 MAINCC='$(CC)'
3985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003986fi
3987
Matthias Kloseb9621712010-04-24 17:59:49 +00003988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3989$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003990
3991preset_cxx="$CXX"
3992if test -z "$CXX"
3993then
3994 case "$CC" in
3995 gcc) # Extract the first word of "g++", so it can be a program name with args.
3996set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3998$as_echo_n "checking for $ac_word... " >&6; }
3999if test "${ac_cv_path_CXX+set}" = set; then :
4000 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004001else
4002 case $CXX in
4003 [\\/]* | ?:[\\/]*)
4004 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4005 ;;
4006 *)
4007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4008for as_dir in notfound
4009do
4010 IFS=$as_save_IFS
4011 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004012 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004013 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 +00004014 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004015 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004016 break 2
4017 fi
4018done
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004020IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004021
4022 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4023 ;;
4024esac
4025fi
4026CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004027if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4029$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004030else
Matthias Kloseb9621712010-04-24 17:59:49 +00004031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4032$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004034
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004035 ;;
4036 cc) # Extract the first word of "c++", so it can be a program name with args.
4037set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4039$as_echo_n "checking for $ac_word... " >&6; }
4040if test "${ac_cv_path_CXX+set}" = set; then :
4041 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004042else
4043 case $CXX in
4044 [\\/]* | ?:[\\/]*)
4045 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4046 ;;
4047 *)
4048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4049for as_dir in notfound
4050do
4051 IFS=$as_save_IFS
4052 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004053 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004054 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 +00004055 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004057 break 2
4058 fi
4059done
Matthias Kloseb9621712010-04-24 17:59:49 +00004060 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004061IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004062
4063 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4064 ;;
4065esac
4066fi
4067CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004068if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4070$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004071else
Matthias Kloseb9621712010-04-24 17:59:49 +00004072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4073$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004075
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004076 ;;
4077 esac
4078 if test "$CXX" = "notfound"
4079 then
4080 CXX=""
4081 fi
4082fi
4083if test -z "$CXX"
4084then
4085 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4086do
4087 # Extract the first word of "$ac_prog", so it can be a program name with args.
4088set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4090$as_echo_n "checking for $ac_word... " >&6; }
4091if test "${ac_cv_prog_CXX+set}" = set; then :
4092 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004093else
4094 if test -n "$CXX"; then
4095 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4096else
4097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4098for as_dir in $PATH
4099do
4100 IFS=$as_save_IFS
4101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004102 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004103 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 +00004104 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004106 break 2
4107 fi
4108done
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004110IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004111
4112fi
4113fi
4114CXX=$ac_cv_prog_CXX
4115if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4117$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004118else
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4120$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004121fi
4122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004123
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004124 test -n "$CXX" && break
4125done
4126test -n "$CXX" || CXX="notfound"
4127
4128 if test "$CXX" = "notfound"
4129 then
4130 CXX=""
4131 fi
4132fi
4133if test "$preset_cxx" != "$CXX"
4134then
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004136
4137 By default, distutils will build C++ extension modules with \"$CXX\".
4138 If this is not intended, then set CXX on the configure command line.
4139 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004140$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004141
4142 By default, distutils will build C++ extension modules with \"$CXX\".
4143 If this is not intended, then set CXX on the configure command line.
4144 " >&2;}
4145fi
4146
4147
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004148# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004149
4150ac_ext=c
4151ac_cpp='$CPP $CPPFLAGS'
4152ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4153ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4154ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4156$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004157# On Suns, sometimes $CPP names a directory.
4158if test -n "$CPP" && test -d "$CPP"; then
4159 CPP=
4160fi
4161if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004162 if test "${ac_cv_prog_CPP+set}" = set; then :
4163 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004164else
Martin v. Löwis11437992002-04-12 09:54:03 +00004165 # Double quotes because CPP needs to be expanded
4166 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4167 do
4168 ac_preproc_ok=false
4169for ac_c_preproc_warn_flag in '' yes
4170do
4171 # Use a header file that comes with gcc, so configuring glibc
4172 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004173 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4174 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004175 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004176 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004178/* end confdefs.h. */
4179#ifdef __STDC__
4180# include <limits.h>
4181#else
4182# include <assert.h>
4183#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004184 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004186if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004187
Matthias Kloseb9621712010-04-24 17:59:49 +00004188else
Martin v. Löwis11437992002-04-12 09:54:03 +00004189 # Broken: fails on valid input.
4190continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004191fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004192rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004194 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004195 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004198#include <ac_nonexistent.h>
4199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004200if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004201 # Broken: success on invalid input.
4202continue
4203else
Martin v. Löwis11437992002-04-12 09:54:03 +00004204 # Passes both tests.
4205ac_preproc_ok=:
4206break
4207fi
4208rm -f conftest.err conftest.$ac_ext
4209
4210done
4211# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4212rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004213if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004214 break
4215fi
4216
4217 done
4218 ac_cv_prog_CPP=$CPP
4219
4220fi
4221 CPP=$ac_cv_prog_CPP
4222else
4223 ac_cv_prog_CPP=$CPP
4224fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4226$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004227ac_preproc_ok=false
4228for ac_c_preproc_warn_flag in '' yes
4229do
4230 # Use a header file that comes with gcc, so configuring glibc
4231 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004232 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4233 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004234 # On the NeXT, cc -E runs the code through the compiler's parser,
4235 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004237/* end confdefs.h. */
4238#ifdef __STDC__
4239# include <limits.h>
4240#else
4241# include <assert.h>
4242#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004243 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004245if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004246
Matthias Kloseb9621712010-04-24 17:59:49 +00004247else
Martin v. Löwis11437992002-04-12 09:54:03 +00004248 # Broken: fails on valid input.
4249continue
4250fi
4251rm -f conftest.err conftest.$ac_ext
4252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004253 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004254 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004257#include <ac_nonexistent.h>
4258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004259if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004260 # Broken: success on invalid input.
4261continue
4262else
Martin v. Löwis11437992002-04-12 09:54:03 +00004263 # Passes both tests.
4264ac_preproc_ok=:
4265break
4266fi
4267rm -f conftest.err conftest.$ac_ext
4268
4269done
4270# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4271rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004272if $ac_preproc_ok; then :
4273
Martin v. Löwis11437992002-04-12 09:54:03 +00004274else
Matthias Kloseb9621712010-04-24 17:59:49 +00004275 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4276$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4277as_fn_error "C preprocessor \"$CPP\" fails sanity check
4278See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004279fi
4280
4281ac_ext=c
4282ac_cpp='$CPP $CPPFLAGS'
4283ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4284ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4285ac_compiler_gnu=$ac_cv_c_compiler_gnu
4286
4287
Matthias Kloseb9621712010-04-24 17:59:49 +00004288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4289$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4290if test "${ac_cv_path_GREP+set}" = set; then :
4291 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004292else
Matthias Kloseb9621712010-04-24 17:59:49 +00004293 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004295 # Loop through the user's path and test for each of PROGNAME-LIST
4296 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4298do
4299 IFS=$as_save_IFS
4300 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004301 for ac_prog in grep ggrep; do
4302 for ac_exec_ext in '' $ac_executable_extensions; do
4303 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4304 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4305# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306 # Check for GNU $ac_path_GREP
4307case `"$ac_path_GREP" --version 2>&1` in
4308*GNU*)
4309 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4310*)
4311 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004312 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313 while :
4314 do
4315 cat "conftest.in" "conftest.in" >"conftest.tmp"
4316 mv "conftest.tmp" "conftest.in"
4317 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004318 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4320 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004321 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4323 # Best one so far, save it but keep looking for a better one
4324 ac_cv_path_GREP="$ac_path_GREP"
4325 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004326 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327 # 10*(2^10) chars as input seems more than enough
4328 test $ac_count -gt 10 && break
4329 done
4330 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4331esac
4332
Matthias Kloseb9621712010-04-24 17:59:49 +00004333 $ac_path_GREP_found && break 3
4334 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004336 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 if test -z "$ac_cv_path_GREP"; then
4339 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4340 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341else
4342 ac_cv_path_GREP=$GREP
4343fi
4344
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4347$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348 GREP="$ac_cv_path_GREP"
4349
4350
Matthias Kloseb9621712010-04-24 17:59:49 +00004351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4352$as_echo_n "checking for egrep... " >&6; }
4353if test "${ac_cv_path_EGREP+set}" = set; then :
4354 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355else
4356 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4357 then ac_cv_path_EGREP="$GREP -E"
4358 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 # Loop through the user's path and test for each of PROGNAME-LIST
4362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4364do
4365 IFS=$as_save_IFS
4366 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004367 for ac_prog in egrep; do
4368 for ac_exec_ext in '' $ac_executable_extensions; do
4369 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4370 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4371# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004372 # Check for GNU $ac_path_EGREP
4373case `"$ac_path_EGREP" --version 2>&1` in
4374*GNU*)
4375 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4376*)
4377 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004378 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379 while :
4380 do
4381 cat "conftest.in" "conftest.in" >"conftest.tmp"
4382 mv "conftest.tmp" "conftest.in"
4383 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004384 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4386 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004387 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004388 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4389 # Best one so far, save it but keep looking for a better one
4390 ac_cv_path_EGREP="$ac_path_EGREP"
4391 ac_path_EGREP_max=$ac_count
4392 fi
4393 # 10*(2^10) chars as input seems more than enough
4394 test $ac_count -gt 10 && break
4395 done
4396 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4397esac
4398
Matthias Kloseb9621712010-04-24 17:59:49 +00004399 $ac_path_EGREP_found && break 3
4400 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004401 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004402 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004403IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004404 if test -z "$ac_cv_path_EGREP"; then
4405 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4406 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004407else
4408 ac_cv_path_EGREP=$EGREP
4409fi
4410
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004411 fi
4412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4414$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004415 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004416
4417
Matthias Kloseb9621712010-04-24 17:59:49 +00004418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4419$as_echo_n "checking for ANSI C header files... " >&6; }
4420if test "${ac_cv_header_stdc+set}" = set; then :
4421 $as_echo_n "(cached) " >&6
4422else
4423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004424/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004425#include <stdlib.h>
4426#include <stdarg.h>
4427#include <string.h>
4428#include <float.h>
4429
4430int
4431main ()
4432{
4433
4434 ;
4435 return 0;
4436}
4437_ACEOF
4438if ac_fn_c_try_compile "$LINENO"; then :
4439 ac_cv_header_stdc=yes
4440else
4441 ac_cv_header_stdc=no
4442fi
4443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4444
4445if test $ac_cv_header_stdc = yes; then
4446 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4448/* end confdefs.h. */
4449#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004450
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004451_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004452if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004453 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004454
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004455else
Matthias Kloseb9621712010-04-24 17:59:49 +00004456 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004457fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004458rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004459
Matthias Kloseb9621712010-04-24 17:59:49 +00004460fi
4461
4462if test $ac_cv_header_stdc = yes; then
4463 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4465/* end confdefs.h. */
4466#include <stdlib.h>
4467
4468_ACEOF
4469if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4470 $EGREP "free" >/dev/null 2>&1; then :
4471
4472else
4473 ac_cv_header_stdc=no
4474fi
4475rm -f conftest*
4476
4477fi
4478
4479if test $ac_cv_header_stdc = yes; then
4480 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4481 if test "$cross_compiling" = yes; then :
4482 :
4483else
4484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4485/* end confdefs.h. */
4486#include <ctype.h>
4487#include <stdlib.h>
4488#if ((' ' & 0x0FF) == 0x020)
4489# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4490# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4491#else
4492# define ISLOWER(c) \
4493 (('a' <= (c) && (c) <= 'i') \
4494 || ('j' <= (c) && (c) <= 'r') \
4495 || ('s' <= (c) && (c) <= 'z'))
4496# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4497#endif
4498
4499#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4500int
4501main ()
4502{
4503 int i;
4504 for (i = 0; i < 256; i++)
4505 if (XOR (islower (i), ISLOWER (i))
4506 || toupper (i) != TOUPPER (i))
4507 return 2;
4508 return 0;
4509}
4510_ACEOF
4511if ac_fn_c_try_run "$LINENO"; then :
4512
4513else
4514 ac_cv_header_stdc=no
4515fi
4516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4517 conftest.$ac_objext conftest.beam conftest.$ac_ext
4518fi
4519
4520fi
4521fi
4522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4523$as_echo "$ac_cv_header_stdc" >&6; }
4524if test $ac_cv_header_stdc = yes; then
4525
4526$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4527
4528fi
4529
4530# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4531for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4532 inttypes.h stdint.h unistd.h
4533do :
4534 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4535ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4536"
4537eval as_val=\$$as_ac_Header
4538 if test "x$as_val" = x""yes; then :
4539 cat >>confdefs.h <<_ACEOF
4540#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4541_ACEOF
4542
4543fi
4544
4545done
4546
4547
4548
4549 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4550if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4551 MINIX=yes
4552else
4553 MINIX=
4554fi
4555
4556
4557 if test "$MINIX" = yes; then
4558
4559$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4560
4561
4562$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4563
4564
4565$as_echo "#define _MINIX 1" >>confdefs.h
4566
4567 fi
4568
4569
4570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4571$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4572if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4573 $as_echo_n "(cached) " >&6
4574else
4575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4576/* end confdefs.h. */
4577
4578# define __EXTENSIONS__ 1
4579 $ac_includes_default
4580int
4581main ()
4582{
4583
4584 ;
4585 return 0;
4586}
4587_ACEOF
4588if ac_fn_c_try_compile "$LINENO"; then :
4589 ac_cv_safe_to_define___extensions__=yes
4590else
4591 ac_cv_safe_to_define___extensions__=no
4592fi
4593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4594fi
4595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4596$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4597 test $ac_cv_safe_to_define___extensions__ = yes &&
4598 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4599
4600 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4601
4602 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4603
4604 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4605
4606 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4607
4608
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004609
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004610# Check for unsupported systems
4611case $ac_sys_system/$ac_sys_release in
4612atheos*|Linux*/1*)
4613 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4614 echo See README for details.
4615 exit 1;;
4616esac
4617
4618
Matthias Kloseb9621712010-04-24 17:59:49 +00004619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4620$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004621
4622# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004623if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004624 withval=$with_suffix;
4625 case $withval in
4626 no) EXEEXT=;;
4627 yes) EXEEXT=.exe;;
4628 *) EXEEXT=$withval;;
4629 esac
4630fi
4631
Matthias Kloseb9621712010-04-24 17:59:49 +00004632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4633$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004634
4635# Test whether we're running on a non-case-sensitive system, in which
4636# case we give a warning if no ext is given
4637
Matthias Kloseb9621712010-04-24 17:59:49 +00004638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4639$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004640if test ! -d CaseSensitiveTestDir; then
4641mkdir CaseSensitiveTestDir
4642fi
4643
4644if test -d casesensitivetestdir
4645then
Matthias Kloseb9621712010-04-24 17:59:49 +00004646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4647$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004648 BUILDEXEEXT=.exe
4649else
Matthias Kloseb9621712010-04-24 17:59:49 +00004650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4651$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004652 BUILDEXEEXT=$EXEEXT
4653fi
4654rmdir CaseSensitiveTestDir
4655
4656case $MACHDEP in
4657bsdos*)
4658 case $CC in
4659 gcc) CC="$CC -D_HAVE_BSDI";;
4660 esac;;
4661esac
4662
4663case $ac_sys_system in
4664hp*|HP*)
4665 case $CC in
4666 cc|*/cc) CC="$CC -Ae";;
4667 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004668esac
4669
4670
4671
Matthias Kloseb9621712010-04-24 17:59:49 +00004672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4673$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004674if test -z "$LIBRARY"
4675then
4676 LIBRARY='libpython$(VERSION).a'
4677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4679$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004680
4681# LDLIBRARY is the name of the library to link against (as opposed to the
4682# name of the library into which to insert object files). BLDLIBRARY is also
4683# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4684# is blank as the main program is not linked directly against LDLIBRARY.
4685# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4686# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4687# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4688# DLLLIBRARY is the shared (i.e., DLL) library.
4689#
4690# RUNSHARED is used to run shared python without installed libraries
4691#
4692# INSTSONAME is the name of the shared library that will be use to install
4693# on the system - some systems like version suffix, others don't
4694
4695
4696
4697
4698
4699
4700LDLIBRARY="$LIBRARY"
4701BLDLIBRARY='$(LDLIBRARY)'
4702INSTSONAME='$(LDLIBRARY)'
4703DLLLIBRARY=''
4704LDLIBRARYDIR=''
4705RUNSHARED=''
4706
4707# LINKCC is the command that links the python executable -- default is $(CC).
4708# If CXX is set, and if it is needed to link a main function that was
4709# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4710# python might then depend on the C++ runtime
4711# This is altered for AIX in order to build the export list before
4712# linking.
4713
Matthias Kloseb9621712010-04-24 17:59:49 +00004714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4715$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004716if test -z "$LINKCC"
4717then
4718 LINKCC='$(PURIFY) $(MAINCC)'
4719 case $ac_sys_system in
4720 AIX*)
4721 exp_extra="\"\""
4722 if test $ac_sys_release -ge 5 -o \
4723 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4724 exp_extra="."
4725 fi
4726 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004727 QNX*)
4728 # qcc must be used because the other compilers do not
4729 # support -N.
4730 LINKCC=qcc;;
4731 esac
4732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4734$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004735
4736# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4737# make sure we default having it set to "no": this is used by
4738# distutils.unixccompiler to know if it should add --enable-new-dtags
4739# to linker command lines, and failing to detect GNU ld simply results
4740# in the same bahaviour as before.
4741
Matthias Kloseb9621712010-04-24 17:59:49 +00004742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4743$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004744ac_prog=ld
4745if test "$GCC" = yes; then
4746 ac_prog=`$CC -print-prog-name=ld`
4747fi
4748case `"$ac_prog" -V 2>&1 < /dev/null` in
4749 *GNU*)
4750 GNULD=yes;;
4751 *)
4752 GNULD=no;;
4753esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4755$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004756
Matthias Kloseb9621712010-04-24 17:59:49 +00004757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4758$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004759# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004760if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004761 enableval=$enable_shared;
4762fi
4763
4764
4765if test -z "$enable_shared"
4766then
4767 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004768 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004769 enable_shared="yes";;
4770 *)
4771 enable_shared="no";;
4772 esac
4773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4775$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004776
Matthias Kloseb9621712010-04-24 17:59:49 +00004777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4778$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004779# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004780if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004781 enableval=$enable_profiling; ac_save_cc="$CC"
4782 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004783 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004784 ac_enable_profiling="no"
4785else
Matthias Kloseb9621712010-04-24 17:59:49 +00004786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004787/* end confdefs.h. */
4788int main() { return 0; }
4789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004790if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004791 ac_enable_profiling="yes"
4792else
Matthias Kloseb9621712010-04-24 17:59:49 +00004793 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4796 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004797fi
4798
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004799 CC="$ac_save_cc"
4800fi
4801
Matthias Kloseb9621712010-04-24 17:59:49 +00004802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4803$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004804
4805case "$ac_enable_profiling" in
4806 "yes")
4807 BASECFLAGS="-pg $BASECFLAGS"
4808 LDFLAGS="-pg $LDFLAGS"
4809 ;;
4810esac
4811
Matthias Kloseb9621712010-04-24 17:59:49 +00004812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4813$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004814
4815# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4816# library that we build, but we do not want to link against it (we
4817# will find it with a -framework option). For this reason there is an
4818# extra variable BLDLIBRARY against which Python and the extension
4819# modules are linked, BLDLIBRARY. This is normally the same as
4820# LDLIBRARY, but empty for MacOSX framework builds.
4821if test "$enable_framework"
4822then
4823 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4824 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4825 BLDLIBRARY=''
4826else
4827 BLDLIBRARY='$(LDLIBRARY)'
4828fi
4829
4830# Other platforms follow
4831if test $enable_shared = "yes"; then
4832
Matthias Kloseb9621712010-04-24 17:59:49 +00004833$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004834
4835 case $ac_sys_system in
4836 CYGWIN*)
4837 LDLIBRARY='libpython$(VERSION).dll.a'
4838 DLLLIBRARY='libpython$(VERSION).dll'
4839 ;;
4840 SunOS*)
4841 LDLIBRARY='libpython$(VERSION).so'
4842 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4843 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4844 INSTSONAME="$LDLIBRARY".$SOVERSION
4845 ;;
4846 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4847 LDLIBRARY='libpython$(VERSION).so'
4848 BLDLIBRARY='-L. -lpython$(VERSION)'
4849 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4850 case $ac_sys_system in
4851 FreeBSD*)
4852 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4853 ;;
4854 esac
4855 INSTSONAME="$LDLIBRARY".$SOVERSION
4856 ;;
4857 hp*|HP*)
4858 case `uname -m` in
4859 ia64)
4860 LDLIBRARY='libpython$(VERSION).so'
4861 ;;
4862 *)
4863 LDLIBRARY='libpython$(VERSION).sl'
4864 ;;
4865 esac
4866 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4867 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4868 ;;
4869 OSF*)
4870 LDLIBRARY='libpython$(VERSION).so'
4871 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4872 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4873 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004874 Darwin*)
4875 LDLIBRARY='libpython$(VERSION).dylib'
4876 BLDLIBRARY='-L. -lpython$(VERSION)'
4877 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4878 ;;
4879
4880 esac
4881else # shared is disabled
4882 case $ac_sys_system in
4883 CYGWIN*)
4884 BLDLIBRARY='$(LIBRARY)'
4885 LDLIBRARY='libpython$(VERSION).dll.a'
4886 ;;
4887 esac
4888fi
4889
Matthias Kloseb9621712010-04-24 17:59:49 +00004890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4891$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004892
4893if test -n "$ac_tool_prefix"; then
4894 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4895set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4897$as_echo_n "checking for $ac_word... " >&6; }
4898if test "${ac_cv_prog_RANLIB+set}" = set; then :
4899 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004900else
4901 if test -n "$RANLIB"; then
4902 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4903else
4904as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4905for as_dir in $PATH
4906do
4907 IFS=$as_save_IFS
4908 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004909 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004910 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4911 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004912 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004913 break 2
4914 fi
4915done
Matthias Kloseb9621712010-04-24 17:59:49 +00004916 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004917IFS=$as_save_IFS
4918
4919fi
4920fi
4921RANLIB=$ac_cv_prog_RANLIB
4922if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4924$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925else
Matthias Kloseb9621712010-04-24 17:59:49 +00004926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4927$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928fi
4929
4930
4931fi
4932if test -z "$ac_cv_prog_RANLIB"; then
4933 ac_ct_RANLIB=$RANLIB
4934 # Extract the first word of "ranlib", so it can be a program name with args.
4935set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4937$as_echo_n "checking for $ac_word... " >&6; }
4938if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4939 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004940else
4941 if test -n "$ac_ct_RANLIB"; then
4942 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4943else
4944as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4945for as_dir in $PATH
4946do
4947 IFS=$as_save_IFS
4948 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004949 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004950 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4951 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004952 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004953 break 2
4954 fi
4955done
Matthias Kloseb9621712010-04-24 17:59:49 +00004956 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957IFS=$as_save_IFS
4958
4959fi
4960fi
4961ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4962if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4964$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965else
Matthias Kloseb9621712010-04-24 17:59:49 +00004966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4967$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968fi
4969
4970 if test "x$ac_ct_RANLIB" = x; then
4971 RANLIB=":"
4972 else
4973 case $cross_compiling:$ac_tool_warned in
4974yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00004975{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4976$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004977ac_tool_warned=yes ;;
4978esac
4979 RANLIB=$ac_ct_RANLIB
4980 fi
4981else
4982 RANLIB="$ac_cv_prog_RANLIB"
4983fi
4984
4985
4986for ac_prog in ar aal
4987do
4988 # Extract the first word of "$ac_prog", so it can be a program name with args.
4989set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4991$as_echo_n "checking for $ac_word... " >&6; }
4992if test "${ac_cv_prog_AR+set}" = set; then :
4993 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004994else
4995 if test -n "$AR"; then
4996 ac_cv_prog_AR="$AR" # Let the user override the test.
4997else
4998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4999for as_dir in $PATH
5000do
5001 IFS=$as_save_IFS
5002 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005003 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005004 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5005 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005007 break 2
5008 fi
5009done
Matthias Kloseb9621712010-04-24 17:59:49 +00005010 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005011IFS=$as_save_IFS
5012
5013fi
5014fi
5015AR=$ac_cv_prog_AR
5016if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5018$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005019else
Matthias Kloseb9621712010-04-24 17:59:49 +00005020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5021$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005022fi
5023
5024
5025 test -n "$AR" && break
5026done
5027test -n "$AR" || AR="ar"
5028
5029
5030# tweak ARFLAGS only if the user didn't set it on the command line
5031
5032if test -z "$ARFLAGS"
5033then
5034 ARFLAGS="rc"
5035fi
5036
5037
5038# Extract the first word of "svnversion", so it can be a program name with args.
5039set dummy svnversion; 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_SVNVERSION+set}" = set; then :
5043 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044else
5045 if test -n "$SVNVERSION"; then
5046 ac_cv_prog_SVNVERSION="$SVNVERSION" # 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_SVNVERSION="found"
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
5063 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5064fi
5065fi
5066SVNVERSION=$ac_cv_prog_SVNVERSION
5067if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5069$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005070else
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5072$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073fi
5074
5075
5076if test $SVNVERSION = found
5077then
5078 SVNVERSION="svnversion \$(srcdir)"
5079else
5080 SVNVERSION="echo Unversioned directory"
5081fi
5082
5083case $MACHDEP in
5084bsdos*|hp*|HP*)
5085 # install -d does not work on BSDI or HP-UX
5086 if test -z "$INSTALL"
5087 then
5088 INSTALL="${srcdir}/install-sh -c"
5089 fi
5090esac
5091ac_aux_dir=
5092for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 for ac_t in install-sh install.sh shtool; do
5094 if test -f "$ac_dir/$ac_t"; then
5095 ac_aux_dir=$ac_dir
5096 ac_install_sh="$ac_aux_dir/$ac_t -c"
5097 break 2
5098 fi
5099 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005100done
5101if test -z "$ac_aux_dir"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005102 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005103fi
5104
5105# These three variables are undocumented and unsupported,
5106# and are intended to be withdrawn in a future Autoconf release.
5107# They can cause serious problems if a builder's source tree is in a directory
5108# whose full name contains unusual characters.
5109ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5110ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5111ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5112
5113
5114# Find a good install program. We prefer a C program (faster),
5115# so one script is as good as another. But avoid the broken or
5116# incompatible versions:
5117# SysV /etc/install, /usr/sbin/install
5118# SunOS /usr/etc/install
5119# IRIX /sbin/install
5120# AIX /bin/install
5121# AmigaOS /C/install, which installs bootblocks on floppy discs
5122# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5123# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5124# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5125# OS/2's system install, which has a completely different semantic
5126# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005127# Reject install programs that cannot install multiple files.
5128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5129$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005131if test "${ac_cv_path_install+set}" = set; then :
5132 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005133else
5134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5135for as_dir in $PATH
5136do
5137 IFS=$as_save_IFS
5138 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005139 # Account for people who put trailing slashes in PATH elements.
5140case $as_dir/ in #((
5141 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005143 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005144 /usr/ucb/* ) ;;
5145 *)
5146 # OSF1 and SCO ODT 3.0 have their own names for install.
5147 # Don't use installbsd from OSF since it installs stuff as root
5148 # by default.
5149 for ac_prog in ginstall scoinst install; do
5150 for ac_exec_ext in '' $ac_executable_extensions; do
5151 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5152 if test $ac_prog = install &&
5153 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5154 # AIX install. It has an incompatible calling convention.
5155 :
5156 elif test $ac_prog = install &&
5157 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5158 # program-specific install script used by HP pwplus--don't use.
5159 :
5160 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005161 rm -rf conftest.one conftest.two conftest.dir
5162 echo one > conftest.one
5163 echo two > conftest.two
5164 mkdir conftest.dir
5165 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5166 test -s conftest.one && test -s conftest.two &&
5167 test -s conftest.dir/conftest.one &&
5168 test -s conftest.dir/conftest.two
5169 then
5170 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5171 break 3
5172 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005173 fi
5174 fi
5175 done
5176 done
5177 ;;
5178esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005179
5180 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005181IFS=$as_save_IFS
5182
Matthias Kloseb9621712010-04-24 17:59:49 +00005183rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005184
5185fi
5186 if test "${ac_cv_path_install+set}" = set; then
5187 INSTALL=$ac_cv_path_install
5188 else
5189 # As a last resort, use the slow shell script. Don't cache a
5190 # value for INSTALL within a source directory, because that will
5191 # break other packages using the cache if that directory is
5192 # removed, or if the value is a relative name.
5193 INSTALL=$ac_install_sh
5194 fi
5195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5197$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005198
5199# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5200# It thinks the first close brace ends the variable substitution.
5201test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5202
5203test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5204
5205test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5206
5207
5208# Not every filesystem supports hard links
5209
5210if test -z "$LN" ; then
5211 case $ac_sys_system in
5212 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005213 *) LN=ln;;
5214 esac
5215fi
5216
5217# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5219$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005220
5221# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005222if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005223 withval=$with_pydebug;
5224if test "$withval" != no
5225then
5226
Matthias Kloseb9621712010-04-24 17:59:49 +00005227$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005228
Matthias Kloseb9621712010-04-24 17:59:49 +00005229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5230$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005231 Py_DEBUG='true'
Matthias Kloseb9621712010-04-24 17:59:49 +00005232else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5233$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005234fi
5235else
Matthias Kloseb9621712010-04-24 17:59:49 +00005236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5237$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005238fi
5239
5240
5241# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5242# merged with this chunk of code?
5243
5244# Optimizer/debugger flags
5245# ------------------------
5246# (The following bit of code is complicated enough - please keep things
5247# indented properly. Just pretend you're editing Python code. ;-)
5248
5249# There are two parallel sets of case statements below, one that checks to
5250# see if OPT was set and one that does BASECFLAGS setting based upon
5251# compiler and platform. BASECFLAGS tweaks need to be made even if the
5252# user set OPT.
5253
5254# tweak OPT based on compiler and platform, only if the user didn't set
5255# it on the command line
5256
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005257if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005258then
5259 case $GCC in
5260 yes)
5261 if test "$CC" != 'g++' ; then
5262 STRICT_PROTO="-Wstrict-prototypes"
5263 fi
5264 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5265 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5266 WRAP="-fwrapv"
5267 fi
5268 case $ac_cv_prog_cc_g in
5269 yes)
5270 if test "$Py_DEBUG" = 'true' ; then
5271 # Optimization messes up debuggers, so turn it off for
5272 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005273 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005274 else
5275 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5276 fi
5277 ;;
5278 *)
5279 OPT="-O3 -Wall $STRICT_PROTO"
5280 ;;
5281 esac
5282 case $ac_sys_system in
5283 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5284 ;;
5285 esac
5286 ;;
5287
5288 *)
5289 OPT="-O"
5290 ;;
5291 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292fi
5293
5294
5295
5296# The -arch flags for universal builds on OSX
5297UNIVERSAL_ARCH_FLAGS=
5298
5299
5300# tweak BASECFLAGS based on compiler and platform
5301case $GCC in
5302yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005303 # Python doesn't violate C99 aliasing rules, but older versions of
5304 # GCC produce warnings for legal Python code. Enable
5305 # -fno-strict-aliasing on versions of GCC that support but produce
5306 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5308$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309 ac_save_cc="$CC"
5310 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005311 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005312 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5313 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005314else
Matthias Kloseb9621712010-04-24 17:59:49 +00005315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005316/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005317
Matthias Kloseb159a552010-04-25 21:00:44 +00005318
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005319int
5320main ()
5321{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005322
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005323 ;
5324 return 0;
5325}
Matthias Kloseb159a552010-04-25 21:00:44 +00005326
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005328if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005329
5330 CC="$ac_save_cc -fstrict-aliasing"
5331 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005333/* end confdefs.h. */
5334
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005335 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005336int
5337main ()
5338{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005339double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005340 ;
5341 return 0;
5342}
Matthias Kloseb159a552010-04-25 21:00:44 +00005343
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005345if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005346
5347 ac_cv_no_strict_aliasing=no
5348
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005349else
Matthias Kloseb159a552010-04-25 21:00:44 +00005350
5351 ac_cv_no_strict_aliasing=yes
5352
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005353fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005355
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005356else
Matthias Kloseb159a552010-04-25 21:00:44 +00005357
5358 ac_cv_no_strict_aliasing=no
5359
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005362fi
5363
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005364 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005365 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5367$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005368 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369 then
5370 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5371 fi
5372
5373 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5374 # support. Without this, treatment of subnormals doesn't follow
5375 # the standard.
5376 case $ac_sys_machine in
5377 alpha*)
5378 BASECFLAGS="$BASECFLAGS -mieee"
5379 ;;
5380 esac
5381
5382 case $ac_sys_system in
5383 SCO_SV*)
5384 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5385 ;;
5386 # is there any other compiler on Darwin besides gcc?
5387 Darwin*)
5388 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5389 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005390 if test "${CC}" = gcc
5391 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5393$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005394 case "${UNIVERSALSDK}" in
5395 */MacOSX10.4u.sdk)
5396 # Build using 10.4 SDK, force usage of gcc when the
5397 # compiler is gcc, otherwise the user will get very
5398 # confusing error messages when building on OSX 10.6
5399 CC=gcc-4.0
5400 CPP=cpp-4.0
5401 ;;
5402 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5404$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005405 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406
5407
5408 if test "${enable_universalsdk}"; then
5409 UNIVERSAL_ARCH_FLAGS=""
5410 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5411 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5412 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005413 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5415 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005416 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005417 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418
5419 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5420 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005421 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005422 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005423
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005424 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5425 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005426 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005427 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005428
5429 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5430 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005431 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005432 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005433
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005434 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005435 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 +00005436
5437 fi
5438
5439
Ronald Oussoren666028b2010-04-18 19:07:43 +00005440 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5441 if test "${UNIVERSALSDK}" != "/"
5442 then
5443 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5444 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005445 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446 fi
5447 fi
5448
5449 # Calculate the right deployment target for this build.
5450 #
5451 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5452 if test ${cur_target} '>' 10.2; then
5453 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005454 if test ${enable_universalsdk}; then
5455 if test "${UNIVERSAL_ARCHS}" = "all"; then
5456 # Ensure that the default platform for a
5457 # 4-way universal build is OSX 10.5,
5458 # that's the first OS release where
5459 # 4-way builds make sense.
5460 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005461
5462 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5463 cur_target='10.5'
5464
5465 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5466 cur_target='10.5'
5467
5468 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5469 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005470 fi
5471 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005472 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005473 # On Intel macs default to a deployment
5474 # target of 10.4, that's the first OSX
5475 # release with Intel support.
5476 cur_target="10.4"
5477 fi
5478 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005479 fi
5480 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5481
5482 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5483 # environment with a value that is the same as what we'll use
5484 # in the Makefile to ensure that we'll get the same compiler
5485 # environment during configure and build time.
5486 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5487 export MACOSX_DEPLOYMENT_TARGET
5488 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5489
5490 ;;
5491 OSF*)
5492 BASECFLAGS="$BASECFLAGS -mieee"
5493 ;;
5494 esac
5495 ;;
5496
5497*)
5498 case $ac_sys_system in
5499 OpenUNIX*|UnixWare*)
5500 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5501 ;;
5502 OSF*)
5503 BASECFLAGS="$BASECFLAGS -ieee -std"
5504 ;;
5505 SCO_SV*)
5506 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5507 ;;
5508 esac
5509 ;;
5510esac
5511
5512if test "$Py_DEBUG" = 'true'; then
5513 :
5514else
5515 OPT="-DNDEBUG $OPT"
5516fi
5517
5518if test "$ac_arch_flags"
5519then
5520 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5521fi
5522
5523# disable check for icc since it seems to pass, but generates a warning
5524if test "$CC" = icc
5525then
5526 ac_cv_opt_olimit_ok=no
5527fi
5528
Matthias Kloseb9621712010-04-24 17:59:49 +00005529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5530$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5531if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5532 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533else
5534 ac_save_cc="$CC"
5535CC="$CC -OPT:Olimit=0"
Matthias Kloseb9621712010-04-24 17:59:49 +00005536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005537/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005538
5539int
5540main ()
5541{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005542
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005543 ;
5544 return 0;
5545}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005547if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005548 ac_cv_opt_olimit_ok=yes
5549else
Matthias Kloseb9621712010-04-24 17:59:49 +00005550 ac_cv_opt_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005551
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554CC="$ac_save_cc"
5555fi
5556
Matthias Kloseb9621712010-04-24 17:59:49 +00005557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5558$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559if test $ac_cv_opt_olimit_ok = yes; then
5560 case $ac_sys_system in
5561 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5562 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5563 # environment?
5564 Darwin*)
5565 ;;
5566 *)
5567 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5568 ;;
5569 esac
5570else
Matthias Kloseb9621712010-04-24 17:59:49 +00005571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5572$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5573 if test "${ac_cv_olimit_ok+set}" = set; then :
5574 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005575else
5576 ac_save_cc="$CC"
5577 CC="$CC -Olimit 1500"
Matthias Kloseb9621712010-04-24 17:59:49 +00005578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005579/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005580
5581int
5582main ()
5583{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005584
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005585 ;
5586 return 0;
5587}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005589if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590 ac_cv_olimit_ok=yes
5591else
Matthias Kloseb9621712010-04-24 17:59:49 +00005592 ac_cv_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005593
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005594fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005596 CC="$ac_save_cc"
5597fi
5598
Matthias Kloseb9621712010-04-24 17:59:49 +00005599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5600$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601 if test $ac_cv_olimit_ok = yes; then
5602 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5603 fi
5604fi
5605
5606# Check whether GCC supports PyArg_ParseTuple format
5607if test "$GCC" = "yes"
5608then
Matthias Kloseb9621712010-04-24 17:59:49 +00005609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5610$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611 save_CFLAGS=$CFLAGS
5612 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614/* end confdefs.h. */
5615
5616 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005617int
5618main ()
5619{
5620
5621 ;
5622 return 0;
5623}
Matthias Kloseb159a552010-04-25 21:00:44 +00005624
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005626if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627
Matthias Kloseb159a552010-04-25 21:00:44 +00005628
Matthias Kloseb9621712010-04-24 17:59:49 +00005629$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630
Matthias Kloseb159a552010-04-25 21:00:44 +00005631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005632$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005633
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005634else
Matthias Kloseb159a552010-04-25 21:00:44 +00005635
5636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005637$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638
5639fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5641 CFLAGS=$save_CFLAGS
5642fi
5643
5644# On some compilers, pthreads are available without further options
5645# (e.g. MacOS X). On some of these systems, the compiler will not
5646# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5647# So we have to see first whether pthreads are available without
5648# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5650$as_echo_n "checking whether pthreads are available without options... " >&6; }
5651if test "${ac_cv_pthread_is_default+set}" = set; then :
5652 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653else
Matthias Kloseb9621712010-04-24 17:59:49 +00005654 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655 ac_cv_pthread_is_default=no
5656else
Matthias Kloseb9621712010-04-24 17:59:49 +00005657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658/* end confdefs.h. */
5659
5660#include <pthread.h>
5661
5662void* routine(void* p){return NULL;}
5663
5664int main(){
5665 pthread_t p;
5666 if(pthread_create(&p,NULL,routine,NULL)!=0)
5667 return 1;
5668 (void)pthread_detach(p);
5669 return 0;
5670}
5671
5672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005673if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674
5675 ac_cv_pthread_is_default=yes
5676 ac_cv_kthread=no
5677 ac_cv_pthread=no
5678
5679else
Matthias Kloseb9621712010-04-24 17:59:49 +00005680 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5683 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684fi
5685
5686
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687fi
5688
Matthias Kloseb9621712010-04-24 17:59:49 +00005689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5690$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691
5692
5693if test $ac_cv_pthread_is_default = yes
5694then
5695 ac_cv_kpthread=no
5696else
5697# -Kpthread, if available, provides the right #defines
5698# and linker options to make pthread_create available
5699# Some compilers won't report that they do not support -Kpthread,
5700# so we need to run a program to see whether it really made the
5701# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5703$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5704if test "${ac_cv_kpthread+set}" = set; then :
5705 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706else
5707 ac_save_cc="$CC"
5708CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005709if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710 ac_cv_kpthread=no
5711else
Matthias Kloseb9621712010-04-24 17:59:49 +00005712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713/* end confdefs.h. */
5714
5715#include <pthread.h>
5716
5717void* routine(void* p){return NULL;}
5718
5719int main(){
5720 pthread_t p;
5721 if(pthread_create(&p,NULL,routine,NULL)!=0)
5722 return 1;
5723 (void)pthread_detach(p);
5724 return 0;
5725}
5726
5727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005728if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729 ac_cv_kpthread=yes
5730else
Matthias Kloseb9621712010-04-24 17:59:49 +00005731 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5734 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735fi
5736
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737CC="$ac_save_cc"
5738fi
5739
Matthias Kloseb9621712010-04-24 17:59:49 +00005740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5741$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742fi
5743
5744if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5745then
5746# -Kthread, if available, provides the right #defines
5747# and linker options to make pthread_create available
5748# Some compilers won't report that they do not support -Kthread,
5749# so we need to run a program to see whether it really made the
5750# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5752$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5753if test "${ac_cv_kthread+set}" = set; then :
5754 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755else
5756 ac_save_cc="$CC"
5757CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005758if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759 ac_cv_kthread=no
5760else
Matthias Kloseb9621712010-04-24 17:59:49 +00005761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762/* end confdefs.h. */
5763
5764#include <pthread.h>
5765
5766void* routine(void* p){return NULL;}
5767
5768int main(){
5769 pthread_t p;
5770 if(pthread_create(&p,NULL,routine,NULL)!=0)
5771 return 1;
5772 (void)pthread_detach(p);
5773 return 0;
5774}
5775
5776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005777if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778 ac_cv_kthread=yes
5779else
Matthias Kloseb9621712010-04-24 17:59:49 +00005780 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5783 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784fi
5785
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786CC="$ac_save_cc"
5787fi
5788
Matthias Kloseb9621712010-04-24 17:59:49 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5790$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791fi
5792
5793if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5794then
5795# -pthread, if available, provides the right #defines
5796# and linker options to make pthread_create available
5797# Some compilers won't report that they do not support -pthread,
5798# so we need to run a program to see whether it really made the
5799# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5801$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5802if test "${ac_cv_thread+set}" = set; then :
5803 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804else
5805 ac_save_cc="$CC"
5806CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005807if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808 ac_cv_pthread=no
5809else
Matthias Kloseb9621712010-04-24 17:59:49 +00005810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811/* end confdefs.h. */
5812
5813#include <pthread.h>
5814
5815void* routine(void* p){return NULL;}
5816
5817int main(){
5818 pthread_t p;
5819 if(pthread_create(&p,NULL,routine,NULL)!=0)
5820 return 1;
5821 (void)pthread_detach(p);
5822 return 0;
5823}
5824
5825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005826if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827 ac_cv_pthread=yes
5828else
Matthias Kloseb9621712010-04-24 17:59:49 +00005829 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5832 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833fi
5834
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835CC="$ac_save_cc"
5836fi
5837
Matthias Kloseb9621712010-04-24 17:59:49 +00005838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5839$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840fi
5841
5842# If we have set a CC compiler flag for thread support then
5843# check if it works for CXX, too.
5844ac_cv_cxx_thread=no
5845if test ! -z "$CXX"
5846then
Matthias Kloseb9621712010-04-24 17:59:49 +00005847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5848$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849ac_save_cxx="$CXX"
5850
5851if test "$ac_cv_kpthread" = "yes"
5852then
5853 CXX="$CXX -Kpthread"
5854 ac_cv_cxx_thread=yes
5855elif test "$ac_cv_kthread" = "yes"
5856then
5857 CXX="$CXX -Kthread"
5858 ac_cv_cxx_thread=yes
5859elif test "$ac_cv_pthread" = "yes"
5860then
5861 CXX="$CXX -pthread"
5862 ac_cv_cxx_thread=yes
5863fi
5864
5865if test $ac_cv_cxx_thread = yes
5866then
5867 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5868 $CXX -c conftest.$ac_ext 2>&5
5869 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5870 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5871 then
5872 ac_cv_cxx_thread=yes
5873 else
5874 ac_cv_cxx_thread=no
5875 fi
5876 rm -fr conftest*
5877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5879$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880fi
5881CXX="$ac_save_cxx"
5882
5883
5884# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5886$as_echo_n "checking for ANSI C header files... " >&6; }
5887if test "${ac_cv_header_stdc+set}" = set; then :
5888 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889else
Matthias Kloseb9621712010-04-24 17:59:49 +00005890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891/* end confdefs.h. */
5892#include <stdlib.h>
5893#include <stdarg.h>
5894#include <string.h>
5895#include <float.h>
5896
5897int
5898main ()
5899{
5900
5901 ;
5902 return 0;
5903}
5904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005905if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 ac_cv_header_stdc=yes
5907else
Matthias Kloseb9621712010-04-24 17:59:49 +00005908 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5911
5912if test $ac_cv_header_stdc = yes; then
5913 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915/* end confdefs.h. */
5916#include <string.h>
5917
5918_ACEOF
5919if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005920 $EGREP "memchr" >/dev/null 2>&1; then :
5921
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922else
5923 ac_cv_header_stdc=no
5924fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005925rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926
5927fi
5928
5929if test $ac_cv_header_stdc = yes; then
5930 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932/* end confdefs.h. */
5933#include <stdlib.h>
5934
5935_ACEOF
5936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005937 $EGREP "free" >/dev/null 2>&1; then :
5938
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939else
5940 ac_cv_header_stdc=no
5941fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005942rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943
5944fi
5945
5946if test $ac_cv_header_stdc = yes; then
5947 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005948 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949 :
5950else
Matthias Kloseb9621712010-04-24 17:59:49 +00005951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952/* end confdefs.h. */
5953#include <ctype.h>
5954#include <stdlib.h>
5955#if ((' ' & 0x0FF) == 0x020)
5956# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5957# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5958#else
5959# define ISLOWER(c) \
5960 (('a' <= (c) && (c) <= 'i') \
5961 || ('j' <= (c) && (c) <= 'r') \
5962 || ('s' <= (c) && (c) <= 'z'))
5963# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5964#endif
5965
5966#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5967int
5968main ()
5969{
5970 int i;
5971 for (i = 0; i < 256; i++)
5972 if (XOR (islower (i), ISLOWER (i))
5973 || toupper (i) != TOUPPER (i))
5974 return 2;
5975 return 0;
5976}
5977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005978if ac_fn_c_try_run "$LINENO"; then :
5979
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980else
Matthias Kloseb9621712010-04-24 17:59:49 +00005981 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005983rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5984 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985fi
5986
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987fi
5988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5990$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991if test $ac_cv_header_stdc = yes; then
5992
Matthias Kloseb9621712010-04-24 17:59:49 +00005993$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994
5995fi
5996
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005997for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5998fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005999ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006000shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006001unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006002sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6003sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006004sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006005sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006006sys/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 +00006007sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006008bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006009do :
6010 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6011ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6012eval as_val=\$$as_ac_Header
6013 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006014 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006015#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006016_ACEOF
6017
6018fi
6019
Guido van Rossum627b2d71993-12-24 10:39:16 +00006020done
6021
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006022ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006023for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006024 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6026$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
6027if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
6028 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006029else
Matthias Kloseb9621712010-04-24 17:59:49 +00006030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006031/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006032#include <sys/types.h>
6033#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006034
Martin v. Löwis11437992002-04-12 09:54:03 +00006035int
6036main ()
6037{
6038if ((DIR *) 0)
6039return 0;
6040 ;
6041 return 0;
6042}
6043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006044if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006045 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006046else
Matthias Kloseb9621712010-04-24 17:59:49 +00006047 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006051eval ac_res=\$$as_ac_Header
6052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6053$as_echo "$ac_res" >&6; }
6054eval as_val=\$$as_ac_Header
6055 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006056 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006057#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006058_ACEOF
6059
6060ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006061fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006062
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006063done
6064# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6065if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6067$as_echo_n "checking for library containing opendir... " >&6; }
6068if test "${ac_cv_search_opendir+set}" = set; then :
6069 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006070else
Martin v. Löwis11437992002-04-12 09:54:03 +00006071 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006073/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006074
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006075/* Override any GCC internal prototype to avoid an error.
6076 Use char because int might match the return type of a GCC
6077 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006078#ifdef __cplusplus
6079extern "C"
6080#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006081char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006082int
6083main ()
6084{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006085return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006086 ;
6087 return 0;
6088}
6089_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006090for ac_lib in '' dir; do
6091 if test -z "$ac_lib"; then
6092 ac_res="none required"
6093 else
6094 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006095 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006096 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006098 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006100rm -f core conftest.err conftest.$ac_objext \
6101 conftest$ac_exeext
6102 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006103 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006105done
Matthias Kloseb9621712010-04-24 17:59:49 +00006106if test "${ac_cv_search_opendir+set}" = set; then :
6107
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006108else
6109 ac_cv_search_opendir=no
6110fi
6111rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006112LIBS=$ac_func_search_save_LIBS
6113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6115$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006116ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006117if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006118 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006119
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006120fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006121
Michael W. Hudson54241132001-12-07 15:38:26 +00006122else
Matthias Kloseb9621712010-04-24 17:59:49 +00006123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6124$as_echo_n "checking for library containing opendir... " >&6; }
6125if test "${ac_cv_search_opendir+set}" = set; then :
6126 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006127else
6128 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006131
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006132/* Override any GCC internal prototype to avoid an error.
6133 Use char because int might match the return type of a GCC
6134 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006135#ifdef __cplusplus
6136extern "C"
6137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006138char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006139int
6140main ()
6141{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006142return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006143 ;
6144 return 0;
6145}
6146_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006147for ac_lib in '' x; do
6148 if test -z "$ac_lib"; then
6149 ac_res="none required"
6150 else
6151 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006152 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006153 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006154 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006155 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006156fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006157rm -f core conftest.err conftest.$ac_objext \
6158 conftest$ac_exeext
6159 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006160 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006162done
Matthias Kloseb9621712010-04-24 17:59:49 +00006163if test "${ac_cv_search_opendir+set}" = set; then :
6164
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006165else
6166 ac_cv_search_opendir=no
6167fi
6168rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006169LIBS=$ac_func_search_save_LIBS
6170fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6172$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006173ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006174if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006175 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006177fi
6178
6179fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006180
Matthias Kloseb9621712010-04-24 17:59:49 +00006181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6182$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6183if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6184 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006185else
Matthias Kloseb9621712010-04-24 17:59:49 +00006186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006187/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006189int
6190main ()
6191{
6192return makedev(0, 0);
6193 ;
6194 return 0;
6195}
6196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006197if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198 ac_cv_header_sys_types_h_makedev=yes
6199else
Matthias Kloseb9621712010-04-24 17:59:49 +00006200 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006202rm -f core conftest.err conftest.$ac_objext \
6203 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204
6205fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6207$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006208
6209if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006210ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6211if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006212
Matthias Kloseb9621712010-04-24 17:59:49 +00006213$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214
6215fi
6216
6217
6218
6219 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006220 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6221if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006222
Matthias Kloseb9621712010-04-24 17:59:49 +00006223$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006224
6225fi
6226
6227
6228 fi
6229fi
6230
Michael W. Hudson54241132001-12-07 15:38:26 +00006231
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006232# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006233for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006234do :
6235 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006236#ifdef HAVE_CURSES_H
6237#include <curses.h>
6238#endif
6239
Matthias Kloseb9621712010-04-24 17:59:49 +00006240"
6241if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006242 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006243#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006244_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006245
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006246fi
6247
6248done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006249
6250
Martin v. Löwis11017b12006-01-14 18:12:57 +00006251# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006252for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006253do :
6254 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 +00006255#ifdef HAVE_ASM_TYPES_H
6256#include <asm/types.h>
6257#endif
6258#ifdef HAVE_SYS_SOCKET_H
6259#include <sys/socket.h>
6260#endif
6261
Matthias Kloseb9621712010-04-24 17:59:49 +00006262"
6263if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006264 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006265#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006266_ACEOF
6267
6268fi
6269
6270done
6271
6272
Guido van Rossum627b2d71993-12-24 10:39:16 +00006273# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006274was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6276$as_echo_n "checking for clock_t in time.h... " >&6; }
6277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006278/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006279#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006280
6281_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006283 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006284 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006285else
Martin v. Löwis11437992002-04-12 09:54:03 +00006286
6287
Matthias Kloseb9621712010-04-24 17:59:49 +00006288$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006289
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006290
Guido van Rossum627b2d71993-12-24 10:39:16 +00006291fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006292rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006293
Matthias Kloseb9621712010-04-24 17:59:49 +00006294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6295$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006296
Neal Norwitz11690112002-07-30 01:08:28 +00006297# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6299$as_echo_n "checking for makedev... " >&6; }
6300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006301/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006302
Jesus Cea740f53a2010-04-28 11:35:30 +00006303#if defined(MAJOR_IN_MKDEV)
6304#include <sys/mkdev.h>
6305#elif defined(MAJOR_IN_SYSMACROS)
6306#include <sys/sysmacros.h>
6307#else
6308#include <sys/types.h>
6309#endif
6310
Neal Norwitz11690112002-07-30 01:08:28 +00006311int
6312main ()
6313{
Jesus Cea740f53a2010-04-28 11:35:30 +00006314
6315 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006316 ;
6317 return 0;
6318}
Matthias Kloseb159a552010-04-25 21:00:44 +00006319
Neal Norwitz11690112002-07-30 01:08:28 +00006320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006321if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006322 ac_cv_has_makedev=yes
6323else
Matthias Kloseb9621712010-04-24 17:59:49 +00006324 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006326rm -f core conftest.err conftest.$ac_objext \
6327 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006328if test "$ac_cv_has_makedev" = "no"; then
6329 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006331/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006332
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006333#define _OSF_SOURCE 1
6334#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006335
Neal Norwitz11690112002-07-30 01:08:28 +00006336int
6337main ()
6338{
6339 makedev(0, 0)
6340 ;
6341 return 0;
6342}
6343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006344if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006345 ac_cv_has_makedev=yes
6346else
Matthias Kloseb9621712010-04-24 17:59:49 +00006347 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006349rm -f core conftest.err conftest.$ac_objext \
6350 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006351 if test "$ac_cv_has_makedev" = "yes"; then
6352
Matthias Kloseb9621712010-04-24 17:59:49 +00006353$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006354
6355 fi
6356fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6358$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006359if test "$ac_cv_has_makedev" = "yes"; then
6360
Matthias Kloseb9621712010-04-24 17:59:49 +00006361$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006362
6363fi
6364
Martin v. Löwis399a6892002-10-04 10:22:02 +00006365# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6366# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6367# defined, but the compiler does not support pragma redefine_extname,
6368# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6369# structures (such as rlimit64) without declaring them. As a
6370# work-around, disable LFS on such configurations
6371
6372use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6374$as_echo_n "checking Solaris LFS bug... " >&6; }
6375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006376/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006377
6378#define _LARGEFILE_SOURCE 1
6379#define _FILE_OFFSET_BITS 64
6380#include <sys/resource.h>
6381
Martin v. Löwis399a6892002-10-04 10:22:02 +00006382int
6383main ()
6384{
6385struct rlimit foo;
6386 ;
6387 return 0;
6388}
6389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006390if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006391 sol_lfs_bug=no
6392else
Matthias Kloseb9621712010-04-24 17:59:49 +00006393 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6397$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006398if test "$sol_lfs_bug" = "yes"; then
6399 use_lfs=no
6400fi
6401
6402if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006403# Two defines needed to enable largefile support on various platforms
6404# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006405
Matthias Kloseb9621712010-04-24 17:59:49 +00006406$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006407
6408
Matthias Kloseb9621712010-04-24 17:59:49 +00006409$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006410
Martin v. Löwis399a6892002-10-04 10:22:02 +00006411fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006412
Guido van Rossum84e7b241996-08-19 21:59:00 +00006413# Add some code to confdefs.h so that the test for off_t works on SCO
6414cat >> confdefs.h <<\EOF
6415#if defined(SCO_DS)
6416#undef _OFF_T
6417#endif
6418EOF
6419
Guido van Rossumef2255b2000-03-10 22:30:29 +00006420# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006421ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6422if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006423
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006424else
Martin v. Löwis11437992002-04-12 09:54:03 +00006425
6426cat >>confdefs.h <<_ACEOF
6427#define mode_t int
6428_ACEOF
6429
6430fi
6431
Matthias Kloseb9621712010-04-24 17:59:49 +00006432ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6433if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006434
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006435else
Martin v. Löwis11437992002-04-12 09:54:03 +00006436
6437cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006438#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006439_ACEOF
6440
6441fi
6442
Matthias Kloseb9621712010-04-24 17:59:49 +00006443ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6444if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006445
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006446else
Martin v. Löwis11437992002-04-12 09:54:03 +00006447
6448cat >>confdefs.h <<_ACEOF
6449#define pid_t int
6450_ACEOF
6451
6452fi
6453
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006454
Martin v. Löwis11437992002-04-12 09:54:03 +00006455cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006456#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006457_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006458
Matthias Kloseb9621712010-04-24 17:59:49 +00006459ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6460if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006461
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006462else
Martin v. Löwis11437992002-04-12 09:54:03 +00006463
6464cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006465#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006466_ACEOF
6467
6468fi
6469
Matthias Kloseb9621712010-04-24 17:59:49 +00006470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6471$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6472if test "${ac_cv_type_uid_t+set}" = set; then :
6473 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006474else
Matthias Kloseb9621712010-04-24 17:59:49 +00006475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006476/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006477#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006478
6479_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006480if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006481 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006482 ac_cv_type_uid_t=yes
6483else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006484 ac_cv_type_uid_t=no
6485fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006486rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006487
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6490$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006491if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006492
Matthias Kloseb9621712010-04-24 17:59:49 +00006493$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006494
6495
Matthias Kloseb9621712010-04-24 17:59:49 +00006496$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006497
6498fi
6499
Matthias Kloseb9621712010-04-24 17:59:49 +00006500ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6501case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006502 no|yes) ;; #(
6503 *)
6504
Matthias Kloseb9621712010-04-24 17:59:49 +00006505$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006506
6507
6508cat >>confdefs.h <<_ACEOF
6509#define uint32_t $ac_cv_c_uint32_t
6510_ACEOF
6511;;
6512 esac
6513
Matthias Kloseb9621712010-04-24 17:59:49 +00006514ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6515case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006516 no|yes) ;; #(
6517 *)
6518
Matthias Kloseb9621712010-04-24 17:59:49 +00006519$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006520
6521
6522cat >>confdefs.h <<_ACEOF
6523#define uint64_t $ac_cv_c_uint64_t
6524_ACEOF
6525;;
6526 esac
6527
Matthias Kloseb9621712010-04-24 17:59:49 +00006528ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6529case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006530 no|yes) ;; #(
6531 *)
6532
6533cat >>confdefs.h <<_ACEOF
6534#define int32_t $ac_cv_c_int32_t
6535_ACEOF
6536;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006537esac
6538
Matthias Kloseb9621712010-04-24 17:59:49 +00006539ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6540case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006541 no|yes) ;; #(
6542 *)
6543
6544cat >>confdefs.h <<_ACEOF
6545#define int64_t $ac_cv_c_int64_t
6546_ACEOF
6547;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006548esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006549
Matthias Kloseb9621712010-04-24 17:59:49 +00006550ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6551if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006552
Matthias Kloseb9621712010-04-24 17:59:49 +00006553$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006554
6555fi
6556
Jack Jansendd19cf82001-12-06 22:36:17 +00006557
Michael W. Hudson54241132001-12-07 15:38:26 +00006558# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006559# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006560# The cast to long int works around a bug in the HP C Compiler
6561# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6562# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6563# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6565$as_echo_n "checking size of int... " >&6; }
6566if test "${ac_cv_sizeof_int+set}" = set; then :
6567 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006568else
Matthias Kloseb9621712010-04-24 17:59:49 +00006569 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 +00006570
Martin v. Löwis11437992002-04-12 09:54:03 +00006571else
Matthias Kloseb9621712010-04-24 17:59:49 +00006572 if test "$ac_cv_type_int" = yes; then
6573 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6574$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6575{ as_fn_set_status 77
6576as_fn_error "cannot compute sizeof (int)
6577See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006578 else
6579 ac_cv_sizeof_int=0
6580 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006582
Martin v. Löwis11437992002-04-12 09:54:03 +00006583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6585$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006586
6587
6588
Martin v. Löwis11437992002-04-12 09:54:03 +00006589cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006590#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006591_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006592
6593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006594# The cast to long int works around a bug in the HP C Compiler
6595# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6596# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6597# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6599$as_echo_n "checking size of long... " >&6; }
6600if test "${ac_cv_sizeof_long+set}" = set; then :
6601 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006602else
Matthias Kloseb9621712010-04-24 17:59:49 +00006603 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 +00006604
Martin v. Löwis11437992002-04-12 09:54:03 +00006605else
Matthias Kloseb9621712010-04-24 17:59:49 +00006606 if test "$ac_cv_type_long" = yes; then
6607 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6608$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6609{ as_fn_set_status 77
6610as_fn_error "cannot compute sizeof (long)
6611See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006612 else
6613 ac_cv_sizeof_long=0
6614 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006616
Martin v. Löwis11437992002-04-12 09:54:03 +00006617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6619$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006620
6621
6622
Martin v. Löwis11437992002-04-12 09:54:03 +00006623cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006624#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006625_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006626
6627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006628# The cast to long int works around a bug in the HP C Compiler
6629# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6630# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6631# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6633$as_echo_n "checking size of void *... " >&6; }
6634if test "${ac_cv_sizeof_void_p+set}" = set; then :
6635 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006636else
Matthias Kloseb9621712010-04-24 17:59:49 +00006637 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 +00006638
Martin v. Löwis11437992002-04-12 09:54:03 +00006639else
Matthias Kloseb9621712010-04-24 17:59:49 +00006640 if test "$ac_cv_type_void_p" = yes; then
6641 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6642$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6643{ as_fn_set_status 77
6644as_fn_error "cannot compute sizeof (void *)
6645See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006646 else
6647 ac_cv_sizeof_void_p=0
6648 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006650
Martin v. Löwis11437992002-04-12 09:54:03 +00006651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6653$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006654
6655
6656
Martin v. Löwis11437992002-04-12 09:54:03 +00006657cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006658#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006659_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006660
6661
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006662# The cast to long int works around a bug in the HP C Compiler
6663# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6664# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6665# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6667$as_echo_n "checking size of short... " >&6; }
6668if test "${ac_cv_sizeof_short+set}" = set; then :
6669 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006670else
Matthias Kloseb9621712010-04-24 17:59:49 +00006671 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 +00006672
Martin v. Löwis11437992002-04-12 09:54:03 +00006673else
Matthias Kloseb9621712010-04-24 17:59:49 +00006674 if test "$ac_cv_type_short" = yes; then
6675 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6677{ as_fn_set_status 77
6678as_fn_error "cannot compute sizeof (short)
6679See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006680 else
6681 ac_cv_sizeof_short=0
6682 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006684
Martin v. Löwis11437992002-04-12 09:54:03 +00006685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6687$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006688
6689
6690
Martin v. Löwis11437992002-04-12 09:54:03 +00006691cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006692#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006693_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006694
6695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006696# The cast to long int works around a bug in the HP C Compiler
6697# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6698# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6699# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6701$as_echo_n "checking size of float... " >&6; }
6702if test "${ac_cv_sizeof_float+set}" = set; then :
6703 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006704else
Matthias Kloseb9621712010-04-24 17:59:49 +00006705 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 +00006706
Martin v. Löwis11437992002-04-12 09:54:03 +00006707else
Matthias Kloseb9621712010-04-24 17:59:49 +00006708 if test "$ac_cv_type_float" = yes; then
6709 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6710$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6711{ as_fn_set_status 77
6712as_fn_error "cannot compute sizeof (float)
6713See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006714 else
6715 ac_cv_sizeof_float=0
6716 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006718
Martin v. Löwis11437992002-04-12 09:54:03 +00006719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6721$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006722
6723
6724
Martin v. Löwis11437992002-04-12 09:54:03 +00006725cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006726#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006727_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006728
6729
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006730# The cast to long int works around a bug in the HP C Compiler
6731# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6732# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6733# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6735$as_echo_n "checking size of double... " >&6; }
6736if test "${ac_cv_sizeof_double+set}" = set; then :
6737 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006738else
Matthias Kloseb9621712010-04-24 17:59:49 +00006739 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006740
Martin v. Löwis11437992002-04-12 09:54:03 +00006741else
Matthias Kloseb9621712010-04-24 17:59:49 +00006742 if test "$ac_cv_type_double" = yes; then
6743 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6745{ as_fn_set_status 77
6746as_fn_error "cannot compute sizeof (double)
6747See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006748 else
6749 ac_cv_sizeof_double=0
6750 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006752
Martin v. Löwis11437992002-04-12 09:54:03 +00006753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6755$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006756
6757
6758
Martin v. Löwis11437992002-04-12 09:54:03 +00006759cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006760#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006761_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006762
6763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006764# The cast to long int works around a bug in the HP C Compiler
6765# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6766# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6767# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6769$as_echo_n "checking size of fpos_t... " >&6; }
6770if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6771 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006772else
Matthias Kloseb9621712010-04-24 17:59:49 +00006773 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 +00006774
Martin v. Löwis11437992002-04-12 09:54:03 +00006775else
Matthias Kloseb9621712010-04-24 17:59:49 +00006776 if test "$ac_cv_type_fpos_t" = yes; then
6777 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6778$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6779{ as_fn_set_status 77
6780as_fn_error "cannot compute sizeof (fpos_t)
6781See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006782 else
6783 ac_cv_sizeof_fpos_t=0
6784 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006786
Martin v. Löwis11437992002-04-12 09:54:03 +00006787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6789$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006790
6791
6792
Martin v. Löwis11437992002-04-12 09:54:03 +00006793cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006794#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006795_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006796
Michael W. Hudson54241132001-12-07 15:38:26 +00006797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006798# The cast to long int works around a bug in the HP C Compiler
6799# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6800# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6801# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6803$as_echo_n "checking size of size_t... " >&6; }
6804if test "${ac_cv_sizeof_size_t+set}" = set; then :
6805 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006806else
Matthias Kloseb9621712010-04-24 17:59:49 +00006807 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 +00006808
Martin v. Löwis18e16552006-02-15 17:27:45 +00006809else
Matthias Kloseb9621712010-04-24 17:59:49 +00006810 if test "$ac_cv_type_size_t" = yes; then
6811 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6813{ as_fn_set_status 77
6814as_fn_error "cannot compute sizeof (size_t)
6815See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006816 else
6817 ac_cv_sizeof_size_t=0
6818 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006820
Martin v. Löwis18e16552006-02-15 17:27:45 +00006821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6823$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006824
6825
6826
Martin v. Löwis18e16552006-02-15 17:27:45 +00006827cat >>confdefs.h <<_ACEOF
6828#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6829_ACEOF
6830
6831
Christian Heimes400adb02008-02-01 08:12:03 +00006832# The cast to long int works around a bug in the HP C Compiler
6833# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6834# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6835# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6837$as_echo_n "checking size of pid_t... " >&6; }
6838if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6839 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006840else
Matthias Kloseb9621712010-04-24 17:59:49 +00006841 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 +00006842
Christian Heimes400adb02008-02-01 08:12:03 +00006843else
Matthias Kloseb9621712010-04-24 17:59:49 +00006844 if test "$ac_cv_type_pid_t" = yes; then
6845 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6846$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6847{ as_fn_set_status 77
6848as_fn_error "cannot compute sizeof (pid_t)
6849See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006850 else
6851 ac_cv_sizeof_pid_t=0
6852 fi
6853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006854
Christian Heimes400adb02008-02-01 08:12:03 +00006855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6857$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006858
6859
6860
6861cat >>confdefs.h <<_ACEOF
6862#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6863_ACEOF
6864
6865
Michael W. Hudson54241132001-12-07 15:38:26 +00006866
Matthias Kloseb9621712010-04-24 17:59:49 +00006867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6868$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006869have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006871/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006872
Martin v. Löwis11437992002-04-12 09:54:03 +00006873int
6874main ()
6875{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006876long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006877 ;
6878 return 0;
6879}
6880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006881if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006882
6883
Matthias Kloseb9621712010-04-24 17:59:49 +00006884$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006885
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006886 have_long_long=yes
6887
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6891$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006892if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006893# The cast to long int works around a bug in the HP C Compiler
6894# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6895# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6896# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6898$as_echo_n "checking size of long long... " >&6; }
6899if test "${ac_cv_sizeof_long_long+set}" = set; then :
6900 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006901else
Matthias Kloseb9621712010-04-24 17:59:49 +00006902 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 +00006903
Martin v. Löwis11437992002-04-12 09:54:03 +00006904else
Matthias Kloseb9621712010-04-24 17:59:49 +00006905 if test "$ac_cv_type_long_long" = yes; then
6906 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6907$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6908{ as_fn_set_status 77
6909as_fn_error "cannot compute sizeof (long long)
6910See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006911 else
6912 ac_cv_sizeof_long_long=0
6913 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006915
Martin v. Löwis11437992002-04-12 09:54:03 +00006916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6918$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006919
6920
6921
Martin v. Löwis11437992002-04-12 09:54:03 +00006922cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006923#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006924_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006925
Michael W. Hudson54241132001-12-07 15:38:26 +00006926
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006927fi
6928
Matthias Kloseb9621712010-04-24 17:59:49 +00006929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6930$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006931have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006933/* end confdefs.h. */
6934
6935int
6936main ()
6937{
6938long double x; x = (long double)0;
6939 ;
6940 return 0;
6941}
6942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006943if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006944
6945
Matthias Kloseb9621712010-04-24 17:59:49 +00006946$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006947
6948 have_long_double=yes
6949
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006950fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6953$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006954if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006955# The cast to long int works around a bug in the HP C Compiler
6956# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6957# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6958# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6960$as_echo_n "checking size of long double... " >&6; }
6961if test "${ac_cv_sizeof_long_double+set}" = set; then :
6962 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006963else
Matthias Kloseb9621712010-04-24 17:59:49 +00006964 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 +00006965
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006966else
Matthias Kloseb9621712010-04-24 17:59:49 +00006967 if test "$ac_cv_type_long_double" = yes; then
6968 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6969$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6970{ as_fn_set_status 77
6971as_fn_error "cannot compute sizeof (long double)
6972See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006973 else
6974 ac_cv_sizeof_long_double=0
6975 fi
6976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006977
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6980$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006981
6982
6983
6984cat >>confdefs.h <<_ACEOF
6985#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6986_ACEOF
6987
6988
6989fi
6990
6991
Matthias Kloseb9621712010-04-24 17:59:49 +00006992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6993$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006994have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006996/* end confdefs.h. */
6997
6998int
6999main ()
7000{
7001_Bool x; x = (_Bool)0;
7002 ;
7003 return 0;
7004}
7005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007006if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007007
7008
Matthias Kloseb9621712010-04-24 17:59:49 +00007009$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007010
7011 have_c99_bool=yes
7012
Thomas Woutersb2137042007-02-01 18:02:27 +00007013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7016$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007017if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007018# The cast to long int works around a bug in the HP C Compiler
7019# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7020# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7021# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7023$as_echo_n "checking size of _Bool... " >&6; }
7024if test "${ac_cv_sizeof__Bool+set}" = set; then :
7025 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007026else
Matthias Kloseb9621712010-04-24 17:59:49 +00007027 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 +00007028
Thomas Woutersb2137042007-02-01 18:02:27 +00007029else
Matthias Kloseb9621712010-04-24 17:59:49 +00007030 if test "$ac_cv_type__Bool" = yes; then
7031 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7032$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7033{ as_fn_set_status 77
7034as_fn_error "cannot compute sizeof (_Bool)
7035See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007036 else
7037 ac_cv_sizeof__Bool=0
7038 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007040
Thomas Woutersb2137042007-02-01 18:02:27 +00007041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7043$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007044
7045
7046
Thomas Woutersb2137042007-02-01 18:02:27 +00007047cat >>confdefs.h <<_ACEOF
7048#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7049_ACEOF
7050
7051
7052fi
7053
Matthias Kloseb9621712010-04-24 17:59:49 +00007054ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007055 #include <stdint.h>
7056 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007057"
7058if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007059
7060cat >>confdefs.h <<_ACEOF
7061#define HAVE_UINTPTR_T 1
7062_ACEOF
7063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007064# The cast to long int works around a bug in the HP C Compiler
7065# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7066# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7067# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7069$as_echo_n "checking size of uintptr_t... " >&6; }
7070if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7071 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007072else
Matthias Kloseb9621712010-04-24 17:59:49 +00007073 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 +00007074
Martin v. Löwis11437992002-04-12 09:54:03 +00007075else
Matthias Kloseb9621712010-04-24 17:59:49 +00007076 if test "$ac_cv_type_uintptr_t" = yes; then
7077 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7078$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7079{ as_fn_set_status 77
7080as_fn_error "cannot compute sizeof (uintptr_t)
7081See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007082 else
7083 ac_cv_sizeof_uintptr_t=0
7084 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007085fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007086
Martin v. Löwis11437992002-04-12 09:54:03 +00007087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7089$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007090
7091
7092
Martin v. Löwis11437992002-04-12 09:54:03 +00007093cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007094#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007095_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007096
Michael W. Hudson54241132001-12-07 15:38:26 +00007097
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007098fi
7099
Thomas Wouters89f507f2006-12-13 04:49:30 +00007100
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007101# The cast to long int works around a bug in the HP C Compiler
7102# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7103# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7104# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7106$as_echo_n "checking size of off_t... " >&6; }
7107if test "${ac_cv_sizeof_off_t+set}" = set; then :
7108 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007109else
Matthias Kloseb9621712010-04-24 17:59:49 +00007110 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007111#ifdef HAVE_SYS_TYPES_H
7112#include <sys/types.h>
7113#endif
7114
Matthias Kloseb9621712010-04-24 17:59:49 +00007115"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007116
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007117else
Matthias Kloseb9621712010-04-24 17:59:49 +00007118 if test "$ac_cv_type_off_t" = yes; then
7119 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7120$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7121{ as_fn_set_status 77
7122as_fn_error "cannot compute sizeof (off_t)
7123See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007124 else
7125 ac_cv_sizeof_off_t=0
7126 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007128
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7131$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007132
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007133
7134
Martin v. Löwis11437992002-04-12 09:54:03 +00007135cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007136#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007137_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007138
Michael W. Hudson54241132001-12-07 15:38:26 +00007139
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007140
Matthias Kloseb9621712010-04-24 17:59:49 +00007141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7142$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007143if test "$have_long_long" = yes
7144then
7145if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007146 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007147
Matthias Kloseb9621712010-04-24 17:59:49 +00007148$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007149
Matthias Kloseb9621712010-04-24 17:59:49 +00007150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7151$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007152else
Matthias Kloseb9621712010-04-24 17:59:49 +00007153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7154$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007155fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007156else
Matthias Kloseb9621712010-04-24 17:59:49 +00007157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7158$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007159fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007160
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007161# The cast to long int works around a bug in the HP C Compiler
7162# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7163# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7164# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7166$as_echo_n "checking size of time_t... " >&6; }
7167if test "${ac_cv_sizeof_time_t+set}" = set; then :
7168 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007169else
Matthias Kloseb9621712010-04-24 17:59:49 +00007170 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007171#ifdef HAVE_SYS_TYPES_H
7172#include <sys/types.h>
7173#endif
7174#ifdef HAVE_TIME_H
7175#include <time.h>
7176#endif
7177
Matthias Kloseb9621712010-04-24 17:59:49 +00007178"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007179
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007180else
Matthias Kloseb9621712010-04-24 17:59:49 +00007181 if test "$ac_cv_type_time_t" = yes; then
7182 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7183$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7184{ as_fn_set_status 77
7185as_fn_error "cannot compute sizeof (time_t)
7186See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007187 else
7188 ac_cv_sizeof_time_t=0
7189 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007190fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007191
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7194$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007195
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007196
7197
Martin v. Löwis11437992002-04-12 09:54:03 +00007198cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007199#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007200_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007201
Michael W. Hudson54241132001-12-07 15:38:26 +00007202
7203
Trent Mick635f6fb2000-08-23 21:33:05 +00007204# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007205ac_save_cc="$CC"
7206if test "$ac_cv_kpthread" = "yes"
7207then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007208elif test "$ac_cv_kthread" = "yes"
7209then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007210elif test "$ac_cv_pthread" = "yes"
7211then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007212fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007213
Matthias Kloseb9621712010-04-24 17:59:49 +00007214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7215$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007216have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007218/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007219
7220 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007221int
7222main ()
7223{
Guido van Rossum12580492000-09-24 16:47:19 +00007224pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007225 ;
7226 return 0;
7227}
Matthias Kloseb159a552010-04-25 21:00:44 +00007228
Martin v. Löwis11437992002-04-12 09:54:03 +00007229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007230if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007231 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7235$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007236if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007237 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007238# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7239# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7240# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7242$as_echo_n "checking size of pthread_t... " >&6; }
7243if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7244 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007245else
Matthias Kloseb9621712010-04-24 17:59:49 +00007246 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007247#ifdef HAVE_PTHREAD_H
7248#include <pthread.h>
7249#endif
7250
Matthias Kloseb9621712010-04-24 17:59:49 +00007251"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007252
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007253else
Matthias Kloseb9621712010-04-24 17:59:49 +00007254 if test "$ac_cv_type_pthread_t" = yes; then
7255 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7256$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7257{ as_fn_set_status 77
7258as_fn_error "cannot compute sizeof (pthread_t)
7259See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007260 else
7261 ac_cv_sizeof_pthread_t=0
7262 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007264
Trent Mick635f6fb2000-08-23 21:33:05 +00007265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7267$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007268
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007269
7270
Martin v. Löwis11437992002-04-12 09:54:03 +00007271cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007272#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007273_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007274
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007275
Trent Mick635f6fb2000-08-23 21:33:05 +00007276fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007277CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007278
Michael W. Hudson54241132001-12-07 15:38:26 +00007279
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007280case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007281 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007282 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7283 ;;
7284 Darwin/*)
7285 OTHER_LIBTOOL_OPT=""
7286 ;;
7287esac
7288
7289
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007290ARCH_RUN_32BIT=""
7291
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007292case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007293 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007294 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7295 if test "${enable_universalsdk}"; then
7296 :
7297 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007298 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007299 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007300 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007301 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007302 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007303 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007304 if test ${gcc_version} '<' 4.0
7305 then
7306 LIBTOOL_CRUFT="-lcc_dynamic"
7307 else
7308 LIBTOOL_CRUFT=""
7309 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007310 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007311 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007312else
Matthias Kloseb9621712010-04-24 17:59:49 +00007313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007314/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007315
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007316 #include <unistd.h>
7317 int main(int argc, char*argv[])
7318 {
7319 if (sizeof(long) == 4) {
7320 return 0;
7321 } else {
7322 return 1;
7323 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007324 }
7325
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007327if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007328 ac_osx_32bit=yes
7329else
Matthias Kloseb9621712010-04-24 17:59:49 +00007330 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007332rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7333 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007334fi
7335
7336
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007337 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007338 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007339 i386)
7340 MACOSX_DEFAULT_ARCH="i386"
7341 ;;
7342 ppc)
7343 MACOSX_DEFAULT_ARCH="ppc"
7344 ;;
7345 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007346 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007347 ;;
7348 esac
7349 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007350 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007351 i386)
7352 MACOSX_DEFAULT_ARCH="x86_64"
7353 ;;
7354 ppc)
7355 MACOSX_DEFAULT_ARCH="ppc64"
7356 ;;
7357 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007358 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007359 ;;
7360 esac
7361
7362 #ARCH_RUN_32BIT="true"
7363 fi
7364
7365 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007366 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007367 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007368esac
7369
Matthias Kloseb9621712010-04-24 17:59:49 +00007370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7371$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007372if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007373then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007374 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007375 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007376 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007377
Matthias Kloseb9621712010-04-24 17:59:49 +00007378$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007379
Matthias Kloseb9621712010-04-24 17:59:49 +00007380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7381$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007382 if test $enable_shared = "yes"
7383 then
Matthias Kloseb9621712010-04-24 17:59:49 +00007384 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 +00007385 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007386else
Matthias Kloseb9621712010-04-24 17:59:49 +00007387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7388$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007389fi
7390
Matthias Kloseb9621712010-04-24 17:59:49 +00007391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7392$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007393case $ac_sys_system/$ac_sys_release in
7394 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007395
Matthias Kloseb9621712010-04-24 17:59:49 +00007396$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007397
Matthias Kloseb9621712010-04-24 17:59:49 +00007398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7399$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007400 ;;
7401 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7403$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007404 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007405esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007406
Guido van Rossum0a516c91994-09-12 10:58:40 +00007407# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007408
Michael W. Hudson54241132001-12-07 15:38:26 +00007409
7410
7411
7412
Benjamin Peterson99f03762010-04-11 22:15:28 +00007413
Guido van Rossum0a516c91994-09-12 10:58:40 +00007414# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007415# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Kloseb9621712010-04-24 17:59:49 +00007416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7417$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007418if test -z "$SO"
7419then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007420 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +00007421 hp*|HP*)
7422 case `uname -m` in
7423 ia64) SO=.so;;
7424 *) SO=.sl;;
7425 esac
7426 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007427 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007428 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007429 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007430else
7431 # this might also be a termcap variable, see #610332
7432 echo
7433 echo '====================================================================='
7434 echo '+ +'
7435 echo '+ WARNING: You have set SO in your environment. +'
7436 echo '+ Do you really mean to change the extension for shared libraries? +'
7437 echo '+ Continuing in 10 seconds to let you to ponder. +'
7438 echo '+ +'
7439 echo '====================================================================='
7440 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7443$as_echo "$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00007444
Georg Brandlb1441c72009-01-03 22:33:39 +00007445
Thomas Wouters477c8d52006-05-27 19:21:47 +00007446cat >>confdefs.h <<_ACEOF
7447#define SHLIB_EXT "$SO"
7448_ACEOF
7449
Guido van Rossum0a516c91994-09-12 10:58:40 +00007450# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007451# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007452# (Shared libraries in this instance are shared modules to be loaded into
7453# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7455$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007456if test -z "$LDSHARED"
7457then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007458 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007459 AIX*)
7460 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007461 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007462 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007463 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007464 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007465 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007466 if test "$GCC" = "yes" ; then
7467 LDSHARED='$(CC) -shared'
7468 LDCXXSHARED='$(CXX) -shared'
7469 else
7470 LDSHARED='$(CC) -G'
7471 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007472 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007473 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007474 if test "$GCC" = "yes" ; then
7475 LDSHARED='$(CC) -shared'
7476 LDCXXSHARED='$(CXX) -shared'
7477 else
7478 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007479 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007480 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007481 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00007482 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007483 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007484 if test "$enable_framework" ; then
7485 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007486 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7487 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007488 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007489 else
7490 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007491 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007492 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007493 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007494 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00007495 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007496 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007497 if test "$enable_framework" ; then
7498 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007499 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7500 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007501 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007502 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007503 # No framework, use the Python app as bundle-loader
7504 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007505 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007506 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007507 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007508 Darwin/*)
7509 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7510 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007511
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007512 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007513 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007514 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007515 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007516 fi
Jack Jansen6b08a402004-06-03 12:41:45 +00007517 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007518 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007519 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007520 else
7521 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007522 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007523 if test "$enable_framework" ; then
7524 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007525 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7526 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007527 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007528 else
7529 # No framework, use the Python app as bundle-loader
7530 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7531 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007532 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007533 fi
7534 fi
7535 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007536 Linux*|GNU*|QNX*)
7537 LDSHARED='$(CC) -shared'
7538 LDCXXSHARED='$(CXX) -shared';;
7539 BSD/OS*/4*)
7540 LDSHARED="gcc -shared"
7541 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007542 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007543 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007544 then
Benjamin Petersonab0a7522010-03-14 15:18:25 +00007545 LDSHARED='$(CC) -shared ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007546 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007547 else
7548 LDSHARED="ld -Bshareable ${LDFLAGS}"
7549 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007550 OpenBSD*)
7551 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7552 then
7553 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007554 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007555 else
7556 case `uname -r` in
7557 [01].* | 2.[0-7] | 2.[0-7].*)
7558 LDSHARED="ld -Bshareable ${LDFLAGS}"
7559 ;;
7560 *)
7561 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007562 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007563 ;;
7564 esac
7565 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007566 NetBSD*|DragonFly*)
7567 LDSHARED="cc -shared ${LDFLAGS}"
7568 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007569 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007570 if test "$GCC" = "yes" ; then
7571 LDSHARED='$(CC) -shared'
7572 LDCXXSHARED='$(CXX) -shared'
7573 else
7574 LDSHARED='$(CC) -G'
7575 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007576 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007577 SCO_SV*)
7578 LDSHARED='$(CC) -Wl,-G,-Bexport'
7579 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7580 CYGWIN*)
7581 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7582 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007583 *) LDSHARED="ld";;
7584 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7587$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007588LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007589BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007590# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007591# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7593$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007594if test -z "$CCSHARED"
7595then
Guido van Rossum07397971997-04-29 21:49:50 +00007596 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007597 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007598 then CCSHARED="-fPIC";
7599 elif test `uname -p` = sparc;
7600 then CCSHARED="-xcode=pic32";
7601 else CCSHARED="-Kpic";
7602 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007603 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007604 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007605 else CCSHARED="+z";
7606 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007607 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007608 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007609 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007610 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007611 if test "$GCC" = "yes"
7612 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007613 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007614 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007615 SCO_SV*)
7616 if test "$GCC" = "yes"
7617 then CCSHARED="-fPIC"
7618 else CCSHARED="-Kpic -belf"
7619 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007620 IRIX*/6*) case $CC in
7621 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007622 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007623 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007624 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7627$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007628# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007629# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7631$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007632if test -z "$LINKFORSHARED"
7633then
Guido van Rossum07397971997-04-29 21:49:50 +00007634 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007635 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007636 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007637 LINKFORSHARED="-Wl,-E -Wl,+s";;
7638# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007639 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007640 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007641 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007642 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007643 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007644 if test "$enable_framework"
7645 then
Jack Jansenda49e192005-01-07 13:08:22 +00007646 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007647 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007648 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007649 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007650 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007651 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007652 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007653 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7654 then
7655 LINKFORSHARED="-Wl,--export-dynamic"
7656 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007657 SunOS/5*) case $CC in
7658 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007659 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007660 then
7661 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007662 fi;;
7663 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007664 CYGWIN*)
7665 if test $enable_shared = "no"
7666 then
7667 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7668 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007669 QNX*)
7670 # -Wl,-E causes the symbols to be added to the dynamic
7671 # symbol table so that they can be found when a module
7672 # is loaded. -N 2048K causes the stack size to be set
7673 # to 2048 kilobytes so that the stack doesn't overflow
7674 # when running test_compile.py.
7675 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007676 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7679$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007680
Michael W. Hudson54241132001-12-07 15:38:26 +00007681
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007682
Matthias Kloseb9621712010-04-24 17:59:49 +00007683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7684$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007685if test ! "$LIBRARY" = "$LDLIBRARY"
7686then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007687 case $ac_sys_system in
7688 CYGWIN*)
7689 # Cygwin needs CCSHARED when building extension DLLs
7690 # but not when building the interpreter DLL.
7691 CFLAGSFORSHARED='';;
7692 *)
7693 CFLAGSFORSHARED='$(CCSHARED)'
7694 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7697$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007698
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007699# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7700# library (with --enable-shared).
7701# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007702# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7703# if it is not required, since it creates a dependency of the shared library
7704# to LIBS. This, in turn, means that applications linking the shared libpython
7705# don't need to link LIBS explicitly. The default should be only changed
7706# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007707
Matthias Kloseb9621712010-04-24 17:59:49 +00007708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7709$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007710case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007711 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007712 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007713esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7715$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007716
7717
Guido van Rossum627b2d71993-12-24 10:39:16 +00007718# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7720$as_echo_n "checking for dlopen in -ldl... " >&6; }
7721if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7722 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007723else
Martin v. Löwis11437992002-04-12 09:54:03 +00007724 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007725LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007728
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007729/* Override any GCC internal prototype to avoid an error.
7730 Use char because int might match the return type of a GCC
7731 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007732#ifdef __cplusplus
7733extern "C"
7734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007735char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007736int
7737main ()
7738{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007739return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007740 ;
7741 return 0;
7742}
7743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007744if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007746else
Matthias Kloseb9621712010-04-24 17:59:49 +00007747 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007749rm -f core conftest.err conftest.$ac_objext \
7750 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007751LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7754$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7755if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 cat >>confdefs.h <<_ACEOF
7757#define HAVE_LIBDL 1
7758_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007759
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007760 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007761
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007762fi
7763 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7765$as_echo_n "checking for shl_load in -ldld... " >&6; }
7766if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7767 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007768else
Martin v. Löwis11437992002-04-12 09:54:03 +00007769 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007770LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007774/* Override any GCC internal prototype to avoid an error.
7775 Use char because int might match the return type of a GCC
7776 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007777#ifdef __cplusplus
7778extern "C"
7779#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007780char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007781int
7782main ()
7783{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007784return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007785 ;
7786 return 0;
7787}
7788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007789if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007790 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007791else
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007794rm -f core conftest.err conftest.$ac_objext \
7795 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007796LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7799$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7800if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007801 cat >>confdefs.h <<_ACEOF
7802#define HAVE_LIBDLD 1
7803_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007804
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007805 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007806
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007807fi
7808 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007809
Georg Brandlb1441c72009-01-03 22:33:39 +00007810# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007811if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7813$as_echo_n "checking for library containing sem_init... " >&6; }
7814if test "${ac_cv_search_sem_init+set}" = set; then :
7815 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007816else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007817 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821/* Override any GCC internal prototype to avoid an error.
7822 Use char because int might match the return type of a GCC
7823 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007824#ifdef __cplusplus
7825extern "C"
7826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007827char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007828int
7829main ()
7830{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007832 ;
7833 return 0;
7834}
7835_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007836for ac_lib in '' pthread rt posix4; do
7837 if test -z "$ac_lib"; then
7838 ac_res="none required"
7839 else
7840 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007841 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007842 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007843 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007846rm -f core conftest.err conftest.$ac_objext \
7847 conftest$ac_exeext
7848 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851done
Matthias Kloseb9621712010-04-24 17:59:49 +00007852if test "${ac_cv_search_sem_init+set}" = set; then :
7853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854else
7855 ac_cv_search_sem_init=no
7856fi
7857rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007858LIBS=$ac_func_search_save_LIBS
7859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7861$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007862ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007863if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007864 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007865
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007866fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007867 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007868 # posix4 on Solaris 2.6
7869 # pthread (first!) on Linux
7870fi
7871
Martin v. Löwis19d17342003-06-14 21:03:05 +00007872# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7874$as_echo_n "checking for textdomain in -lintl... " >&6; }
7875if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7876 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007877else
7878 ac_check_lib_save_LIBS=$LIBS
7879LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007881/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883/* Override any GCC internal prototype to avoid an error.
7884 Use char because int might match the return type of a GCC
7885 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007886#ifdef __cplusplus
7887extern "C"
7888#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007889char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007890int
7891main ()
7892{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007893return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007894 ;
7895 return 0;
7896}
7897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007898if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007899 ac_cv_lib_intl_textdomain=yes
7900else
Matthias Kloseb9621712010-04-24 17:59:49 +00007901 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007903rm -f core conftest.err conftest.$ac_objext \
7904 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007905LIBS=$ac_check_lib_save_LIBS
7906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7908$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7909if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007910
Matthias Kloseb9621712010-04-24 17:59:49 +00007911$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007912
Brett Cannonc6d936e2009-06-07 20:09:53 +00007913 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007914fi
7915
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007916
7917# checks for system dependent C++ extensions support
7918case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007919 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7920$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007922/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007923
7924 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007925int
7926main ()
7927{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007928loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007929 ;
7930 return 0;
7931}
Matthias Kloseb159a552010-04-25 21:00:44 +00007932
Martin v. Löwis11437992002-04-12 09:54:03 +00007933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007934if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007935
Matthias Kloseb159a552010-04-25 21:00:44 +00007936
Matthias Kloseb9621712010-04-24 17:59:49 +00007937$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007938
Matthias Kloseb159a552010-04-25 21:00:44 +00007939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007940$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007941
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007942else
Matthias Kloseb159a552010-04-25 21:00:44 +00007943
7944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007945$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007946
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007948rm -f core conftest.err conftest.$ac_objext \
7949 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007950 *) ;;
7951esac
7952
Guido van Rossum70c7f481998-03-26 18:44:10 +00007953# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7955$as_echo_n "checking for t_open in -lnsl... " >&6; }
7956if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7957 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007958else
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007960LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964/* Override any GCC internal prototype to avoid an error.
7965 Use char because int might match the return type of a GCC
7966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007967#ifdef __cplusplus
7968extern "C"
7969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007970char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007971int
7972main ()
7973{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007974return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007975 ;
7976 return 0;
7977}
7978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007979if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007980 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007981else
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007984rm -f core conftest.err conftest.$ac_objext \
7985 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007986LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7989$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
7990if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007991 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007992fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007993 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7995$as_echo_n "checking for socket in -lsocket... " >&6; }
7996if test "${ac_cv_lib_socket_socket+set}" = set; then :
7997 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007998else
Martin v. Löwis11437992002-04-12 09:54:03 +00007999 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008000LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008003
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008004/* Override any GCC internal prototype to avoid an error.
8005 Use char because int might match the return type of a GCC
8006 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008007#ifdef __cplusplus
8008extern "C"
8009#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008010char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008011int
8012main ()
8013{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008015 ;
8016 return 0;
8017}
8018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008019if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008021else
Matthias Kloseb9621712010-04-24 17:59:49 +00008022 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008024rm -f core conftest.err conftest.$ac_objext \
8025 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008026LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008027fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8029$as_echo "$ac_cv_lib_socket_socket" >&6; }
8030if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008031 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008032fi
8033 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008034
Matthias Kloseb9621712010-04-24 17:59:49 +00008035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8036$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008037
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008038# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008039if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008040 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8042$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008043LIBS="$withval $LIBS"
8044
8045else
Matthias Kloseb9621712010-04-24 17:59:49 +00008046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8047$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048fi
8049
Guido van Rossum7f43da71994-08-01 12:15:30 +00008050
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008051if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008052 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8053set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8055$as_echo_n "checking for $ac_word... " >&6; }
8056if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8057 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008058else
8059 case $PKG_CONFIG in
8060 [\\/]* | ?:[\\/]*)
8061 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8062 ;;
8063 *)
8064 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8065for as_dir in $PATH
8066do
8067 IFS=$as_save_IFS
8068 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008069 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008070 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8071 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008072 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008073 break 2
8074 fi
8075done
Matthias Kloseb9621712010-04-24 17:59:49 +00008076 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008077IFS=$as_save_IFS
8078
8079 ;;
8080esac
8081fi
8082PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8083if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8085$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008086else
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8088$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008089fi
8090
8091
8092fi
8093if test -z "$ac_cv_path_PKG_CONFIG"; then
8094 ac_pt_PKG_CONFIG=$PKG_CONFIG
8095 # Extract the first word of "pkg-config", so it can be a program name with args.
8096set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8098$as_echo_n "checking for $ac_word... " >&6; }
8099if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8100 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008101else
8102 case $ac_pt_PKG_CONFIG in
8103 [\\/]* | ?:[\\/]*)
8104 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8105 ;;
8106 *)
8107 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8108for as_dir in $PATH
8109do
8110 IFS=$as_save_IFS
8111 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008112 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008113 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8114 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008116 break 2
8117 fi
8118done
Matthias Kloseb9621712010-04-24 17:59:49 +00008119 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008120IFS=$as_save_IFS
8121
8122 ;;
8123esac
8124fi
8125ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8126if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8128$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008129else
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8131$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008132fi
8133
8134 if test "x$ac_pt_PKG_CONFIG" = x; then
8135 PKG_CONFIG=""
8136 else
8137 case $cross_compiling:$ac_tool_warned in
8138yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008139{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8140$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008141ac_tool_warned=yes ;;
8142esac
8143 PKG_CONFIG=$ac_pt_PKG_CONFIG
8144 fi
8145else
8146 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8147fi
8148
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008149
8150# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8152$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008153
8154# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008155if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008156 withval=$with_system_expat;
8157fi
8158
8159
Matthias Kloseb9621712010-04-24 17:59:49 +00008160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8161$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008162
8163# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8165$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008166
8167# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008168if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008169 withval=$with_system_ffi;
8170fi
8171
8172
8173if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008174 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8175else
8176 LIBFFI_INCLUDEDIR=""
8177fi
8178
8179
Matthias Kloseb9621712010-04-24 17:59:49 +00008180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8181$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008182
Matthias Klose55708cc2009-04-30 08:06:49 +00008183# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8185$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008186
8187# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008188if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008189 withval=$with_dbmliborder;
8190if test x$with_dbmliborder = xyes
8191then
Matthias Kloseb9621712010-04-24 17:59:49 +00008192as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008193else
8194 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8195 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8196 then
Matthias Kloseb9621712010-04-24 17:59:49 +00008197 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008198 fi
8199 done
8200fi
8201fi
8202
Matthias Kloseb9621712010-04-24 17:59:49 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8204$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008205
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008206# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008207
8208
Matthias Kloseb9621712010-04-24 17:59:49 +00008209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8210$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008211
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008213if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008214 withval=$with_signal_module;
8215fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008216
8217
8218if test -z "$with_signal_module"
8219then with_signal_module="yes"
8220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8222$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008223
8224if test "${with_signal_module}" = "yes"; then
8225 USE_SIGNAL_MODULE=""
8226 SIGNAL_OBJS=""
8227else
8228 USE_SIGNAL_MODULE="#"
8229 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8230fi
8231
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008232# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008233
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008234USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008235
Matthias Kloseb9621712010-04-24 17:59:49 +00008236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8237$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008238
Guido van Rossumec2f0731997-01-22 20:54:01 +00008239
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008240# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008241if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8244$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008245LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008246if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008247 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008248fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008249else
Matthias Kloseb9621712010-04-24 17:59:49 +00008250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8251$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252fi
8253
Martin v. Löwis11437992002-04-12 09:54:03 +00008254
8255# Templates for things AC_DEFINEd more than once.
8256# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008257
8258
Martin v. Löwis11437992002-04-12 09:54:03 +00008259
8260
Matthias Kloseb9621712010-04-24 17:59:49 +00008261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8262$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008263
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008264# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008265if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008266 withval=$with_threads;
8267fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008268
8269
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008270# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008272# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008273if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008274 withval=$with_thread; with_threads=$with_thread
8275fi
8276
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008277
8278if test -z "$with_threads"
8279then with_threads="yes"
8280fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8282$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008283
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008284
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008285if test "$with_threads" = "no"
8286then
8287 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008288elif test "$ac_cv_pthread_is_default" = yes
8289then
Matthias Kloseb9621712010-04-24 17:59:49 +00008290 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008291
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008292 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008293 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008294
8295 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008296 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008297elif test "$ac_cv_kpthread" = "yes"
8298then
8299 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008300 if test "$ac_cv_cxx_thread" = "yes"; then
8301 CXX="$CXX -Kpthread"
8302 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008303 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008304
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008305 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008306 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008307elif test "$ac_cv_kthread" = "yes"
8308then
8309 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008310 if test "$ac_cv_cxx_thread" = "yes"; then
8311 CXX="$CXX -Kthread"
8312 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008313 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008314
8315 posix_threads=yes
8316 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008317elif test "$ac_cv_pthread" = "yes"
8318then
8319 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008320 if test "$ac_cv_cxx_thread" = "yes"; then
8321 CXX="$CXX -pthread"
8322 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008323 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008324
8325 posix_threads=yes
8326 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008327else
8328 if test ! -z "$with_threads" -a -d "$with_threads"
8329 then LDFLAGS="$LDFLAGS -L$with_threads"
8330 fi
8331 if test ! -z "$withval" -a -d "$withval"
8332 then LDFLAGS="$LDFLAGS -L$withval"
8333 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008334
8335 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008336 # define _POSIX_THREADS in unistd.h. Some apparently don't
8337 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8339$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008341/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008342
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008343#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008344#ifdef _POSIX_THREADS
8345yes
8346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008347
8348_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008349if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008350 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008351 unistd_defines_pthreads=yes
8352else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008353 unistd_defines_pthreads=no
8354fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008355rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008356
Matthias Kloseb9621712010-04-24 17:59:49 +00008357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8358$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008359
Matthias Kloseb9621712010-04-24 17:59:49 +00008360 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008361
Matthias Kloseb9621712010-04-24 17:59:49 +00008362 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8363if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8364 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008365
Matthias Kloseb9621712010-04-24 17:59:49 +00008366 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008367
Martin v. Löwis11437992002-04-12 09:54:03 +00008368
Matthias Kloseb9621712010-04-24 17:59:49 +00008369$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008370
8371 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008372 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008373else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008374
Matthias Kloseb9621712010-04-24 17:59:49 +00008375 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8376if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8377 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008378
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008380
Martin v. Löwis11437992002-04-12 09:54:03 +00008381
Matthias Kloseb9621712010-04-24 17:59:49 +00008382$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008383
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008384 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008385else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008386
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008387 # Just looking for pthread_create in libpthread is not enough:
8388 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8389 # So we really have to include pthread.h, and then link.
8390 _libs=$LIBS
8391 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8393$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008395/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008396#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008397
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008398void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008399int
8400main ()
8401{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008402
8403pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008404 ;
8405 return 0;
8406}
8407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008408if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008409
Matthias Kloseb9621712010-04-24 17:59:49 +00008410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8411$as_echo "yes" >&6; }
8412 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008413
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008414 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008415 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008416else
Martin v. Löwis11437992002-04-12 09:54:03 +00008417
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008418 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8420if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8421 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008422
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008423 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008424 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008425else
Guido van Rossumad678af1998-10-02 14:42:15 +00008426
Matthias Kloseb9621712010-04-24 17:59:49 +00008427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8428$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8429if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8430 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008431else
Martin v. Löwis11437992002-04-12 09:54:03 +00008432 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008433LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008436
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008437/* Override any GCC internal prototype to avoid an error.
8438 Use char because int might match the return type of a GCC
8439 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008440#ifdef __cplusplus
8441extern "C"
8442#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008443char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008444int
8445main ()
8446{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008447return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008448 ;
8449 return 0;
8450}
8451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008452if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008453 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008454else
Matthias Kloseb9621712010-04-24 17:59:49 +00008455 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008457rm -f core conftest.err conftest.$ac_objext \
8458 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008459LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8462$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8463if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8464 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008465
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008466 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008467 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008468 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008469else
Greg Steinadf63d62000-07-05 10:38:09 +00008470
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8472$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8473if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8474 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008475else
Martin v. Löwis11437992002-04-12 09:54:03 +00008476 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008477LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008479/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008480
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008481/* Override any GCC internal prototype to avoid an error.
8482 Use char because int might match the return type of a GCC
8483 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008484#ifdef __cplusplus
8485extern "C"
8486#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008487char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008488int
8489main ()
8490{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008491return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008492 ;
8493 return 0;
8494}
8495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008496if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008497 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008498else
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008501rm -f core conftest.err conftest.$ac_objext \
8502 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008503LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8506$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8507if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8508 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008509
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008510 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008511 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008512 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008513else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008514
Matthias Kloseb9621712010-04-24 17:59:49 +00008515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8516$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8517if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8518 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008519else
Martin v. Löwis11437992002-04-12 09:54:03 +00008520 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008521LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008524
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008525/* Override any GCC internal prototype to avoid an error.
8526 Use char because int might match the return type of a GCC
8527 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008528#ifdef __cplusplus
8529extern "C"
8530#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008531char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008532int
8533main ()
8534{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008535return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008536 ;
8537 return 0;
8538}
8539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008540if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008541 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008542else
Matthias Kloseb9621712010-04-24 17:59:49 +00008543 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008544fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008545rm -f core conftest.err conftest.$ac_objext \
8546 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008547LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8550$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8551if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8552 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008553
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008554 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008555 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008556 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008557else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008558
Matthias Kloseb9621712010-04-24 17:59:49 +00008559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8560$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8561if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8562 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008563else
Martin v. Löwis11437992002-04-12 09:54:03 +00008564 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008565LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008568
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008569/* Override any GCC internal prototype to avoid an error.
8570 Use char because int might match the return type of a GCC
8571 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008572#ifdef __cplusplus
8573extern "C"
8574#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008575char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008576int
8577main ()
8578{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 ;
8581 return 0;
8582}
8583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008584if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008585 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008586else
Matthias Kloseb9621712010-04-24 17:59:49 +00008587 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008589rm -f core conftest.err conftest.$ac_objext \
8590 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008591LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8594$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8595if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8596 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008597
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008598 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008599 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008600 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008601else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008602
Martin v. Löwis130fb172001-07-19 11:00:41 +00008603 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008604fi
8605
Guido van Rossum627b2d71993-12-24 10:39:16 +00008606
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008607fi
8608
Guido van Rossum0be3e491997-05-22 20:33:33 +00008609fi
8610
Guido van Rossum49545951997-12-02 19:28:29 +00008611fi
8612
Guido van Rossumb93a8621998-05-07 13:27:32 +00008613fi
8614
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008616rm -f core conftest.err conftest.$ac_objext \
8617 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008618fi
8619
Martin v. Löwis11437992002-04-12 09:54:03 +00008620
8621fi
8622
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008623
Michael W. Hudson54241132001-12-07 15:38:26 +00008624
Matthias Kloseb9621712010-04-24 17:59:49 +00008625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8626$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8627if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8628 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008629else
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008631LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008634
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635/* Override any GCC internal prototype to avoid an error.
8636 Use char because int might match the return type of a GCC
8637 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008638#ifdef __cplusplus
8639extern "C"
8640#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008641char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008642int
8643main ()
8644{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008646 ;
8647 return 0;
8648}
8649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008650if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008651 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008652else
Matthias Kloseb9621712010-04-24 17:59:49 +00008653 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008655rm -f core conftest.err conftest.$ac_objext \
8656 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008657LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8660$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8661if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8662 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008663
Martin v. Löwis130fb172001-07-19 11:00:41 +00008664 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008665 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008666 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008667fi
8668
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008669
Neal Norwitza978ab02002-11-02 16:58:05 +00008670 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8672$as_echo_n "checking for thr_create in -lthread... " >&6; }
8673if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8674 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008675else
Martin v. Löwis11437992002-04-12 09:54:03 +00008676 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008677LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008679/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008681/* Override any GCC internal prototype to avoid an error.
8682 Use char because int might match the return type of a GCC
8683 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008684#ifdef __cplusplus
8685extern "C"
8686#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008687char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008688int
8689main ()
8690{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008691return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008692 ;
8693 return 0;
8694}
8695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008696if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008697 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008698else
Matthias Kloseb9621712010-04-24 17:59:49 +00008699 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008701rm -f core conftest.err conftest.$ac_objext \
8702 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008703LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8706$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8707if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8708 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008709
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008710 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008711 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008712 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008713fi
8714
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008715 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008716
Martin v. Löwis130fb172001-07-19 11:00:41 +00008717 if test "$USE_THREAD_MODULE" != "#"
8718 then
8719 # If the above checks didn't disable threads, (at least) OSF1
8720 # needs this '-threads' argument during linking.
8721 case $ac_sys_system in
8722 OSF1) LDLAST=-threads;;
8723 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008724 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008725fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008726
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008727if test "$posix_threads" = "yes"; then
8728 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008729
Matthias Kloseb9621712010-04-24 17:59:49 +00008730$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008731
8732 fi
8733
8734 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8735 case $ac_sys_system/$ac_sys_release in
8736 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008737$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008738
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008739 ;;
8740 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008741$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008742
8743 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008744 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008745$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008746
8747 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008748 esac
8749
Matthias Kloseb9621712010-04-24 17:59:49 +00008750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8751$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8752 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8753 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008754else
Matthias Kloseb9621712010-04-24 17:59:49 +00008755 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008756 ac_cv_pthread_system_supported=no
8757else
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008759/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008760#include <pthread.h>
8761 void *foo(void *parm) {
8762 return NULL;
8763 }
8764 main() {
8765 pthread_attr_t attr;
8766 pthread_t id;
8767 if (pthread_attr_init(&attr)) exit(-1);
8768 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8769 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8770 exit(0);
8771 }
8772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008773if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008774 ac_cv_pthread_system_supported=yes
8775else
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8779 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008780fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008782
Guido van Rossum627b2d71993-12-24 10:39:16 +00008783fi
8784
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8786$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008787 if test "$ac_cv_pthread_system_supported" = "yes"; then
8788
Matthias Kloseb9621712010-04-24 17:59:49 +00008789$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008790
8791 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008792 for ac_func in pthread_sigmask
8793do :
8794 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8795if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008796 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008797#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008798_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008799 case $ac_sys_system in
8800 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008801
Matthias Kloseb9621712010-04-24 17:59:49 +00008802$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008803
8804 ;;
8805 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008806fi
8807done
8808
8809fi
8810
8811
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008812# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008813
Matthias Kloseb9621712010-04-24 17:59:49 +00008814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8815$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008816# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008817if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008818 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008819 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8821$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008822 ipv6=no
8823 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008824 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8825$as_echo "yes" >&6; }
8826 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008827
8828 ipv6=yes
8829 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008830 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008831else
Martin v. Löwis11437992002-04-12 09:54:03 +00008832
Matthias Kloseb9621712010-04-24 17:59:49 +00008833 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008834
Matthias Kloseb9621712010-04-24 17:59:49 +00008835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8836$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008837 ipv6=no
8838
8839else
Matthias Kloseb9621712010-04-24 17:59:49 +00008840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008841/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008842 /* AF_INET6 available check */
8843#include <sys/types.h>
8844#include <sys/socket.h>
8845main()
8846{
8847 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8848 exit(1);
8849 else
8850 exit(0);
8851}
8852
Martin v. Löwis11437992002-04-12 09:54:03 +00008853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008854if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008855
Matthias Kloseb9621712010-04-24 17:59:49 +00008856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8857$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008858 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008859
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008860else
Matthias Kloseb159a552010-04-25 21:00:44 +00008861
Matthias Kloseb9621712010-04-24 17:59:49 +00008862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8863$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008864 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008865
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8868 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008869fi
8870
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008871
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008872if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8874$as_echo_n "checking if RFC2553 API is available... " >&6; }
8875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008876/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008877
8878 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008879#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008880int
8881main ()
8882{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008883struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008884 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008885 ;
8886 return 0;
8887}
Matthias Kloseb159a552010-04-25 21:00:44 +00008888
Martin v. Löwis11437992002-04-12 09:54:03 +00008889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008890if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008891
8892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008893$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008894 ipv6=yes
8895
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008896else
Matthias Kloseb159a552010-04-25 21:00:44 +00008897
8898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008899$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008900 ipv6=no
8901
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008902fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008904fi
8905
8906if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008908
8909fi
8910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008911fi
8912
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008913
8914ipv6type=unknown
8915ipv6lib=none
8916ipv6trylibc=no
8917
8918if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8920$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008921 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8922 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008923 case $i in
8924 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008926/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008927
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008928#include <netinet/in.h>
8929#ifdef IPV6_INRIA_VERSION
8930yes
8931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008932_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008934 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008935 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008936fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008937rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008938
8939 ;;
8940 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008942/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008943
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008944#include <netinet/in.h>
8945#ifdef __KAME__
8946yes
8947#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008948_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008949if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008950 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008951 ipv6type=$i;
8952 ipv6lib=inet6
8953 ipv6libdir=/usr/local/v6/lib
8954 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008955fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008956rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008957
8958 ;;
8959 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008961/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008962
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008963#include <features.h>
8964#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8965yes
8966#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008967_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008968if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008970 ipv6type=$i;
8971 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008972fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008973rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008974
8975 ;;
8976 linux-inet6)
8977 if test -d /usr/inet6; then
8978 ipv6type=$i
8979 ipv6lib=inet6
8980 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008981 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008982 fi
8983 ;;
8984 solaris)
8985 if test -f /etc/netconfig; then
8986 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
8987 ipv6type=$i
8988 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008989 fi
8990 fi
8991 ;;
8992 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008994/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008995
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008996#include <sys/param.h>
8997#ifdef _TOSHIBA_INET6
8998yes
8999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009000_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003 ipv6type=$i;
9004 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009005 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009006fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009007rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009008
9009 ;;
9010 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009012/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009013
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009014#include </usr/local/v6/include/sys/v6config.h>
9015#ifdef __V6D__
9016yes
9017#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009018_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009019if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009021 ipv6type=$i;
9022 ipv6lib=v6;
9023 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009024 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009025fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009026rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009027
9028 ;;
9029 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009031/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009032
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009033#include <sys/param.h>
9034#ifdef _ZETA_MINAMI_INET6
9035yes
9036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009037_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009038if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009039 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009040 ipv6type=$i;
9041 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009042 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009043fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009044rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009045
9046 ;;
9047 esac
9048 if test "$ipv6type" != "unknown"; then
9049 break
9050 fi
9051 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9053$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009054fi
9055
9056if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9057 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9058 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9059 echo "using lib$ipv6lib"
9060 else
9061 if test $ipv6trylibc = "yes"; then
9062 echo "using libc"
9063 else
9064 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9065 echo "You need to fetch lib$ipv6lib.a from appropriate"
9066 echo 'ipv6 kit and compile beforehand.'
9067 exit 1
9068 fi
9069 fi
9070fi
9071
Matthias Kloseb9621712010-04-24 17:59:49 +00009072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9073$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009075/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009076
9077 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009078int
9079main ()
9080{
9081FSIORefNum fRef = 0
9082 ;
9083 return 0;
9084}
Matthias Kloseb159a552010-04-25 21:00:44 +00009085
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009087if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009088
Matthias Kloseb159a552010-04-25 21:00:44 +00009089
Matthias Kloseb9621712010-04-24 17:59:49 +00009090$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009091
Matthias Kloseb9621712010-04-24 17:59:49 +00009092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9093$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009094
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009095else
Matthias Kloseb159a552010-04-25 21:00:44 +00009096
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9098$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009099
9100fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9102
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009103# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9105$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009107# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009108if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009109 withval=$with_doc_strings;
9110fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009111
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009112
9113if test -z "$with_doc_strings"
9114then with_doc_strings="yes"
9115fi
9116if test "$with_doc_strings" != "no"
9117then
9118
Matthias Kloseb9621712010-04-24 17:59:49 +00009119$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009120
9121fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9123$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009124
Neil Schemenauera35c6882001-02-27 04:45:05 +00009125# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9127$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009129# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009130if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009131 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009132if test "$withval" != no
9133then
9134
Matthias Kloseb9621712010-04-24 17:59:49 +00009135$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009136
Matthias Kloseb9621712010-04-24 17:59:49 +00009137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9138$as_echo "yes" >&6; }
9139else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9140$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009141fi
9142else
Matthias Kloseb9621712010-04-24 17:59:49 +00009143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9144$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009145fi
9146
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009147
9148# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9150$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009151
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009152# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009153if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009154 withval=$with_pymalloc;
9155fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009156
Neil Schemenauera35c6882001-02-27 04:45:05 +00009157
Neil Schemenauer16c22972002-03-22 15:34:49 +00009158if test -z "$with_pymalloc"
9159then with_pymalloc="yes"
9160fi
9161if test "$with_pymalloc" != "no"
9162then
Martin v. Löwis11437992002-04-12 09:54:03 +00009163
Matthias Kloseb9621712010-04-24 17:59:49 +00009164$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009165
9166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9168$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009169
Benjamin Peterson05159c42009-12-03 03:01:27 +00009170# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9172$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009173
9174# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009175if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009176 withval=$with_valgrind;
9177else
9178 with_valgrind=no
9179fi
9180
Matthias Kloseb9621712010-04-24 17:59:49 +00009181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9182$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009183if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009184 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9185if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009186
Matthias Kloseb9621712010-04-24 17:59:49 +00009187$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009188
9189else
Matthias Kloseb9621712010-04-24 17:59:49 +00009190 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009191
9192fi
9193
9194
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009195 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009196fi
9197
Barry Warsawef82cd72000-06-30 16:21:01 +00009198# Check for --with-wctype-functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9200$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009201
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009202# Check whether --with-wctype-functions was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009203if test "${with_wctype_functions+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009204 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009205if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009206then
9207
Matthias Kloseb9621712010-04-24 17:59:49 +00009208$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009209
Matthias Kloseb9621712010-04-24 17:59:49 +00009210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9211$as_echo "yes" >&6; }
9212else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9213$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009214fi
9215else
Matthias Kloseb9621712010-04-24 17:59:49 +00009216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9217$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009218fi
9219
Barry Warsawef82cd72000-06-30 16:21:01 +00009220
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009221# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009222
Guido van Rossum98935bf2001-09-05 19:13:16 +00009223DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009224
Guido van Rossume97ee181999-12-20 21:27:22 +00009225# the dlopen() function means we might want to use dynload_shlib.o. some
9226# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009227for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009228do :
9229 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9230if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009231 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009232#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009233_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009234
Guido van Rossume97ee181999-12-20 21:27:22 +00009235fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009236done
Guido van Rossume97ee181999-12-20 21:27:22 +00009237
Michael W. Hudson54241132001-12-07 15:38:26 +00009238
Guido van Rossume97ee181999-12-20 21:27:22 +00009239# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9240# loading of modules.
9241
Matthias Kloseb9621712010-04-24 17:59:49 +00009242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9243$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009244if test -z "$DYNLOADFILE"
9245then
9246 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009247 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9248 if test "$ac_cv_func_dlopen" = yes
9249 then DYNLOADFILE="dynload_shlib.o"
9250 else DYNLOADFILE="dynload_aix.o"
9251 fi
9252 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009253 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009254 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9255 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009256 *)
9257 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9258 # out any dynamic loading
9259 if test "$ac_cv_func_dlopen" = yes
9260 then DYNLOADFILE="dynload_shlib.o"
9261 else DYNLOADFILE="dynload_stub.o"
9262 fi
9263 ;;
9264 esac
9265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9267$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009268if test "$DYNLOADFILE" != "dynload_stub.o"
9269then
Martin v. Löwis11437992002-04-12 09:54:03 +00009270
Matthias Kloseb9621712010-04-24 17:59:49 +00009271$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009272
9273fi
9274
Neil Schemenauer4e425612001-06-19 15:44:15 +00009275# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9276
Michael W. Hudson54241132001-12-07 15:38:26 +00009277
Matthias Kloseb9621712010-04-24 17:59:49 +00009278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9279$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009280if test -z "$MACHDEP_OBJS"
9281then
Jack Jansene578a632001-08-15 01:27:14 +00009282 MACHDEP_OBJS=$extra_machdep_objs
9283else
9284 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9287$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009288
Guido van Rossum627b2d71993-12-24 10:39:16 +00009289# checks for library functions
Martin v. Löwis823725e2008-03-24 13:39:54 +00009290for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9291 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009292 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009293 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009294 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009295 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009296 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009297 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9298 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009299 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
9300 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009301 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009302 truncate uname unsetenv utimes waitpid wait3 wait4 \
9303 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009304do :
9305 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9306ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9307eval as_val=\$$as_ac_var
9308 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009309 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009310#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009311_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009312
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009313fi
9314done
9315
Michael W. Hudson54241132001-12-07 15:38:26 +00009316
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009317# For some functions, having a definition is not sufficient, since
9318# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9320$as_echo_n "checking for chroot... " >&6; }
9321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009322/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009323#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009324int
9325main ()
9326{
9327void *x=chroot
9328 ;
9329 return 0;
9330}
9331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009332if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009333
Matthias Kloseb9621712010-04-24 17:59:49 +00009334$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009335
Matthias Kloseb159a552010-04-25 21:00:44 +00009336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009337$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009338else
Matthias Kloseb9621712010-04-24 17:59:49 +00009339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9340$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009341
9342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9345$as_echo_n "checking for link... " >&6; }
9346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009347/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009348#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009349int
9350main ()
9351{
9352void *x=link
9353 ;
9354 return 0;
9355}
9356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009357if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009358
Matthias Kloseb9621712010-04-24 17:59:49 +00009359$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009360
Matthias Kloseb159a552010-04-25 21:00:44 +00009361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009362$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009363else
Matthias Kloseb9621712010-04-24 17:59:49 +00009364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9365$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009366
9367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9370$as_echo_n "checking for symlink... " >&6; }
9371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009372/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009373#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009374int
9375main ()
9376{
9377void *x=symlink
9378 ;
9379 return 0;
9380}
9381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009382if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009383
Matthias Kloseb9621712010-04-24 17:59:49 +00009384$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009385
Matthias Kloseb159a552010-04-25 21:00:44 +00009386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009387$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009388else
Matthias Kloseb9621712010-04-24 17:59:49 +00009389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9390$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009391
9392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9395$as_echo_n "checking for fchdir... " >&6; }
9396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009397/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009398#include <unistd.h>
9399int
9400main ()
9401{
9402void *x=fchdir
9403 ;
9404 return 0;
9405}
9406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009407if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009408
Matthias Kloseb9621712010-04-24 17:59:49 +00009409$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009410
Matthias Kloseb159a552010-04-25 21:00:44 +00009411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009412$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009413else
Matthias Kloseb9621712010-04-24 17:59:49 +00009414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9415$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009416
9417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9420$as_echo_n "checking for fsync... " >&6; }
9421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009422/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009423#include <unistd.h>
9424int
9425main ()
9426{
9427void *x=fsync
9428 ;
9429 return 0;
9430}
9431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009432if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009433
Matthias Kloseb9621712010-04-24 17:59:49 +00009434$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009435
Matthias Kloseb159a552010-04-25 21:00:44 +00009436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009437$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009438else
Matthias Kloseb9621712010-04-24 17:59:49 +00009439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9440$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009441
9442fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9445$as_echo_n "checking for fdatasync... " >&6; }
9446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009447/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009448#include <unistd.h>
9449int
9450main ()
9451{
9452void *x=fdatasync
9453 ;
9454 return 0;
9455}
9456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009457if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009458
Matthias Kloseb9621712010-04-24 17:59:49 +00009459$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009460
Matthias Kloseb159a552010-04-25 21:00:44 +00009461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009462$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009463else
Matthias Kloseb9621712010-04-24 17:59:49 +00009464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9465$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009466
9467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9470$as_echo_n "checking for epoll... " >&6; }
9471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009472/* end confdefs.h. */
9473#include <sys/epoll.h>
9474int
9475main ()
9476{
9477void *x=epoll_create
9478 ;
9479 return 0;
9480}
9481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009482if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009483
Matthias Kloseb9621712010-04-24 17:59:49 +00009484$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009485
Matthias Kloseb159a552010-04-25 21:00:44 +00009486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009487$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009488else
Matthias Kloseb9621712010-04-24 17:59:49 +00009489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9490$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009491
9492fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9495$as_echo_n "checking for kqueue... " >&6; }
9496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009497/* end confdefs.h. */
9498
9499#include <sys/types.h>
9500#include <sys/event.h>
9501
9502int
9503main ()
9504{
9505int x=kqueue()
9506 ;
9507 return 0;
9508}
9509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009510if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009511
Matthias Kloseb9621712010-04-24 17:59:49 +00009512$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009513
Matthias Kloseb159a552010-04-25 21:00:44 +00009514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009515$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009516else
Matthias Kloseb9621712010-04-24 17:59:49 +00009517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9518$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009519
9520fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009522# On some systems (eg. FreeBSD 5), we would find a definition of the
9523# functions ctermid_r, setgroups in the library, but no prototype
9524# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9525# address to avoid compiler warnings and potential miscompilations
9526# because of the missing prototypes.
9527
Matthias Kloseb9621712010-04-24 17:59:49 +00009528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9529$as_echo_n "checking for ctermid_r... " >&6; }
9530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009531/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009532
Martin v. Löwisd5843682002-11-21 20:41:28 +00009533#include <stdio.h>
9534
Martin v. Löwisd5843682002-11-21 20:41:28 +00009535int
9536main ()
9537{
9538void* p = ctermid_r
9539 ;
9540 return 0;
9541}
9542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009543if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009544
Matthias Kloseb9621712010-04-24 17:59:49 +00009545$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009546
Matthias Kloseb159a552010-04-25 21:00:44 +00009547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009548$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009549else
Matthias Kloseb9621712010-04-24 17:59:49 +00009550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9551$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009552
9553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9555
Matthias Kloseb9621712010-04-24 17:59:49 +00009556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
9557$as_echo_n "checking for flock... " >&6; }
9558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009559/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009560
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009561#include <sys/file.h>
9562
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009563int
9564main ()
9565{
9566void* p = flock
9567 ;
9568 return 0;
9569}
9570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009571if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009572
Matthias Kloseb9621712010-04-24 17:59:49 +00009573$as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009574
Matthias Kloseb159a552010-04-25 21:00:44 +00009575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009576$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009577else
Matthias Kloseb9621712010-04-24 17:59:49 +00009578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9579$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009580
9581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9583
Matthias Kloseb9621712010-04-24 17:59:49 +00009584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9585$as_echo_n "checking for getpagesize... " >&6; }
9586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009587/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009588
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009589#include <unistd.h>
9590
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009591int
9592main ()
9593{
9594void* p = getpagesize
9595 ;
9596 return 0;
9597}
9598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009599if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009600
Matthias Kloseb9621712010-04-24 17:59:49 +00009601$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009602
Matthias Kloseb159a552010-04-25 21:00:44 +00009603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009604$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009605else
Matthias Kloseb9621712010-04-24 17:59:49 +00009606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9607$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009608
9609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009611
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009612for ac_prog in true
9613do
9614 # Extract the first word of "$ac_prog", so it can be a program name with args.
9615set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9617$as_echo_n "checking for $ac_word... " >&6; }
9618if test "${ac_cv_prog_TRUE+set}" = set; then :
9619 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009620else
9621 if test -n "$TRUE"; then
9622 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9623else
9624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9625for as_dir in $PATH
9626do
9627 IFS=$as_save_IFS
9628 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009629 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009630 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 +00009631 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009632 $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 +00009633 break 2
9634 fi
9635done
Matthias Kloseb9621712010-04-24 17:59:49 +00009636 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009637IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009638
9639fi
9640fi
9641TRUE=$ac_cv_prog_TRUE
9642if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9644$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009645else
Matthias Kloseb9621712010-04-24 17:59:49 +00009646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9647$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009648fi
9649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009650
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009651 test -n "$TRUE" && break
9652done
9653test -n "$TRUE" || TRUE="/bin/true"
9654
9655
Matthias Kloseb9621712010-04-24 17:59:49 +00009656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9657$as_echo_n "checking for inet_aton in -lc... " >&6; }
9658if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9659 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009660else
9661 ac_check_lib_save_LIBS=$LIBS
9662LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009664/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009666/* Override any GCC internal prototype to avoid an error.
9667 Use char because int might match the return type of a GCC
9668 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009669#ifdef __cplusplus
9670extern "C"
9671#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009672char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009673int
9674main ()
9675{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009677 ;
9678 return 0;
9679}
9680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009681if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009682 ac_cv_lib_c_inet_aton=yes
9683else
Matthias Kloseb9621712010-04-24 17:59:49 +00009684 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009686rm -f core conftest.err conftest.$ac_objext \
9687 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009688LIBS=$ac_check_lib_save_LIBS
9689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9691$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9692if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009693 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009694else
Matthias Kloseb9621712010-04-24 17:59:49 +00009695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9696$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9697if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9698 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009699else
9700 ac_check_lib_save_LIBS=$LIBS
9701LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009703/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009705/* Override any GCC internal prototype to avoid an error.
9706 Use char because int might match the return type of a GCC
9707 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009708#ifdef __cplusplus
9709extern "C"
9710#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009711char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009712int
9713main ()
9714{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009715return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009716 ;
9717 return 0;
9718}
9719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009720if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009721 ac_cv_lib_resolv_inet_aton=yes
9722else
Matthias Kloseb9621712010-04-24 17:59:49 +00009723 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009725rm -f core conftest.err conftest.$ac_objext \
9726 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009727LIBS=$ac_check_lib_save_LIBS
9728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9730$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9731if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009732 cat >>confdefs.h <<_ACEOF
9733#define HAVE_LIBRESOLV 1
9734_ACEOF
9735
9736 LIBS="-lresolv $LIBS"
9737
9738fi
9739
9740
9741fi
9742
9743
Christian Heimesd0764e22007-12-04 15:00:33 +00009744# On Tru64, chflags seems to be present, but calling it will
9745# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9747$as_echo_n "checking for chflags... " >&6; }
9748if test "${ac_cv_have_chflags+set}" = set; then :
9749 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009750else
Matthias Kloseb9621712010-04-24 17:59:49 +00009751 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009752 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009753else
Matthias Kloseb9621712010-04-24 17:59:49 +00009754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009755/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009756[
Christian Heimesd0764e22007-12-04 15:00:33 +00009757#include <sys/stat.h>
9758#include <unistd.h>
9759int main(int argc, char*argv[])
9760{
9761 if(chflags(argv[0], 0) != 0)
9762 return 1;
9763 return 0;
9764}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009765]
Christian Heimesd0764e22007-12-04 15:00:33 +00009766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009767if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009768 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009769else
Matthias Kloseb9621712010-04-24 17:59:49 +00009770 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9773 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009774fi
9775
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009776
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9779$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009780if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009781 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9782if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009783 ac_cv_have_chflags="yes"
9784else
9785 ac_cv_have_chflags="no"
9786fi
9787
9788fi
9789if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009790
Matthias Kloseb9621712010-04-24 17:59:49 +00009791$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009792
9793fi
9794
Matthias Kloseb9621712010-04-24 17:59:49 +00009795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9796$as_echo_n "checking for lchflags... " >&6; }
9797if test "${ac_cv_have_lchflags+set}" = set; then :
9798 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009799else
Matthias Kloseb9621712010-04-24 17:59:49 +00009800 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009801 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009802else
Matthias Kloseb9621712010-04-24 17:59:49 +00009803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009804/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009805[
Christian Heimesd0764e22007-12-04 15:00:33 +00009806#include <sys/stat.h>
9807#include <unistd.h>
9808int main(int argc, char*argv[])
9809{
9810 if(lchflags(argv[0], 0) != 0)
9811 return 1;
9812 return 0;
9813}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009814]
Christian Heimesd0764e22007-12-04 15:00:33 +00009815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009816if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009817 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009818else
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9822 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009823fi
9824
9825
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9828$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009829if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009830 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9831if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009832 ac_cv_have_lchflags="yes"
9833else
9834 ac_cv_have_lchflags="no"
9835fi
9836
9837fi
9838if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009839
Matthias Kloseb9621712010-04-24 17:59:49 +00009840$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009841
9842fi
9843
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009844case $ac_sys_system/$ac_sys_release in
9845Darwin/*)
9846 _CUR_CFLAGS="${CFLAGS}"
9847 _CUR_LDFLAGS="${LDFLAGS}"
9848 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9849 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9850 ;;
9851esac
9852
Matthias Kloseb9621712010-04-24 17:59:49 +00009853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9854$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9855if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9856 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009857else
9858 ac_check_lib_save_LIBS=$LIBS
9859LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009861/* end confdefs.h. */
9862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009863/* Override any GCC internal prototype to avoid an error.
9864 Use char because int might match the return type of a GCC
9865 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009866#ifdef __cplusplus
9867extern "C"
9868#endif
9869char inflateCopy ();
9870int
9871main ()
9872{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009873return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009874 ;
9875 return 0;
9876}
9877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009878if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009879 ac_cv_lib_z_inflateCopy=yes
9880else
Matthias Kloseb9621712010-04-24 17:59:49 +00009881 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009883rm -f core conftest.err conftest.$ac_objext \
9884 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009885LIBS=$ac_check_lib_save_LIBS
9886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9888$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9889if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009890
Matthias Kloseb9621712010-04-24 17:59:49 +00009891$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009892
9893fi
9894
9895
9896case $ac_sys_system/$ac_sys_release in
9897Darwin/*)
9898 CFLAGS="${_CUR_CFLAGS}"
9899 LDFLAGS="${_CUR_LDFLAGS}"
9900 ;;
9901esac
9902
Matthias Kloseb9621712010-04-24 17:59:49 +00009903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9904$as_echo_n "checking for hstrerror... " >&6; }
9905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009906/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009907
Martin v. Löwise9416172003-05-03 10:12:45 +00009908#include <netdb.h>
9909
Martin v. Löwise9416172003-05-03 10:12:45 +00009910int
9911main ()
9912{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009913void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009914 ;
9915 return 0;
9916}
9917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009918if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009919
Matthias Kloseb9621712010-04-24 17:59:49 +00009920$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009921
Matthias Kloseb159a552010-04-25 21:00:44 +00009922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009923$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009924else
Matthias Kloseb9621712010-04-24 17:59:49 +00009925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9926$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009927
9928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009929rm -f core conftest.err conftest.$ac_objext \
9930 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009931
Matthias Kloseb9621712010-04-24 17:59:49 +00009932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9933$as_echo_n "checking for inet_aton... " >&6; }
9934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009935/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009936
Martin v. Löwis86d66262006-02-17 08:40:11 +00009937#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009938#include <sys/socket.h>
9939#include <netinet/in.h>
9940#include <arpa/inet.h>
9941
Martin v. Löwise9416172003-05-03 10:12:45 +00009942int
9943main ()
9944{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009945void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009946 ;
9947 return 0;
9948}
9949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009950if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009951
Matthias Kloseb9621712010-04-24 17:59:49 +00009952$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009953
Matthias Kloseb159a552010-04-25 21:00:44 +00009954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009955$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009956else
Matthias Kloseb9621712010-04-24 17:59:49 +00009957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9958$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009959
9960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009961rm -f core conftest.err conftest.$ac_objext \
9962 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009963
Matthias Kloseb9621712010-04-24 17:59:49 +00009964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9965$as_echo_n "checking for inet_pton... " >&6; }
9966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009967/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009968
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009969#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009970#include <sys/socket.h>
9971#include <netinet/in.h>
9972#include <arpa/inet.h>
9973
Martin v. Löwise9416172003-05-03 10:12:45 +00009974int
9975main ()
9976{
9977void* p = inet_pton
9978 ;
9979 return 0;
9980}
9981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009982if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009983
Matthias Kloseb9621712010-04-24 17:59:49 +00009984$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009985
Matthias Kloseb159a552010-04-25 21:00:44 +00009986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009987$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009988else
Matthias Kloseb9621712010-04-24 17:59:49 +00009989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9990$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009991
9992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +00009994
Martin v. Löwisd6640d42003-07-06 09:29:52 +00009995# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +00009996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
9997$as_echo_n "checking for setgroups... " >&6; }
9998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009999/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010000
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010001#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010002#ifdef HAVE_GRP_H
10003#include <grp.h>
10004#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010005
Martin v. Löwisd5843682002-11-21 20:41:28 +000010006int
10007main ()
10008{
10009void* p = setgroups
10010 ;
10011 return 0;
10012}
10013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010014if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010015
Matthias Kloseb9621712010-04-24 17:59:49 +000010016$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010017
Matthias Kloseb159a552010-04-25 21:00:44 +000010018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010019$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010020else
Matthias Kloseb9621712010-04-24 17:59:49 +000010021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10022$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010023
10024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010026
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010027# check for openpty and forkpty
10028
10029for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010030do :
10031 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10032if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010033 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010034#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010035_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010036
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010037else
Matthias Kloseb9621712010-04-24 17:59:49 +000010038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10039$as_echo_n "checking for openpty in -lutil... " >&6; }
10040if test "${ac_cv_lib_util_openpty+set}" = set; then :
10041 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010042else
Martin v. Löwis11437992002-04-12 09:54:03 +000010043 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010044LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010046/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010048/* Override any GCC internal prototype to avoid an error.
10049 Use char because int might match the return type of a GCC
10050 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010051#ifdef __cplusplus
10052extern "C"
10053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010054char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010055int
10056main ()
10057{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010058return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010059 ;
10060 return 0;
10061}
10062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010063if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010064 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010065else
Matthias Kloseb9621712010-04-24 17:59:49 +000010066 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010068rm -f core conftest.err conftest.$ac_objext \
10069 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010070LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10073$as_echo "$ac_cv_lib_util_openpty" >&6; }
10074if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10075 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010076 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010077else
Matthias Kloseb9621712010-04-24 17:59:49 +000010078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10079$as_echo_n "checking for openpty in -lbsd... " >&6; }
10080if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10081 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010082else
10083 ac_check_lib_save_LIBS=$LIBS
10084LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010086/* end confdefs.h. */
10087
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010088/* Override any GCC internal prototype to avoid an error.
10089 Use char because int might match the return type of a GCC
10090 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010091#ifdef __cplusplus
10092extern "C"
10093#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010094char openpty ();
10095int
10096main ()
10097{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010098return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010099 ;
10100 return 0;
10101}
10102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010103if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010104 ac_cv_lib_bsd_openpty=yes
10105else
Matthias Kloseb9621712010-04-24 17:59:49 +000010106 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010107fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010108rm -f core conftest.err conftest.$ac_objext \
10109 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010110LIBS=$ac_check_lib_save_LIBS
10111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10113$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10114if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10115 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010116 LIBS="$LIBS -lbsd"
10117fi
10118
10119
10120fi
10121
Fred Drake8cef4cf2000-06-28 16:40:38 +000010122
10123fi
10124done
10125
10126for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010127do :
10128 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10129if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010130 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010131#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010132_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010133
Fred Drake8cef4cf2000-06-28 16:40:38 +000010134else
Matthias Kloseb9621712010-04-24 17:59:49 +000010135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10136$as_echo_n "checking for forkpty in -lutil... " >&6; }
10137if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10138 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010139else
Martin v. Löwis11437992002-04-12 09:54:03 +000010140 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010141LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010145/* Override any GCC internal prototype to avoid an error.
10146 Use char because int might match the return type of a GCC
10147 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010148#ifdef __cplusplus
10149extern "C"
10150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010151char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010152int
10153main ()
10154{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010155return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010156 ;
10157 return 0;
10158}
10159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010160if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010161 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010162else
Matthias Kloseb9621712010-04-24 17:59:49 +000010163 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010165rm -f core conftest.err conftest.$ac_objext \
10166 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010167LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10170$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10171if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10172 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010173 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010174else
Matthias Kloseb9621712010-04-24 17:59:49 +000010175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10176$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10177if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10178 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010179else
10180 ac_check_lib_save_LIBS=$LIBS
10181LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010183/* end confdefs.h. */
10184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010185/* Override any GCC internal prototype to avoid an error.
10186 Use char because int might match the return type of a GCC
10187 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010188#ifdef __cplusplus
10189extern "C"
10190#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010191char forkpty ();
10192int
10193main ()
10194{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010195return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010196 ;
10197 return 0;
10198}
10199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010200if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010201 ac_cv_lib_bsd_forkpty=yes
10202else
Matthias Kloseb9621712010-04-24 17:59:49 +000010203 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010205rm -f core conftest.err conftest.$ac_objext \
10206 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010207LIBS=$ac_check_lib_save_LIBS
10208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10210$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10211if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10212 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010213 LIBS="$LIBS -lbsd"
10214fi
10215
10216
10217fi
10218
Fred Drake8cef4cf2000-06-28 16:40:38 +000010219
10220fi
10221done
10222
Jack Jansendd19cf82001-12-06 22:36:17 +000010223
Christian Heimesb186d002008-03-18 15:15:01 +000010224# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010225for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010226do :
10227 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10228if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010229 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010230#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010231_ACEOF
10232
10233fi
10234done
10235
10236
Michael W. Hudson54241132001-12-07 15:38:26 +000010237# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010238for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010239do :
10240 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10241ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10242eval as_val=\$$as_ac_var
10243 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010245#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010246_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010247
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010248fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010249done
10250
Michael W. Hudson54241132001-12-07 15:38:26 +000010251
Christian Heimesb186d002008-03-18 15:15:01 +000010252for ac_func in dup2 getcwd strdup
Matthias Kloseb9621712010-04-24 17:59:49 +000010253do :
10254 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10255ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10256eval as_val=\$$as_ac_var
10257 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010259#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010260_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010261
Martin v. Löwis1142de32002-03-29 16:28:31 +000010262else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010263 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010264 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010265 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
10266 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010267esac
10268
Martin v. Löwis1142de32002-03-29 16:28:31 +000010269fi
10270done
10271
10272
10273for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010274do :
10275 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10276if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010277 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010278#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010281/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010282#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010283int
10284main ()
10285{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010286getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 ;
10288 return 0;
10289}
10290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010291if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010292
Matthias Kloseb9621712010-04-24 17:59:49 +000010293$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010294
Guido van Rossum627b2d71993-12-24 10:39:16 +000010295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010297
Guido van Rossum627b2d71993-12-24 10:39:16 +000010298fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010299done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010300
Jack Jansen150753c2003-03-29 22:07:47 +000010301for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010302do :
10303 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10304if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010305 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010306#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010309/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010310#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010311int
10312main ()
10313{
10314setpgrp(0,0);
10315 ;
10316 return 0;
10317}
10318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010319if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010320
Matthias Kloseb9621712010-04-24 17:59:49 +000010321$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010322
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010325
10326fi
10327done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010328
Thomas Wouters3a584202000-08-05 23:28:51 +000010329for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010330do :
10331 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10332if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010333 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010334#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010337/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010338#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010339int
10340main ()
10341{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010342gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010343 ;
10344 return 0;
10345}
10346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010347if ac_fn_c_try_compile "$LINENO"; then :
10348
Guido van Rossum627b2d71993-12-24 10:39:16 +000010349else
Skip Montanaro6dead952003-09-25 14:50:04 +000010350
Matthias Kloseb9621712010-04-24 17:59:49 +000010351$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010352
Martin v. Löwis11437992002-04-12 09:54:03 +000010353
Guido van Rossum627b2d71993-12-24 10:39:16 +000010354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010356
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010357fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010358done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010359
Michael W. Hudson54241132001-12-07 15:38:26 +000010360
Matthias Kloseb9621712010-04-24 17:59:49 +000010361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10362$as_echo_n "checking for major... " >&6; }
10363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010364/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010365
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010366#if defined(MAJOR_IN_MKDEV)
10367#include <sys/mkdev.h>
10368#elif defined(MAJOR_IN_SYSMACROS)
10369#include <sys/sysmacros.h>
10370#else
10371#include <sys/types.h>
10372#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010373
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010374int
10375main ()
10376{
10377
10378 makedev(major(0),minor(0));
10379
10380 ;
10381 return 0;
10382}
10383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010384if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010385
10386
Matthias Kloseb9621712010-04-24 17:59:49 +000010387$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010388
Matthias Kloseb9621712010-04-24 17:59:49 +000010389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10390$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010391
10392else
Skip Montanaro6dead952003-09-25 14:50:04 +000010393
Matthias Kloseb9621712010-04-24 17:59:49 +000010394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10395$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010396
10397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010398rm -f core conftest.err conftest.$ac_objext \
10399 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010400
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010401# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010402# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10404$as_echo_n "checking for getaddrinfo... " >&6; }
10405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010406/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010407
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010408#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010409#include <sys/socket.h>
10410#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010411#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010412
Martin v. Löwis11437992002-04-12 09:54:03 +000010413int
10414main ()
10415{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010416getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 ;
10418 return 0;
10419}
10420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010421if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010422 have_getaddrinfo=yes
10423else
Matthias Kloseb9621712010-04-24 17:59:49 +000010424 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010426rm -f core conftest.err conftest.$ac_objext \
10427 conftest$ac_exeext conftest.$ac_ext
10428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10429$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010430if test $have_getaddrinfo = yes
10431then
Matthias Kloseb9621712010-04-24 17:59:49 +000010432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10433$as_echo_n "checking getaddrinfo bug... " >&6; }
10434 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10435 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010436else
Matthias Kloseb9621712010-04-24 17:59:49 +000010437 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010438 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010439else
Matthias Kloseb9621712010-04-24 17:59:49 +000010440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010441/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010442
10443#include <sys/types.h>
10444#include <netdb.h>
10445#include <string.h>
10446#include <sys/socket.h>
10447#include <netinet/in.h>
10448
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010449int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010450{
10451 int passive, gaierr, inet4 = 0, inet6 = 0;
10452 struct addrinfo hints, *ai, *aitop;
10453 char straddr[INET6_ADDRSTRLEN], strport[16];
10454
10455 for (passive = 0; passive <= 1; passive++) {
10456 memset(&hints, 0, sizeof(hints));
10457 hints.ai_family = AF_UNSPEC;
10458 hints.ai_flags = passive ? AI_PASSIVE : 0;
10459 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010460 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010461 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10462 (void)gai_strerror(gaierr);
10463 goto bad;
10464 }
10465 for (ai = aitop; ai; ai = ai->ai_next) {
10466 if (ai->ai_addr == NULL ||
10467 ai->ai_addrlen == 0 ||
10468 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10469 straddr, sizeof(straddr), strport, sizeof(strport),
10470 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10471 goto bad;
10472 }
10473 switch (ai->ai_family) {
10474 case AF_INET:
10475 if (strcmp(strport, "54321") != 0) {
10476 goto bad;
10477 }
10478 if (passive) {
10479 if (strcmp(straddr, "0.0.0.0") != 0) {
10480 goto bad;
10481 }
10482 } else {
10483 if (strcmp(straddr, "127.0.0.1") != 0) {
10484 goto bad;
10485 }
10486 }
10487 inet4++;
10488 break;
10489 case AF_INET6:
10490 if (strcmp(strport, "54321") != 0) {
10491 goto bad;
10492 }
10493 if (passive) {
10494 if (strcmp(straddr, "::") != 0) {
10495 goto bad;
10496 }
10497 } else {
10498 if (strcmp(straddr, "::1") != 0) {
10499 goto bad;
10500 }
10501 }
10502 inet6++;
10503 break;
10504 case AF_UNSPEC:
10505 goto bad;
10506 break;
10507 default:
10508 /* another family support? */
10509 break;
10510 }
10511 }
10512 }
10513
10514 if (!(inet4 == 0 || inet4 == 2))
10515 goto bad;
10516 if (!(inet6 == 0 || inet6 == 2))
10517 goto bad;
10518
10519 if (aitop)
10520 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010521 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010522
10523 bad:
10524 if (aitop)
10525 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010526 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010527}
10528
Martin v. Löwis11437992002-04-12 09:54:03 +000010529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010530if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010531 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010532else
Matthias Kloseb9621712010-04-24 17:59:49 +000010533 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10536 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010538
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010539fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010540
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010542
Mark Dickinson2df5d282009-12-31 21:22:50 +000010543if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010544then
10545 if test $ipv6 = yes
10546 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010547 echo 'Fatal: You must get working getaddrinfo() function.'
10548 echo ' or you can specify "--disable-ipv6"'.
10549 exit 1
10550 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010551else
Martin v. Löwis11437992002-04-12 09:54:03 +000010552
Matthias Kloseb9621712010-04-24 17:59:49 +000010553$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010554
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010555fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010556for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010557do :
10558 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10559if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010560 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010561#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010562_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010563
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010564fi
10565done
10566
Michael W. Hudson54241132001-12-07 15:38:26 +000010567
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010568# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10570$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10571if test "${ac_cv_header_time+set}" = set; then :
10572 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010573else
Matthias Kloseb9621712010-04-24 17:59:49 +000010574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010575/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010576#include <sys/types.h>
10577#include <sys/time.h>
10578#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010579
Martin v. Löwis11437992002-04-12 09:54:03 +000010580int
10581main ()
10582{
10583if ((struct tm *) 0)
10584return 0;
10585 ;
10586 return 0;
10587}
10588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010589if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010590 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010591else
Matthias Kloseb9621712010-04-24 17:59:49 +000010592 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10597$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010598if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010599
Matthias Kloseb9621712010-04-24 17:59:49 +000010600$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010601
10602fi
10603
Matthias Kloseb9621712010-04-24 17:59:49 +000010604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10605$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10606if test "${ac_cv_struct_tm+set}" = set; then :
10607 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010608else
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010610/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010611#include <sys/types.h>
10612#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010613
Martin v. Löwis11437992002-04-12 09:54:03 +000010614int
10615main ()
10616{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010617struct tm tm;
10618 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010619 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010620 ;
10621 return 0;
10622}
10623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010624if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010625 ac_cv_struct_tm=time.h
10626else
Matthias Kloseb9621712010-04-24 17:59:49 +000010627 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010630fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10632$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010633if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010634
Matthias Kloseb9621712010-04-24 17:59:49 +000010635$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010636
10637fi
10638
Matthias Kloseb9621712010-04-24 17:59:49 +000010639ac_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 +000010640#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010641
Matthias Kloseb9621712010-04-24 17:59:49 +000010642"
10643if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010644
10645cat >>confdefs.h <<_ACEOF
10646#define HAVE_STRUCT_TM_TM_ZONE 1
10647_ACEOF
10648
10649
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010650fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010651
Martin v. Löwis11437992002-04-12 09:54:03 +000010652if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10653
Matthias Kloseb9621712010-04-24 17:59:49 +000010654$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010655
10656else
Matthias Kloseb9621712010-04-24 17:59:49 +000010657 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10658"
10659if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10660 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010661else
Matthias Kloseb9621712010-04-24 17:59:49 +000010662 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010663fi
10664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010665cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010666#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667_ACEOF
10668
Matthias Kloseb9621712010-04-24 17:59:49 +000010669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10670$as_echo_n "checking for tzname... " >&6; }
10671if test "${ac_cv_var_tzname+set}" = set; then :
10672 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010673else
Matthias Kloseb9621712010-04-24 17:59:49 +000010674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010675/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010676#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010677#if !HAVE_DECL_TZNAME
10678extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010679#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010680
Martin v. Löwis11437992002-04-12 09:54:03 +000010681int
10682main ()
10683{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010684return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010685 ;
10686 return 0;
10687}
10688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010689if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010690 ac_cv_var_tzname=yes
10691else
Matthias Kloseb9621712010-04-24 17:59:49 +000010692 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010693fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010694rm -f core conftest.err conftest.$ac_objext \
10695 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010696fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10698$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010699 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010700
Matthias Kloseb9621712010-04-24 17:59:49 +000010701$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010702
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010703 fi
10704fi
10705
Matthias Kloseb9621712010-04-24 17:59:49 +000010706ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10707if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010708
10709cat >>confdefs.h <<_ACEOF
10710#define HAVE_STRUCT_STAT_ST_RDEV 1
10711_ACEOF
10712
10713
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010714fi
10715
Matthias Kloseb9621712010-04-24 17:59:49 +000010716ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10717if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010718
Martin v. Löwis11437992002-04-12 09:54:03 +000010719cat >>confdefs.h <<_ACEOF
10720#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10721_ACEOF
10722
10723
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010724fi
10725
Matthias Kloseb9621712010-04-24 17:59:49 +000010726ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10727if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010728
10729cat >>confdefs.h <<_ACEOF
10730#define HAVE_STRUCT_STAT_ST_FLAGS 1
10731_ACEOF
10732
10733
10734fi
10735
Matthias Kloseb9621712010-04-24 17:59:49 +000010736ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10737if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010738
10739cat >>confdefs.h <<_ACEOF
10740#define HAVE_STRUCT_STAT_ST_GEN 1
10741_ACEOF
10742
10743
10744fi
10745
Matthias Kloseb9621712010-04-24 17:59:49 +000010746ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10747if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010748
10749cat >>confdefs.h <<_ACEOF
10750#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10751_ACEOF
10752
10753
10754fi
10755
Matthias Kloseb9621712010-04-24 17:59:49 +000010756ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10757if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010758
Martin v. Löwis11437992002-04-12 09:54:03 +000010759cat >>confdefs.h <<_ACEOF
10760#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10761_ACEOF
10762
10763
Matthias Kloseb9621712010-04-24 17:59:49 +000010764$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010765
10766else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010767 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010768 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010769 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10770 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010771esac
10772
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010773fi
10774
Michael W. Hudson54241132001-12-07 15:38:26 +000010775
Martin v. Löwis11437992002-04-12 09:54:03 +000010776
Matthias Kloseb9621712010-04-24 17:59:49 +000010777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10778$as_echo_n "checking for time.h that defines altzone... " >&6; }
10779if test "${ac_cv_header_time_altzone+set}" = set; then :
10780 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010781else
Matthias Kloseb159a552010-04-25 21:00:44 +000010782
Matthias Kloseb9621712010-04-24 17:59:49 +000010783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010784/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010785#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010786int
10787main ()
10788{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010789return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010790 ;
10791 return 0;
10792}
10793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010794if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010795 ac_cv_header_time_altzone=yes
10796else
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010801fi
10802
Matthias Kloseb9621712010-04-24 17:59:49 +000010803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10804$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010805if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010806
Matthias Kloseb9621712010-04-24 17:59:49 +000010807$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010808
10809fi
10810
Guido van Rossumda88dad1995-01-26 00:46:29 +000010811was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10813$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010815/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010816
10817#include <sys/types.h>
10818#include <sys/select.h>
10819#include <sys/time.h>
10820
Martin v. Löwis11437992002-04-12 09:54:03 +000010821int
10822main ()
10823{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010824;
Martin v. Löwis11437992002-04-12 09:54:03 +000010825 ;
10826 return 0;
10827}
10828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010829if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010830
10831
Matthias Kloseb9621712010-04-24 17:59:49 +000010832$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010833
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010834 was_it_defined=yes
10835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10839$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010840
Matthias Kloseb9621712010-04-24 17:59:49 +000010841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10842$as_echo_n "checking for addrinfo... " >&6; }
10843if test "${ac_cv_struct_addrinfo+set}" = set; then :
10844 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010845else
Matthias Kloseb9621712010-04-24 17:59:49 +000010846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010847/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010848#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010849int
10850main ()
10851{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010852struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010853 ;
10854 return 0;
10855}
10856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010857if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010858 ac_cv_struct_addrinfo=yes
10859else
Matthias Kloseb9621712010-04-24 17:59:49 +000010860 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10863fi
10864
Matthias Kloseb9621712010-04-24 17:59:49 +000010865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10866$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010867if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010868
Matthias Kloseb9621712010-04-24 17:59:49 +000010869$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010870
10871fi
10872
Matthias Kloseb9621712010-04-24 17:59:49 +000010873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10874$as_echo_n "checking for sockaddr_storage... " >&6; }
10875if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10876 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010877else
Matthias Kloseb9621712010-04-24 17:59:49 +000010878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010879/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010880
10881# include <sys/types.h>
10882# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010883int
10884main ()
10885{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010886struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010887 ;
10888 return 0;
10889}
10890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010891if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010892 ac_cv_struct_sockaddr_storage=yes
10893else
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10897fi
10898
Matthias Kloseb9621712010-04-24 17:59:49 +000010899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10900$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010901if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010902
Matthias Kloseb9621712010-04-24 17:59:49 +000010903$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010904
10905fi
10906
Guido van Rossum627b2d71993-12-24 10:39:16 +000010907# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010908
Matthias Kloseb9621712010-04-24 17:59:49 +000010909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10910$as_echo_n "checking whether char is unsigned... " >&6; }
10911if test "${ac_cv_c_char_unsigned+set}" = set; then :
10912 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010913else
Matthias Kloseb9621712010-04-24 17:59:49 +000010914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010916$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010917int
10918main ()
10919{
10920static int test_array [1 - 2 * !(((char) -1) < 0)];
10921test_array [0] = 0
10922
10923 ;
10924 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010925}
Martin v. Löwis11437992002-04-12 09:54:03 +000010926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010927if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010928 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010929else
Matthias Kloseb9621712010-04-24 17:59:49 +000010930 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010933fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10935$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010936if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010937 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010938
10939fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010940
Matthias Kloseb9621712010-04-24 17:59:49 +000010941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10942$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10943if test "${ac_cv_c_const+set}" = set; then :
10944 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010945else
Matthias Kloseb9621712010-04-24 17:59:49 +000010946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010947/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010948
Martin v. Löwis11437992002-04-12 09:54:03 +000010949int
10950main ()
10951{
10952/* FIXME: Include the comments suggested by Paul. */
10953#ifndef __cplusplus
10954 /* Ultrix mips cc rejects this. */
10955 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010956 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000010957 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010958 char const *const *pcpcc;
10959 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010960 /* NEC SVR4.0.2 mips cc rejects this. */
10961 struct point {int x, y;};
10962 static struct point const zero = {0,0};
10963 /* AIX XL C 1.02.0.0 rejects this.
10964 It does not let you subtract one const X* pointer from another in
10965 an arm of an if-expression whose if-part is not a constant
10966 expression */
10967 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010968 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010969 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010970 ++pcpcc;
10971 ppc = (char**) pcpcc;
10972 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010973 { /* SCO 3.2v4 cc rejects this. */
10974 char *t;
10975 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010976
Martin v. Löwis11437992002-04-12 09:54:03 +000010977 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010978 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010979 }
10980 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
10981 int x[] = {25, 17};
10982 const int *foo = &x[0];
10983 ++foo;
10984 }
10985 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10986 typedef const int *iptr;
10987 iptr p = 0;
10988 ++p;
10989 }
10990 { /* AIX XL C 1.02.0.0 rejects this saying
10991 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10992 struct s { int j; const int *ap[3]; };
10993 struct s *b; b->j = 5;
10994 }
10995 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10996 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010997 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010998 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010999 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011000#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011001
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 ;
11003 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011004}
Martin v. Löwis11437992002-04-12 09:54:03 +000011005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011006if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011007 ac_cv_c_const=yes
11008else
Matthias Kloseb9621712010-04-24 17:59:49 +000011009 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11014$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011015if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011016
Matthias Kloseb9621712010-04-24 17:59:49 +000011017$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011018
11019fi
11020
Michael W. Hudson54241132001-12-07 15:38:26 +000011021
Guido van Rossumda88dad1995-01-26 00:46:29 +000011022works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11024$as_echo_n "checking for working volatile... " >&6; }
11025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011026/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011027
Martin v. Löwis11437992002-04-12 09:54:03 +000011028int
11029main ()
11030{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011031volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011032 ;
11033 return 0;
11034}
11035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011036if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011037 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011038else
Skip Montanaro6dead952003-09-25 14:50:04 +000011039
Matthias Kloseb9621712010-04-24 17:59:49 +000011040$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011041
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011042
Guido van Rossum627b2d71993-12-24 10:39:16 +000011043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11046$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011047
Guido van Rossumda88dad1995-01-26 00:46:29 +000011048works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11050$as_echo_n "checking for working signed char... " >&6; }
11051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011052/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011053
Martin v. Löwis11437992002-04-12 09:54:03 +000011054int
11055main ()
11056{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011057signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011058 ;
11059 return 0;
11060}
11061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011062if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011063 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011064else
Skip Montanaro6dead952003-09-25 14:50:04 +000011065
Matthias Kloseb9621712010-04-24 17:59:49 +000011066$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011067
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011068
Guido van Rossum7f43da71994-08-01 12:15:30 +000011069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11072$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011073
Guido van Rossumda88dad1995-01-26 00:46:29 +000011074have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11076$as_echo_n "checking for prototypes... " >&6; }
11077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011078/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011079int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011080int
11081main ()
11082{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011083return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011084 ;
11085 return 0;
11086}
11087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011088if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011089
Matthias Kloseb9621712010-04-24 17:59:49 +000011090$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011091
Matthias Kloseb159a552010-04-25 21:00:44 +000011092 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11096$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011097
Guido van Rossumda88dad1995-01-26 00:46:29 +000011098works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11100$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011102/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011103
11104#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011105int foo(int x, ...) {
11106 va_list va;
11107 va_start(va, x);
11108 va_arg(va, int);
11109 va_arg(va, char *);
11110 va_arg(va, double);
11111 return 0;
11112}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011113
Martin v. Löwis11437992002-04-12 09:54:03 +000011114int
11115main ()
11116{
Guido van Rossum90eea071996-08-30 20:58:57 +000011117return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011118 ;
11119 return 0;
11120}
11121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011122if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011123
11124
Matthias Kloseb9621712010-04-24 17:59:49 +000011125$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011126
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011127 works=yes
11128
Guido van Rossum627b2d71993-12-24 10:39:16 +000011129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11132$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011133
Martin v. Löwisd6320502004-08-12 13:45:08 +000011134# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11136$as_echo_n "checking for socketpair... " >&6; }
11137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011138/* end confdefs.h. */
11139
11140#include <sys/types.h>
11141#include <sys/socket.h>
11142
11143int
11144main ()
11145{
11146void *x=socketpair
11147 ;
11148 return 0;
11149}
11150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011151if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011152
Matthias Kloseb9621712010-04-24 17:59:49 +000011153$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011154
Matthias Kloseb159a552010-04-25 21:00:44 +000011155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011156$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011157else
Matthias Kloseb9621712010-04-24 17:59:49 +000011158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11159$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011160
11161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011163
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011164# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11166$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011168/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011169#include <sys/types.h>
11170#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011171int
11172main ()
11173{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011174struct sockaddr x;
11175x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011176 ;
11177 return 0;
11178}
11179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011180if ac_fn_c_try_compile "$LINENO"; then :
11181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11182$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011183
Matthias Kloseb9621712010-04-24 17:59:49 +000011184$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011185
11186else
Matthias Kloseb9621712010-04-24 17:59:49 +000011187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11188$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011189
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011192
Guido van Rossumda88dad1995-01-26 00:46:29 +000011193va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11195$as_echo_n "checking whether va_list is an array... " >&6; }
11196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011197/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011198
11199#ifdef HAVE_STDARG_PROTOTYPES
11200#include <stdarg.h>
11201#else
11202#include <varargs.h>
11203#endif
11204
Martin v. Löwis11437992002-04-12 09:54:03 +000011205int
11206main ()
11207{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011208va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011209 ;
11210 return 0;
11211}
11212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011213if ac_fn_c_try_compile "$LINENO"; then :
11214
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011215else
Skip Montanaro6dead952003-09-25 14:50:04 +000011216
Martin v. Löwis11437992002-04-12 09:54:03 +000011217
Matthias Kloseb9621712010-04-24 17:59:49 +000011218$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011219
Guido van Rossumda88dad1995-01-26 00:46:29 +000011220 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011221
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11225$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011226
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011227# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011228
11229
Matthias Kloseb9621712010-04-24 17:59:49 +000011230ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11231if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011232
Matthias Kloseb9621712010-04-24 17:59:49 +000011233 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011234
Matthias Kloseb9621712010-04-24 17:59:49 +000011235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11236$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011237 OLD_CFLAGS=$CFLAGS
11238 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011240/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011241
11242# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011243
Martin v. Löwis11437992002-04-12 09:54:03 +000011244int
11245main ()
11246{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011247
11248 char *name;
11249 struct hostent *he, *res;
11250 char buffer[2048];
11251 int buflen = 2048;
11252 int h_errnop;
11253
11254 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011255
11256 ;
11257 return 0;
11258}
11259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011260if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011261
Matthias Kloseb9621712010-04-24 17:59:49 +000011262 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011263
Martin v. Löwis11437992002-04-12 09:54:03 +000011264
Matthias Kloseb9621712010-04-24 17:59:49 +000011265$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011266
Matthias Kloseb9621712010-04-24 17:59:49 +000011267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11268$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011269
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011270else
Skip Montanaro6dead952003-09-25 14:50:04 +000011271
Matthias Kloseb9621712010-04-24 17:59:49 +000011272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11273$as_echo "no" >&6; }
11274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11275$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011277/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011278
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011279# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011280
Martin v. Löwis11437992002-04-12 09:54:03 +000011281int
11282main ()
11283{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011284
11285 char *name;
11286 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011287 char buffer[2048];
11288 int buflen = 2048;
11289 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011290
Matthias Kloseb159a552010-04-25 21:00:44 +000011291 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011292
11293 ;
11294 return 0;
11295}
11296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011297if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011298
Matthias Kloseb9621712010-04-24 17:59:49 +000011299 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011300
Martin v. Löwis11437992002-04-12 09:54:03 +000011301
Matthias Kloseb159a552010-04-25 21:00:44 +000011302$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011303
Matthias Kloseb9621712010-04-24 17:59:49 +000011304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11305$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011306
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011307else
Skip Montanaro6dead952003-09-25 14:50:04 +000011308
Matthias Kloseb9621712010-04-24 17:59:49 +000011309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11310$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11312$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11314/* end confdefs.h. */
11315
11316# include <netdb.h>
11317
11318int
11319main ()
11320{
11321
11322 char *name;
11323 struct hostent *he;
11324 struct hostent_data data;
11325
11326 (void) gethostbyname_r(name, he, &data);
11327
11328 ;
11329 return 0;
11330}
11331_ACEOF
11332if ac_fn_c_try_compile "$LINENO"; then :
11333
11334 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11335
11336
11337$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11338
11339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11340$as_echo "yes" >&6; }
11341
11342else
11343
11344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11345$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011346
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011349
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011352
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011355 CFLAGS=$OLD_CFLAGS
11356
11357else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011358
Matthias Kloseb9621712010-04-24 17:59:49 +000011359 for ac_func in gethostbyname
11360do :
11361 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11362if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011363 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011364#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011365_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011366
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011367fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011368done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011369
Michael W. Hudson54241132001-12-07 15:38:26 +000011370
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011371fi
11372
Michael W. Hudson54241132001-12-07 15:38:26 +000011373
11374
11375
11376
11377
11378
Guido van Rossum627b2d71993-12-24 10:39:16 +000011379# checks for system services
11380# (none yet)
11381
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011382# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011383ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11384if test "x$ac_cv_func___fpu_control" = x""yes; then :
11385
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011386else
Matthias Kloseb9621712010-04-24 17:59:49 +000011387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11388$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11389if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11390 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011391else
Martin v. Löwis11437992002-04-12 09:54:03 +000011392 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011393LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011397/* Override any GCC internal prototype to avoid an error.
11398 Use char because int might match the return type of a GCC
11399 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011400#ifdef __cplusplus
11401extern "C"
11402#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011403char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011404int
11405main ()
11406{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011407return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011408 ;
11409 return 0;
11410}
11411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011412if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011413 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011414else
Matthias Kloseb9621712010-04-24 17:59:49 +000011415 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011417rm -f core conftest.err conftest.$ac_objext \
11418 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011419LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11422$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11423if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 cat >>confdefs.h <<_ACEOF
11425#define HAVE_LIBIEEE 1
11426_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011427
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011428 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011429
Guido van Rossum627b2d71993-12-24 10:39:16 +000011430fi
11431
Michael W. Hudson54241132001-12-07 15:38:26 +000011432
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011433fi
11434
Michael W. Hudson54241132001-12-07 15:38:26 +000011435
Guido van Rossum7f253911997-05-09 02:42:48 +000011436# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11438$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011440# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011441if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011442 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011443if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011444then
11445
Matthias Kloseb9621712010-04-24 17:59:49 +000011446$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011447
Matthias Kloseb9621712010-04-24 17:59:49 +000011448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11449$as_echo "yes" >&6; }
11450else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11451$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011452fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011453else
Matthias Kloseb9621712010-04-24 17:59:49 +000011454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11455$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011456fi
11457
Guido van Rossum7f253911997-05-09 02:42:48 +000011458
Guido van Rossum7f43da71994-08-01 12:15:30 +000011459# check for --with-libm=...
11460
Guido van Rossum563e7081996-09-10 18:20:48 +000011461case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011462Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011463*) LIBM=-lm
11464esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11466$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011467
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011468# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011469if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011470 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011471if test "$withval" = no
11472then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11474$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011475elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011476then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11478$as_echo "set LIBM=\"$withval\"" >&6; }
11479else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011480fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011481else
Matthias Kloseb9621712010-04-24 17:59:49 +000011482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11483$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011484fi
11485
Guido van Rossum7f43da71994-08-01 12:15:30 +000011486
11487# check for --with-libc=...
11488
Matthias Kloseb9621712010-04-24 17:59:49 +000011489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11490$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011492# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011493if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011494 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011495if test "$withval" = no
11496then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11498$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011499elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011500then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11502$as_echo "set LIBC=\"$withval\"" >&6; }
11503else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011504fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011505else
Matthias Kloseb9621712010-04-24 17:59:49 +000011506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11507$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011508fi
11509
Guido van Rossum7f43da71994-08-01 12:15:30 +000011510
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011511# **************************************************
11512# * Check for various properties of floating point *
11513# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011514
Matthias Kloseb9621712010-04-24 17:59:49 +000011515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11516$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11517if test "${ac_cv_little_endian_double+set}" = set; then :
11518 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011519else
11520
Matthias Kloseb9621712010-04-24 17:59:49 +000011521if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011522 ac_cv_little_endian_double=no
11523else
Matthias Kloseb9621712010-04-24 17:59:49 +000011524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011525/* end confdefs.h. */
11526
11527#include <string.h>
11528int main() {
11529 double x = 9006104071832581.0;
11530 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11531 return 0;
11532 else
11533 return 1;
11534}
11535
11536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011537if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011538 ac_cv_little_endian_double=yes
11539else
Matthias Kloseb9621712010-04-24 17:59:49 +000011540 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011542rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11543 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011544fi
11545
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011546fi
11547
Matthias Kloseb9621712010-04-24 17:59:49 +000011548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11549$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011550if test "$ac_cv_little_endian_double" = yes
11551then
11552
Matthias Kloseb9621712010-04-24 17:59:49 +000011553$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011554
11555fi
11556
Matthias Kloseb9621712010-04-24 17:59:49 +000011557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11558$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11559if test "${ac_cv_big_endian_double+set}" = set; then :
11560 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011561else
11562
Matthias Kloseb9621712010-04-24 17:59:49 +000011563if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011564 ac_cv_big_endian_double=no
11565else
Matthias Kloseb9621712010-04-24 17:59:49 +000011566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011567/* end confdefs.h. */
11568
11569#include <string.h>
11570int main() {
11571 double x = 9006104071832581.0;
11572 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11573 return 0;
11574 else
11575 return 1;
11576}
11577
11578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011579if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011580 ac_cv_big_endian_double=yes
11581else
Matthias Kloseb9621712010-04-24 17:59:49 +000011582 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11585 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011586fi
11587
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011588fi
11589
Matthias Kloseb9621712010-04-24 17:59:49 +000011590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11591$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011592if test "$ac_cv_big_endian_double" = yes
11593then
11594
Matthias Kloseb9621712010-04-24 17:59:49 +000011595$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011596
11597fi
11598
11599# Some ARM platforms use a mixed-endian representation for doubles.
11600# While Python doesn't currently have full support for these platforms
11601# (see e.g., issue 1762561), we can at least make sure that float <-> string
11602# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11604$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11605if test "${ac_cv_mixed_endian_double+set}" = set; then :
11606 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011607else
11608
Matthias Kloseb9621712010-04-24 17:59:49 +000011609if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011610 ac_cv_mixed_endian_double=no
11611else
Matthias Kloseb9621712010-04-24 17:59:49 +000011612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011613/* end confdefs.h. */
11614
11615#include <string.h>
11616int main() {
11617 double x = 9006104071832581.0;
11618 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11619 return 0;
11620 else
11621 return 1;
11622}
11623
11624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011625if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011626 ac_cv_mixed_endian_double=yes
11627else
Matthias Kloseb9621712010-04-24 17:59:49 +000011628 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011629fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011630rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11631 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011632fi
11633
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011634fi
11635
Matthias Kloseb9621712010-04-24 17:59:49 +000011636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11637$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011638if test "$ac_cv_mixed_endian_double" = yes
11639then
11640
Matthias Kloseb9621712010-04-24 17:59:49 +000011641$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011642
11643fi
11644
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011645# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011646# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011647# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011648# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011649# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011650# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011651
11652# This inline assembler syntax may also work for suncc and icc,
11653# so we try it on all platforms.
11654
Matthias Kloseb9621712010-04-24 17:59:49 +000011655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11656$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011658/* end confdefs.h. */
11659
11660int
11661main ()
11662{
11663
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011664 unsigned short cw;
11665 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11666 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011667
11668 ;
11669 return 0;
11670}
11671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011672if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011673 have_gcc_asm_for_x87=yes
11674else
Matthias Kloseb9621712010-04-24 17:59:49 +000011675 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011676fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11679$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011680if test "$have_gcc_asm_for_x87" = yes
11681then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011682
Matthias Kloseb9621712010-04-24 17:59:49 +000011683$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011684
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011685fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011686
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011687# Detect whether system arithmetic is subject to x87-style double
11688# rounding issues. The result of this test has little meaning on non
11689# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11690# mode is round-to-nearest and double rounding issues are present, and
11691# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11693$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011694# $BASECFLAGS may affect the result
11695ac_save_cc="$CC"
11696CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011697if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011698 ac_cv_x87_double_rounding=no
11699else
Matthias Kloseb9621712010-04-24 17:59:49 +000011700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011701/* end confdefs.h. */
11702
11703#include <stdlib.h>
11704#include <math.h>
11705int main() {
11706 volatile double x, y, z;
11707 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11708 x = 0.99999999999999989; /* 1-2**-53 */
11709 y = 1./x;
11710 if (y != 1.)
11711 exit(0);
11712 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11713 x = 1e16;
11714 y = 2.99999;
11715 z = x + y;
11716 if (z != 1e16+4.)
11717 exit(0);
11718 /* both tests show evidence of double rounding */
11719 exit(1);
11720}
11721
11722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011723if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011724 ac_cv_x87_double_rounding=no
11725else
Matthias Kloseb9621712010-04-24 17:59:49 +000011726 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011728rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11729 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011730fi
11731
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011732CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11734$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011735if test "$ac_cv_x87_double_rounding" = yes
11736then
11737
Matthias Kloseb9621712010-04-24 17:59:49 +000011738$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011739
11740fi
11741
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011742# ************************************
11743# * Check for mathematical functions *
11744# ************************************
11745
11746LIBS_SAVE=$LIBS
11747LIBS="$LIBS $LIBM"
11748
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011749# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11750# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11752$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11753if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11754 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011755else
11756
Matthias Kloseb9621712010-04-24 17:59:49 +000011757if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011758 ac_cv_tanh_preserves_zero_sign=no
11759else
Matthias Kloseb9621712010-04-24 17:59:49 +000011760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011761/* end confdefs.h. */
11762
11763#include <math.h>
11764#include <stdlib.h>
11765int main() {
11766 /* return 0 if either negative zeros don't exist
11767 on this platform or if negative zeros exist
11768 and tanh(-0.) == -0. */
11769 if (atan2(0., -1.) == atan2(-0., -1.) ||
11770 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11771 else exit(1);
11772}
11773
11774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011775if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011776 ac_cv_tanh_preserves_zero_sign=yes
11777else
Matthias Kloseb9621712010-04-24 17:59:49 +000011778 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11781 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011782fi
11783
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011784fi
11785
Matthias Kloseb9621712010-04-24 17:59:49 +000011786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11787$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011788if test "$ac_cv_tanh_preserves_zero_sign" = yes
11789then
11790
Matthias Kloseb9621712010-04-24 17:59:49 +000011791$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011792
11793fi
11794
Mark Dickinson9c113362009-09-05 10:36:23 +000011795for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011796do :
11797 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11798ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11799eval as_val=\$$as_ac_var
11800 if test "x$as_val" = x""yes; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011801 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011802#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011803_ACEOF
11804
11805fi
11806done
11807
Mark Dickinson9c113362009-09-05 10:36:23 +000011808for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011809do :
11810 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11811ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11812eval as_val=\$$as_ac_var
11813 if test "x$as_val" = x""yes; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011814 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011815#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011816_ACEOF
11817
11818fi
11819done
11820
Matthias Kloseb9621712010-04-24 17:59:49 +000011821ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11822"
11823if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11824 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011825else
Matthias Kloseb9621712010-04-24 17:59:49 +000011826 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011827fi
11828
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011829cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011830#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011832ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11833"
11834if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11835 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011836else
Matthias Kloseb9621712010-04-24 17:59:49 +000011837 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011838fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011839
11840cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011841#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011843ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11844"
11845if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11846 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011847else
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011849fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011850
11851cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011852#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011853_ACEOF
11854
11855
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011856LIBS=$LIBS_SAVE
11857
Mark Dickinsona614f042009-11-28 12:48:43 +000011858# For multiprocessing module, check that sem_open
11859# actually works. For FreeBSD versions <= 7.2,
11860# the kernel module that provides POSIX semaphores
11861# isn't loaded by default, so an attempt to call
11862# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11864$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11865if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11866 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011867else
Matthias Kloseb9621712010-04-24 17:59:49 +000011868 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011869 ac_cv_posix_semaphores_enabled=yes
11870else
Matthias Kloseb9621712010-04-24 17:59:49 +000011871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011872/* end confdefs.h. */
11873
11874#include <unistd.h>
11875#include <fcntl.h>
11876#include <stdio.h>
11877#include <semaphore.h>
11878#include <sys/stat.h>
11879
11880int main(void) {
11881 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11882 if (a == SEM_FAILED) {
11883 perror("sem_open");
11884 return 1;
11885 }
11886 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011887 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011888 return 0;
11889}
11890
11891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011892if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011893 ac_cv_posix_semaphores_enabled=yes
11894else
Matthias Kloseb9621712010-04-24 17:59:49 +000011895 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11898 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011899fi
11900
11901
Mark Dickinsona614f042009-11-28 12:48:43 +000011902fi
11903
Matthias Kloseb9621712010-04-24 17:59:49 +000011904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11905$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011906if test $ac_cv_posix_semaphores_enabled = no
11907then
11908
Matthias Kloseb9621712010-04-24 17:59:49 +000011909$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011910
11911fi
11912
Mark Dickinson10683072009-04-18 21:18:19 +000011913# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11915$as_echo_n "checking for broken sem_getvalue... " >&6; }
11916if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11917 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011918else
Matthias Kloseb9621712010-04-24 17:59:49 +000011919 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011920 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000011921else
Matthias Kloseb9621712010-04-24 17:59:49 +000011922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011923/* end confdefs.h. */
11924
11925#include <unistd.h>
11926#include <fcntl.h>
11927#include <stdio.h>
11928#include <semaphore.h>
11929#include <sys/stat.h>
11930
11931int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000011932 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000011933 int count;
11934 int res;
11935 if(a==SEM_FAILED){
11936 perror("sem_open");
11937 return 1;
11938
11939 }
11940 res = sem_getvalue(a, &count);
11941 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011942 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000011943 return res==-1 ? 1 : 0;
11944}
11945
Mark Dickinson10683072009-04-18 21:18:19 +000011946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011947if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011948 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000011949else
Matthias Kloseb9621712010-04-24 17:59:49 +000011950 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011951fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11953 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011954fi
11955
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011956
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011957fi
11958
Matthias Kloseb9621712010-04-24 17:59:49 +000011959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
11960$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011961if test $ac_cv_broken_sem_getvalue = yes
11962then
11963
Matthias Kloseb9621712010-04-24 17:59:49 +000011964$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011965
11966fi
11967
Mark Dickinsonbd792642009-03-18 20:06:12 +000011968# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000011969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
11970$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011971# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011972if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000011973 enableval=$enable_big_digits; case $enable_big_digits in
11974yes)
11975 enable_big_digits=30 ;;
11976no)
11977 enable_big_digits=15 ;;
1197815|30)
11979 ;;
11980*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011981 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 +000011982esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
11984$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011985
11986cat >>confdefs.h <<_ACEOF
11987#define PYLONG_BITS_IN_DIGIT $enable_big_digits
11988_ACEOF
11989
11990
11991else
Matthias Kloseb9621712010-04-24 17:59:49 +000011992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
11993$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011994fi
11995
11996
Guido van Rossumef2255b2000-03-10 22:30:29 +000011997# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011998ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
11999if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012000
12001
Matthias Kloseb9621712010-04-24 17:59:49 +000012002$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012003
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012004 wchar_h="yes"
12005
Guido van Rossumef2255b2000-03-10 22:30:29 +000012006else
Martin v. Löwis11437992002-04-12 09:54:03 +000012007 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012008
12009fi
12010
Michael W. Hudson54241132001-12-07 15:38:26 +000012011
Martin v. Löwis11437992002-04-12 09:54:03 +000012012
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012013# determine wchar_t size
12014if test "$wchar_h" = yes
12015then
Matthias Kloseb9621712010-04-24 17:59:49 +000012016 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012017# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12018# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12019# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12021$as_echo_n "checking size of wchar_t... " >&6; }
12022if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12023 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012024else
Matthias Kloseb9621712010-04-24 17:59:49 +000012025 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12026"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012027
Martin v. Löwis11437992002-04-12 09:54:03 +000012028else
Matthias Kloseb9621712010-04-24 17:59:49 +000012029 if test "$ac_cv_type_wchar_t" = yes; then
12030 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12032{ as_fn_set_status 77
12033as_fn_error "cannot compute sizeof (wchar_t)
12034See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012035 else
12036 ac_cv_sizeof_wchar_t=0
12037 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012039
Martin v. Löwis11437992002-04-12 09:54:03 +000012040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12042$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012043
12044
12045
Martin v. Löwis11437992002-04-12 09:54:03 +000012046cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012047#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012048_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012049
Michael W. Hudson54241132001-12-07 15:38:26 +000012050
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012051fi
12052
Matthias Kloseb9621712010-04-24 17:59:49 +000012053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12054$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012055have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012057/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012058
12059#include <tcl.h>
12060#if TCL_UTF_MAX != 6
12061# error "NOT UCS4_TCL"
12062#endif
12063int
12064main ()
12065{
12066
12067 ;
12068 return 0;
12069}
12070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012071if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012072
12073
Matthias Kloseb9621712010-04-24 17:59:49 +000012074$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012075
12076 have_ucs4_tcl=yes
12077
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12081$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012082
Skip Montanaro6dead952003-09-25 14:50:04 +000012083# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012084if test "$wchar_h" = yes
12085then
12086 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12088$as_echo_n "checking whether wchar_t is signed... " >&6; }
12089 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12090 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012091else
12092
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012094 ac_cv_wchar_t_signed=yes
12095else
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012097/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012098
12099 #include <wchar.h>
12100 int main()
12101 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012102 /* Success: exit code 0 */
12103 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012104 }
12105
12106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012107if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012108 ac_cv_wchar_t_signed=yes
12109else
Matthias Kloseb9621712010-04-24 17:59:49 +000012110 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12113 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012114fi
12115
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012116fi
12117
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12119$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012120fi
12121
Matthias Kloseb9621712010-04-24 17:59:49 +000012122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12123$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012124
12125# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012126if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012127 withval=$with_wide_unicode;
12128if test "$withval" != no
12129then unicode_size="4"
12130else unicode_size="2"
12131fi
12132
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012133else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012134
Georg Brandl52d168a2008-01-07 18:10:24 +000012135case "$have_ucs4_tcl" in
12136 yes) unicode_size="4" ;;
12137 *) unicode_size="2" ;;
12138esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012139
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012140fi
12141
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012142
12143
Georg Brandl52d168a2008-01-07 18:10:24 +000012144case "$unicode_size" in
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 4) $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012146 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012148 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012149esac
12150
Michael W. Hudson54241132001-12-07 15:38:26 +000012151
Martin v. Löwis11437992002-04-12 09:54:03 +000012152
Georg Brandl52d168a2008-01-07 18:10:24 +000012153# wchar_t is only usable if it maps to an unsigned type
12154if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012155 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012156then
12157 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012158
Matthias Kloseb9621712010-04-24 17:59:49 +000012159$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012160
Matthias Kloseb9621712010-04-24 17:59:49 +000012161 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012162
Georg Brandl52d168a2008-01-07 18:10:24 +000012163elif test "$ac_cv_sizeof_short" = "$unicode_size"
12164then
12165 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012167
Georg Brandl52d168a2008-01-07 18:10:24 +000012168elif test "$ac_cv_sizeof_long" = "$unicode_size"
12169then
12170 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012171 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012172
Georg Brandl52d168a2008-01-07 18:10:24 +000012173else
12174 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12177$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012178
12179# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12181$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12182if test "${ac_cv_c_bigendian+set}" = set; then :
12183 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012184else
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 ac_cv_c_bigendian=unknown
12186 # See if we're dealing with a universal compiler.
12187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12188/* end confdefs.h. */
12189#ifndef __APPLE_CC__
12190 not a universal capable compiler
12191 #endif
12192 typedef int dummy;
12193
Skip Montanaro6dead952003-09-25 14:50:04 +000012194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012195if ac_fn_c_try_compile "$LINENO"; then :
12196
12197 # Check for potential -arch flags. It is not universal unless
12198 # there are at least two -arch flags with different values.
12199 ac_arch=
12200 ac_prev=
12201 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12202 if test -n "$ac_prev"; then
12203 case $ac_word in
12204 i?86 | x86_64 | ppc | ppc64)
12205 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12206 ac_arch=$ac_word
12207 else
12208 ac_cv_c_bigendian=universal
12209 break
12210 fi
12211 ;;
12212 esac
12213 ac_prev=
12214 elif test "x$ac_word" = "x-arch"; then
12215 ac_prev=arch
12216 fi
12217 done
12218fi
12219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12220 if test $ac_cv_c_bigendian = unknown; then
12221 # See if sys/param.h defines the BYTE_ORDER macro.
12222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012223/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012224#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012225 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012226
Martin v. Löwis11437992002-04-12 09:54:03 +000012227int
12228main ()
12229{
Matthias Kloseb9621712010-04-24 17:59:49 +000012230#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12231 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12232 && LITTLE_ENDIAN)
12233 bogus endian macros
12234 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012235
12236 ;
12237 return 0;
12238}
12239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012240if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012241 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012243/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012244#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012246
Martin v. Löwis11437992002-04-12 09:54:03 +000012247int
12248main ()
12249{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012250#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012251 not big endian
12252 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012253
12254 ;
12255 return 0;
12256}
12257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012258if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012259 ac_cv_c_bigendian=yes
12260else
Matthias Kloseb9621712010-04-24 17:59:49 +000012261 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012264fi
12265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12266 fi
12267 if test $ac_cv_c_bigendian = unknown; then
12268 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012270/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012271#include <limits.h>
12272
Martin v. Löwis11437992002-04-12 09:54:03 +000012273int
12274main ()
12275{
Matthias Kloseb9621712010-04-24 17:59:49 +000012276#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12277 bogus endian macros
12278 #endif
12279
Martin v. Löwis11437992002-04-12 09:54:03 +000012280 ;
12281 return 0;
12282}
12283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012284if ac_fn_c_try_compile "$LINENO"; then :
12285 # It does; now see whether it defined to _BIG_ENDIAN or not.
12286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12287/* end confdefs.h. */
12288#include <limits.h>
12289
12290int
12291main ()
12292{
12293#ifndef _BIG_ENDIAN
12294 not big endian
12295 #endif
12296
12297 ;
12298 return 0;
12299}
12300_ACEOF
12301if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012302 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012303else
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12307fi
12308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12309 fi
12310 if test $ac_cv_c_bigendian = unknown; then
12311 # Compile a test program.
12312 if test "$cross_compiling" = yes; then :
12313 # Try to guess by grepping values from an object file.
12314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12315/* end confdefs.h. */
12316short int ascii_mm[] =
12317 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12318 short int ascii_ii[] =
12319 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12320 int use_ascii (int i) {
12321 return ascii_mm[i] + ascii_ii[i];
12322 }
12323 short int ebcdic_ii[] =
12324 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12325 short int ebcdic_mm[] =
12326 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12327 int use_ebcdic (int i) {
12328 return ebcdic_mm[i] + ebcdic_ii[i];
12329 }
12330 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012331
Matthias Kloseb9621712010-04-24 17:59:49 +000012332int
12333main ()
12334{
12335return use_ascii (foo) == use_ebcdic (foo);
12336 ;
12337 return 0;
12338}
12339_ACEOF
12340if ac_fn_c_try_compile "$LINENO"; then :
12341 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12342 ac_cv_c_bigendian=yes
12343 fi
12344 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12345 if test "$ac_cv_c_bigendian" = unknown; then
12346 ac_cv_c_bigendian=no
12347 else
12348 # finding both strings is unlikely to happen, but who knows?
12349 ac_cv_c_bigendian=unknown
12350 fi
12351 fi
12352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012354else
Matthias Kloseb9621712010-04-24 17:59:49 +000012355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012356/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012357$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012358int
12359main ()
12360{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012361
Matthias Kloseb9621712010-04-24 17:59:49 +000012362 /* Are we little or big endian? From Harbison&Steele. */
12363 union
12364 {
12365 long int l;
12366 char c[sizeof (long int)];
12367 } u;
12368 u.l = 1;
12369 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012370
12371 ;
12372 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012373}
Martin v. Löwis11437992002-04-12 09:54:03 +000012374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012375if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012376 ac_cv_c_bigendian=no
12377else
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012380rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12381 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012383
Matthias Kloseb9621712010-04-24 17:59:49 +000012384 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12387$as_echo "$ac_cv_c_bigendian" >&6; }
12388 case $ac_cv_c_bigendian in #(
12389 yes)
12390 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12391;; #(
12392 no)
12393 ;; #(
12394 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012395
Matthias Kloseb9621712010-04-24 17:59:49 +000012396$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012397
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 ;; #(
12399 *)
12400 as_fn_error "unknown endianness
12401 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12402 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012403
Michael W. Hudson54241132001-12-07 15:38:26 +000012404
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012405# Check whether right shifting a negative integer extends the sign bit
12406# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12408$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12409if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12410 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012411else
Martin v. Löwis11437992002-04-12 09:54:03 +000012412
Matthias Kloseb9621712010-04-24 17:59:49 +000012413if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012414 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012415else
Matthias Kloseb9621712010-04-24 17:59:49 +000012416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012417/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012418
12419int main()
12420{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012421 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012422}
12423
Martin v. Löwis11437992002-04-12 09:54:03 +000012424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012425if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012426 ac_cv_rshift_extends_sign=yes
12427else
Matthias Kloseb9621712010-04-24 17:59:49 +000012428 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012429fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12431 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012432fi
12433
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012434fi
12435
Matthias Kloseb9621712010-04-24 17:59:49 +000012436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12437$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012438if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012439then
Martin v. Löwis11437992002-04-12 09:54:03 +000012440
Matthias Kloseb9621712010-04-24 17:59:49 +000012441$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012442
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012443fi
12444
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012445# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12447$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12448if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12449 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012450else
Martin v. Löwis11437992002-04-12 09:54:03 +000012451
Matthias Kloseb9621712010-04-24 17:59:49 +000012452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012453/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012454#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012455int
12456main ()
12457{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012458
12459 FILE *f = fopen("/dev/null", "r");
12460 flockfile(f);
12461 getc_unlocked(f);
12462 funlockfile(f);
12463
Martin v. Löwis11437992002-04-12 09:54:03 +000012464 ;
12465 return 0;
12466}
12467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012468if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012469 ac_cv_have_getc_unlocked=yes
12470else
Matthias Kloseb9621712010-04-24 17:59:49 +000012471 ac_cv_have_getc_unlocked=no
12472fi
12473rm -f core conftest.err conftest.$ac_objext \
12474 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012475fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012476
Matthias Kloseb9621712010-04-24 17:59:49 +000012477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12478$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012479if test "$ac_cv_have_getc_unlocked" = yes
12480then
Martin v. Löwis11437992002-04-12 09:54:03 +000012481
Matthias Kloseb9621712010-04-24 17:59:49 +000012482$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012483
12484fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012485
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012486# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012487# save the value of LIBS so we don't actually link Python with readline
12488LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012489
Gregory P. Smith18820942008-09-07 06:24:49 +000012490# On some systems we need to link readline to a termcap compatible
12491# library. NOTE: Keep the precedence of listed libraries synchronised
12492# with setup.py.
12493py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12495$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012496for py_libtermcap in "" ncursesw ncurses curses termcap; do
12497 if test -z "$py_libtermcap"; then
12498 READLINE_LIBS="-lreadline"
12499 else
12500 READLINE_LIBS="-lreadline -l$py_libtermcap"
12501 fi
12502 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012504/* end confdefs.h. */
12505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012506/* Override any GCC internal prototype to avoid an error.
12507 Use char because int might match the return type of a GCC
12508 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012509#ifdef __cplusplus
12510extern "C"
12511#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012512char readline ();
12513int
12514main ()
12515{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012516return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012517 ;
12518 return 0;
12519}
12520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012521if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012522 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012524rm -f core conftest.err conftest.$ac_objext \
12525 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012526 if test $py_cv_lib_readline = yes; then
12527 break
12528 fi
12529done
12530# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12531#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012532if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12534$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012535else
Matthias Kloseb9621712010-04-24 17:59:49 +000012536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12537$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012538
Matthias Kloseb9621712010-04-24 17:59:49 +000012539$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012540
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012541fi
12542
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012543# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12545$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12546if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12547 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012548else
12549 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012550LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012552/* end confdefs.h. */
12553
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012554/* Override any GCC internal prototype to avoid an error.
12555 Use char because int might match the return type of a GCC
12556 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012557#ifdef __cplusplus
12558extern "C"
12559#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012560char rl_callback_handler_install ();
12561int
12562main ()
12563{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012564return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012565 ;
12566 return 0;
12567}
12568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012569if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012570 ac_cv_lib_readline_rl_callback_handler_install=yes
12571else
Matthias Kloseb9621712010-04-24 17:59:49 +000012572 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012573fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012574rm -f core conftest.err conftest.$ac_objext \
12575 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012576LIBS=$ac_check_lib_save_LIBS
12577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12579$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12580if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012581
Matthias Kloseb9621712010-04-24 17:59:49 +000012582$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012583
12584fi
12585
12586
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012587# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012589/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012590#include <readline/readline.h>
12591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012592if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012593 have_readline=yes
12594else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012595 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012596
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012597fi
12598rm -f conftest.err conftest.$ac_ext
12599if test $have_readline = yes
12600then
Matthias Kloseb9621712010-04-24 17:59:49 +000012601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012602/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012603#include <readline/readline.h>
12604
12605_ACEOF
12606if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012607 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012608
Matthias Kloseb9621712010-04-24 17:59:49 +000012609$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012610
12611fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012612rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012613
Matthias Kloseb9621712010-04-24 17:59:49 +000012614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012615/* end confdefs.h. */
12616#include <readline/readline.h>
12617
12618_ACEOF
12619if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012620 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012621
Matthias Kloseb9621712010-04-24 17:59:49 +000012622$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012623
12624fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012625rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012626
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012627fi
12628
Martin v. Löwis0daad592001-09-30 21:09:59 +000012629# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12631$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12632if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12633 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012634else
Martin v. Löwis11437992002-04-12 09:54:03 +000012635 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012636LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012640/* Override any GCC internal prototype to avoid an error.
12641 Use char because int might match the return type of a GCC
12642 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012643#ifdef __cplusplus
12644extern "C"
12645#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012646char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012647int
12648main ()
12649{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012650return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012651 ;
12652 return 0;
12653}
12654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012655if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012657else
Matthias Kloseb9621712010-04-24 17:59:49 +000012658 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012660rm -f core conftest.err conftest.$ac_objext \
12661 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012662LIBS=$ac_check_lib_save_LIBS
12663fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12665$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12666if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012667
Matthias Kloseb9621712010-04-24 17:59:49 +000012668$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012669
Martin v. Löwis0daad592001-09-30 21:09:59 +000012670fi
12671
Michael W. Hudson54241132001-12-07 15:38:26 +000012672
Thomas Wouters89d996e2007-09-08 17:39:28 +000012673# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12675$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12676if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12677 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012678else
12679 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012680LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012682/* end confdefs.h. */
12683
12684/* Override any GCC internal prototype to avoid an error.
12685 Use char because int might match the return type of a GCC
12686 builtin and then its argument prototype would still apply. */
12687#ifdef __cplusplus
12688extern "C"
12689#endif
12690char rl_completion_display_matches_hook ();
12691int
12692main ()
12693{
12694return rl_completion_display_matches_hook ();
12695 ;
12696 return 0;
12697}
12698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012699if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012700 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12701else
Matthias Kloseb9621712010-04-24 17:59:49 +000012702 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012704rm -f core conftest.err conftest.$ac_objext \
12705 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012706LIBS=$ac_check_lib_save_LIBS
12707fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12709$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12710if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012711
Matthias Kloseb9621712010-04-24 17:59:49 +000012712$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012713
12714fi
12715
12716
Martin v. Löwis0daad592001-09-30 21:09:59 +000012717# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12719$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12720if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12721 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012722else
Martin v. Löwis11437992002-04-12 09:54:03 +000012723 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012724LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012728/* Override any GCC internal prototype to avoid an error.
12729 Use char because int might match the return type of a GCC
12730 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012731#ifdef __cplusplus
12732extern "C"
12733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012734char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012735int
12736main ()
12737{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012738return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012739 ;
12740 return 0;
12741}
12742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012743if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012744 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012745else
Matthias Kloseb9621712010-04-24 17:59:49 +000012746 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012747fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012748rm -f core conftest.err conftest.$ac_objext \
12749 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012750LIBS=$ac_check_lib_save_LIBS
12751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12753$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12754if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012755
Matthias Kloseb9621712010-04-24 17:59:49 +000012756$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012757
Guido van Rossum353ae582001-07-10 16:45:32 +000012758fi
12759
Jack Jansendd19cf82001-12-06 22:36:17 +000012760
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012761# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012763/* end confdefs.h. */
12764#include <readline/readline.h>
12765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012766if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012767 have_readline=yes
12768else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012769 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012770
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012771fi
12772rm -f conftest.err conftest.$ac_ext
12773if test $have_readline = yes
12774then
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012776/* end confdefs.h. */
12777#include <readline/readline.h>
12778
12779_ACEOF
12780if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012781 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012782
Matthias Kloseb9621712010-04-24 17:59:49 +000012783$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012784
12785fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012786rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012787
12788fi
12789
Martin v. Löwis82bca632006-02-10 20:49:30 +000012790# End of readline checks: restore LIBS
12791LIBS=$LIBS_no_readline
12792
Matthias Kloseb9621712010-04-24 17:59:49 +000012793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12794$as_echo_n "checking for broken nice()... " >&6; }
12795if test "${ac_cv_broken_nice+set}" = set; then :
12796 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012797else
Martin v. Löwis11437992002-04-12 09:54:03 +000012798
Matthias Kloseb9621712010-04-24 17:59:49 +000012799if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012800 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012801else
Matthias Kloseb9621712010-04-24 17:59:49 +000012802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012803/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012804
12805int main()
12806{
12807 int val1 = nice(1);
12808 if (val1 != -1 && val1 == nice(2))
12809 exit(0);
12810 exit(1);
12811}
12812
Martin v. Löwis11437992002-04-12 09:54:03 +000012813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012814if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012815 ac_cv_broken_nice=yes
12816else
Matthias Kloseb9621712010-04-24 17:59:49 +000012817 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012819rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12820 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012821fi
12822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012823fi
12824
Matthias Kloseb9621712010-04-24 17:59:49 +000012825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12826$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012827if test "$ac_cv_broken_nice" = yes
12828then
Martin v. Löwis11437992002-04-12 09:54:03 +000012829
Matthias Kloseb9621712010-04-24 17:59:49 +000012830$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012831
12832fi
12833
Matthias Kloseb9621712010-04-24 17:59:49 +000012834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12835$as_echo_n "checking for broken poll()... " >&6; }
12836if test "${ac_cv_broken_poll+set}" = set; then :
12837 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012838else
Matthias Kloseb9621712010-04-24 17:59:49 +000012839 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012840 ac_cv_broken_poll=no
12841else
Matthias Kloseb9621712010-04-24 17:59:49 +000012842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012843/* end confdefs.h. */
12844
12845#include <poll.h>
12846
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012847int main()
12848{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012849 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012850 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012851
12852 close (42);
12853
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012854 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012855 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012856 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012857 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012858 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012859 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012860 return 1;
12861}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012862
12863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012864if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012865 ac_cv_broken_poll=yes
12866else
Matthias Kloseb9621712010-04-24 17:59:49 +000012867 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12870 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012872
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012873fi
12874
Matthias Kloseb9621712010-04-24 17:59:49 +000012875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
12876$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012877if test "$ac_cv_broken_poll" = yes
12878then
12879
Matthias Kloseb9621712010-04-24 17:59:49 +000012880$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012881
12882fi
12883
Brett Cannon43802422005-02-10 20:48:03 +000012884# 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 +000012885# (which is not required by ISO C or UNIX spec) and/or if we support
12886# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000012887ac_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 +000012888#include <$ac_cv_struct_tm>
12889
Matthias Kloseb9621712010-04-24 17:59:49 +000012890"
12891if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000012892
12893cat >>confdefs.h <<_ACEOF
12894#define HAVE_STRUCT_TM_TM_ZONE 1
12895_ACEOF
12896
12897
12898fi
12899
12900if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12901
Matthias Kloseb9621712010-04-24 17:59:49 +000012902$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012903
12904else
Matthias Kloseb9621712010-04-24 17:59:49 +000012905 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12906"
12907if test "x$ac_cv_have_decl_tzname" = x""yes; then :
12908 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909else
Matthias Kloseb9621712010-04-24 17:59:49 +000012910 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911fi
12912
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012914#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012915_ACEOF
12916
Matthias Kloseb9621712010-04-24 17:59:49 +000012917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12918$as_echo_n "checking for tzname... " >&6; }
12919if test "${ac_cv_var_tzname+set}" = set; then :
12920 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012921else
Matthias Kloseb9621712010-04-24 17:59:49 +000012922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012923/* end confdefs.h. */
12924#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925#if !HAVE_DECL_TZNAME
12926extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000012927#endif
12928
12929int
12930main ()
12931{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000012933 ;
12934 return 0;
12935}
12936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012937if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000012938 ac_cv_var_tzname=yes
12939else
Matthias Kloseb9621712010-04-24 17:59:49 +000012940 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000012941fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012942rm -f core conftest.err conftest.$ac_objext \
12943 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012944fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12946$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000012947 if test $ac_cv_var_tzname = yes; then
12948
Matthias Kloseb9621712010-04-24 17:59:49 +000012949$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012950
12951 fi
12952fi
12953
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012954
Martin v. Löwis1d459062005-03-14 21:23:33 +000012955# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000012956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
12957$as_echo_n "checking for working tzset()... " >&6; }
12958if test "${ac_cv_working_tzset+set}" = set; then :
12959 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012960else
12961
Matthias Kloseb9621712010-04-24 17:59:49 +000012962if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012963 ac_cv_working_tzset=no
12964else
Matthias Kloseb9621712010-04-24 17:59:49 +000012965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012966/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012967
12968#include <stdlib.h>
12969#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000012970#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000012971
12972#if HAVE_TZNAME
12973extern char *tzname[];
12974#endif
12975
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012976int main()
12977{
Brett Cannon18367812003-09-19 00:59:16 +000012978 /* Note that we need to ensure that not only does tzset(3)
12979 do 'something' with localtime, but it works as documented
12980 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000012981 This includes making sure that tzname is set properly if
12982 tm->tm_zone does not exist since it is the alternative way
12983 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000012984
12985 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000012986 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000012987 */
12988
Martin v. Löwis1d459062005-03-14 21:23:33 +000012989 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000012990 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
12991
Neal Norwitz7f2588c2003-04-11 15:35:53 +000012992 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012993 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000012994 if (localtime(&groundhogday)->tm_hour != 0)
12995 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012996#if HAVE_TZNAME
12997 /* For UTC, tzname[1] is sometimes "", sometimes " " */
12998 if (strcmp(tzname[0], "UTC") ||
12999 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13000 exit(1);
13001#endif
Brett Cannon18367812003-09-19 00:59:16 +000013002
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013003 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013004 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013005 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013006 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013007#if HAVE_TZNAME
13008 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13009 exit(1);
13010#endif
Brett Cannon18367812003-09-19 00:59:16 +000013011
13012 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13013 tzset();
13014 if (localtime(&groundhogday)->tm_hour != 11)
13015 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013016#if HAVE_TZNAME
13017 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13018 exit(1);
13019#endif
13020
13021#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013022 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13023 exit(1);
13024 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13025 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013026#endif
Brett Cannon18367812003-09-19 00:59:16 +000013027
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013028 exit(0);
13029}
13030
13031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013032if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013033 ac_cv_working_tzset=yes
13034else
Matthias Kloseb9621712010-04-24 17:59:49 +000013035 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13038 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013039fi
13040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013041fi
13042
Matthias Kloseb9621712010-04-24 17:59:49 +000013043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13044$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013045if test "$ac_cv_working_tzset" = yes
13046then
13047
Matthias Kloseb9621712010-04-24 17:59:49 +000013048$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013049
13050fi
13051
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013052# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13054$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13055if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13056 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013057else
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013059/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013060#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013061int
13062main ()
13063{
13064
13065struct stat st;
13066st.st_mtim.tv_nsec = 1;
13067
13068 ;
13069 return 0;
13070}
13071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013072if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013073 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013074else
Matthias Kloseb9621712010-04-24 17:59:49 +000013075 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13078fi
13079
Matthias Kloseb9621712010-04-24 17:59:49 +000013080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13081$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013082if test "$ac_cv_stat_tv_nsec" = yes
13083then
13084
Matthias Kloseb9621712010-04-24 17:59:49 +000013085$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013086
13087fi
13088
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013089# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13091$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13092if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13093 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013094else
Matthias Kloseb9621712010-04-24 17:59:49 +000013095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013096/* end confdefs.h. */
13097#include <sys/stat.h>
13098int
13099main ()
13100{
13101
13102struct stat st;
13103st.st_mtimespec.tv_nsec = 1;
13104
13105 ;
13106 return 0;
13107}
13108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013109if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013110 ac_cv_stat_tv_nsec2=yes
13111else
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13115fi
13116
Matthias Kloseb9621712010-04-24 17:59:49 +000013117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13118$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013119if test "$ac_cv_stat_tv_nsec2" = yes
13120then
13121
Matthias Kloseb9621712010-04-24 17:59:49 +000013122$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013123
13124fi
13125
Jack Jansen666b1e72001-10-31 12:11:48 +000013126# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13128$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13129if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13130 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013131else
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013133/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013134#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013135int
13136main ()
13137{
Jack Jansen666b1e72001-10-31 12:11:48 +000013138
13139 int rtn;
13140 rtn = mvwdelch(0,0,0);
13141
Martin v. Löwis11437992002-04-12 09:54:03 +000013142 ;
13143 return 0;
13144}
13145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013146if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013147 ac_cv_mvwdelch_is_expression=yes
13148else
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13152fi
13153
Matthias Kloseb9621712010-04-24 17:59:49 +000013154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13155$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013156
13157if test "$ac_cv_mvwdelch_is_expression" = yes
13158then
Martin v. Löwis11437992002-04-12 09:54:03 +000013159
Matthias Kloseb9621712010-04-24 17:59:49 +000013160$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013161
13162fi
13163
Matthias Kloseb9621712010-04-24 17:59:49 +000013164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13165$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13166if test "${ac_cv_window_has_flags+set}" = set; then :
13167 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013168else
Matthias Kloseb9621712010-04-24 17:59:49 +000013169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013170/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013171#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013172int
13173main ()
13174{
Jack Jansen666b1e72001-10-31 12:11:48 +000013175
13176 WINDOW *w;
13177 w->_flags = 0;
13178
Martin v. Löwis11437992002-04-12 09:54:03 +000013179 ;
13180 return 0;
13181}
13182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013183if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013184 ac_cv_window_has_flags=yes
13185else
Matthias Kloseb9621712010-04-24 17:59:49 +000013186 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13189fi
13190
Matthias Kloseb9621712010-04-24 17:59:49 +000013191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13192$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013193
Jack Jansen666b1e72001-10-31 12:11:48 +000013194
13195if test "$ac_cv_window_has_flags" = yes
13196then
Martin v. Löwis11437992002-04-12 09:54:03 +000013197
Matthias Kloseb9621712010-04-24 17:59:49 +000013198$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013199
13200fi
13201
Matthias Kloseb9621712010-04-24 17:59:49 +000013202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13203$as_echo_n "checking for is_term_resized... " >&6; }
13204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013205/* end confdefs.h. */
13206#include <curses.h>
13207int
13208main ()
13209{
13210void *x=is_term_resized
13211 ;
13212 return 0;
13213}
13214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013215if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013216
Matthias Kloseb9621712010-04-24 17:59:49 +000013217$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013218
Matthias Kloseb159a552010-04-25 21:00:44 +000013219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013220$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013221else
Matthias Kloseb9621712010-04-24 17:59:49 +000013222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13223$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013224
13225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13227
Matthias Kloseb9621712010-04-24 17:59:49 +000013228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13229$as_echo_n "checking for resize_term... " >&6; }
13230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013231/* end confdefs.h. */
13232#include <curses.h>
13233int
13234main ()
13235{
13236void *x=resize_term
13237 ;
13238 return 0;
13239}
13240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013241if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013242
Matthias Kloseb9621712010-04-24 17:59:49 +000013243$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013244
Matthias Kloseb159a552010-04-25 21:00:44 +000013245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013246$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013247else
Matthias Kloseb9621712010-04-24 17:59:49 +000013248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13249$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013250
13251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13253
Matthias Kloseb9621712010-04-24 17:59:49 +000013254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13255$as_echo_n "checking for resizeterm... " >&6; }
13256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013257/* end confdefs.h. */
13258#include <curses.h>
13259int
13260main ()
13261{
13262void *x=resizeterm
13263 ;
13264 return 0;
13265}
13266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013267if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013268
Matthias Kloseb9621712010-04-24 17:59:49 +000013269$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013270
Matthias Kloseb159a552010-04-25 21:00:44 +000013271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013272$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013273else
Matthias Kloseb9621712010-04-24 17:59:49 +000013274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13275$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013276
13277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13279
Matthias Kloseb9621712010-04-24 17:59:49 +000013280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13281$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013282
13283if test -r /dev/ptmx
13284then
Matthias Kloseb9621712010-04-24 17:59:49 +000013285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13286$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013287
Matthias Kloseb9621712010-04-24 17:59:49 +000013288$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013289
Thomas Wouters89f507f2006-12-13 04:49:30 +000013290else
Matthias Kloseb9621712010-04-24 17:59:49 +000013291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13292$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013293fi
13294
Matthias Kloseb9621712010-04-24 17:59:49 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13296$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013297
13298if test -r /dev/ptc
13299then
Matthias Kloseb9621712010-04-24 17:59:49 +000013300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13301$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013302
Matthias Kloseb9621712010-04-24 17:59:49 +000013303$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013304
Thomas Wouters89f507f2006-12-13 04:49:30 +000013305else
Matthias Kloseb9621712010-04-24 17:59:49 +000013306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13307$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013308fi
13309
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013310if test "$have_long_long" = yes
13311then
Matthias Kloseb9621712010-04-24 17:59:49 +000013312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13313$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13314 if test "${ac_cv_have_long_long_format+set}" = set; then :
13315 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013316else
Matthias Kloseb9621712010-04-24 17:59:49 +000013317 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013318 ac_cv_have_long_long_format=no
13319else
Matthias Kloseb9621712010-04-24 17:59:49 +000013320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013321/* end confdefs.h. */
13322
13323 #include <stdio.h>
13324 #include <stddef.h>
13325 #include <string.h>
13326
13327 #ifdef HAVE_SYS_TYPES_H
13328 #include <sys/types.h>
13329 #endif
13330
13331 int main()
13332 {
13333 char buffer[256];
13334
13335 if (sprintf(buffer, "%lld", (long long)123) < 0)
13336 return 1;
13337 if (strcmp(buffer, "123"))
13338 return 1;
13339
13340 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13341 return 1;
13342 if (strcmp(buffer, "-123"))
13343 return 1;
13344
13345 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13346 return 1;
13347 if (strcmp(buffer, "123"))
13348 return 1;
13349
13350 return 0;
13351 }
13352
13353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013354if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013355 ac_cv_have_long_long_format=yes
13356else
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013358fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013359rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13360 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013361fi
13362
13363
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013364fi
13365
Matthias Kloseb9621712010-04-24 17:59:49 +000013366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13367$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013368fi
13369
Mark Dickinson89d7d412009-12-31 20:50:59 +000013370if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013371then
13372
Matthias Kloseb9621712010-04-24 17:59:49 +000013373$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013374
13375fi
13376
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013377if test $ac_sys_system = Darwin
13378then
13379 LIBS="$LIBS -framework CoreFoundation"
13380fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013381
Matthias Kloseb9621712010-04-24 17:59:49 +000013382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13383$as_echo_n "checking for %zd printf() format support... " >&6; }
13384if test "${ac_cv_have_size_t_format+set}" = set; then :
13385 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013386else
Matthias Kloseb9621712010-04-24 17:59:49 +000013387 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013388 ac_cv_have_size_t_format="cross -- assuming yes"
13389
Thomas Wouters477c8d52006-05-27 19:21:47 +000013390else
Matthias Kloseb9621712010-04-24 17:59:49 +000013391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013392/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013393
Thomas Wouters477c8d52006-05-27 19:21:47 +000013394#include <stdio.h>
13395#include <stddef.h>
13396#include <string.h>
13397
Christian Heimes2c181612007-12-17 20:04:13 +000013398#ifdef HAVE_SYS_TYPES_H
13399#include <sys/types.h>
13400#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013401
13402#ifdef HAVE_SSIZE_T
13403typedef ssize_t Py_ssize_t;
13404#elif SIZEOF_VOID_P == SIZEOF_LONG
13405typedef long Py_ssize_t;
13406#else
13407typedef int Py_ssize_t;
13408#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013409
Christian Heimes2c181612007-12-17 20:04:13 +000013410int main()
13411{
13412 char buffer[256];
13413
Thomas Wouters477c8d52006-05-27 19:21:47 +000013414 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13415 return 1;
13416
Thomas Wouters89f507f2006-12-13 04:49:30 +000013417 if (strcmp(buffer, "123"))
13418 return 1;
13419
13420 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13421 return 1;
13422
13423 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013424 return 1;
13425
13426 return 0;
13427}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013428
Thomas Wouters477c8d52006-05-27 19:21:47 +000013429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013430if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013431 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013432else
Matthias Kloseb9621712010-04-24 17:59:49 +000013433 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013434fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013435rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13436 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013437fi
13438
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013439fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13441$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013442if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013443
Matthias Kloseb9621712010-04-24 17:59:49 +000013444$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013445
13446fi
13447
Matthias Kloseb9621712010-04-24 17:59:49 +000013448ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013449#ifdef HAVE_SYS_TYPES_H
13450#include <sys/types.h>
13451#endif
13452#ifdef HAVE_SYS_SOCKET_H
13453#include <sys/socket.h>
13454#endif
13455
Matthias Kloseb9621712010-04-24 17:59:49 +000013456"
13457if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013458
Martin v. Löwis11437992002-04-12 09:54:03 +000013459else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013460
Matthias Kloseb9621712010-04-24 17:59:49 +000013461$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013462
13463fi
13464
Michael W. Hudson54241132001-12-07 15:38:26 +000013465
Matthias Kloseb9621712010-04-24 17:59:49 +000013466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13467$as_echo_n "checking for broken mbstowcs... " >&6; }
13468if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13469 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013470else
Matthias Kloseb9621712010-04-24 17:59:49 +000013471 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013472 ac_cv_broken_mbstowcs=no
13473else
Matthias Kloseb9621712010-04-24 17:59:49 +000013474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013475/* end confdefs.h. */
13476
13477#include<stdlib.h>
13478int main() {
13479 size_t len = -1;
13480 const char *str = "text";
13481 len = mbstowcs(NULL, str, 0);
13482 return (len != 4);
13483}
13484
13485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013486if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013487 ac_cv_broken_mbstowcs=no
13488else
Matthias Kloseb9621712010-04-24 17:59:49 +000013489 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13492 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013493fi
13494
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013495fi
13496
Matthias Kloseb9621712010-04-24 17:59:49 +000013497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13498$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013499if test "$ac_cv_broken_mbstowcs" = yes
13500then
13501
Matthias Kloseb9621712010-04-24 17:59:49 +000013502$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013503
13504fi
13505
Antoine Pitroub52ec782009-01-25 16:34:23 +000013506# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13508$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013509
13510# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013511if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013512 withval=$with_computed_gotos;
13513if test "$withval" != no
13514then
13515
Matthias Kloseb9621712010-04-24 17:59:49 +000013516$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013517
Matthias Kloseb9621712010-04-24 17:59:49 +000013518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13519$as_echo "yes" >&6; }
13520else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13521$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013522fi
13523else
Matthias Kloseb9621712010-04-24 17:59:49 +000013524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13525$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013526fi
13527
13528
13529
Michael W. Hudson54241132001-12-07 15:38:26 +000013530
Jesus Cea6a792292010-05-03 21:18:48 +000013531case $ac_sys_system in
13532 OSF*) as_fn_error "OSF* systems are deprecated unless somebody volunteers. Check http://bugs.python.org/issue8606" "$LINENO" 5 ;;
13533esac
13534
13535
13536
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013537
13538
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013539for h in `(cd $srcdir;echo Python/thread_*.h)`
13540do
13541 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13542done
13543
Michael W. Hudson54241132001-12-07 15:38:26 +000013544
Neal Norwitzd24499d2005-12-18 21:36:39 +000013545SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13547$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013548for dir in $SRCDIRS; do
13549 if test ! -d $dir; then
13550 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013551 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013552done
Matthias Kloseb9621712010-04-24 17:59:49 +000013553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13554$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013555
Guido van Rossum627b2d71993-12-24 10:39:16 +000013556# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013557ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013558
Martin v. Löwis11437992002-04-12 09:54:03 +000013559cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013560# This file is a shell script that caches the results of configure
13561# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013562# scripts and configure runs, see configure's option --config-cache.
13563# It is not useful on other systems. If it contains results you don't
13564# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013565#
Martin v. Löwis11437992002-04-12 09:54:03 +000013566# config.status only pays attention to the cache file if you give it
13567# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013568#
Skip Montanaro6dead952003-09-25 14:50:04 +000013569# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013570# loading this file, other *unset* `ac_cv_foo' will be assigned the
13571# following values.
13572
13573_ACEOF
13574
Guido van Rossumf78abae1997-01-21 22:02:36 +000013575# The following way of writing the cache mishandles newlines in values,
13576# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013577# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013578# Ultrix sh set writes to stderr and can't be redirected directly,
13579# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013580(
13581 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13582 eval ac_val=\$$ac_var
13583 case $ac_val in #(
13584 *${as_nl}*)
13585 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13587$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013588 esac
13589 case $ac_var in #(
13590 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013591 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13592 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013593 esac ;;
13594 esac
13595 done
13596
Martin v. Löwis11437992002-04-12 09:54:03 +000013597 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013598 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13599 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013600 # `set' does not quote correctly, so add quotes: double-quote
13601 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013602 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013603 "s/'/'\\\\''/g;
13604 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013605 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013606 *)
13607 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013608 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013609 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013610 esac |
13611 sort
13612) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013613 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013614 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013615 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013616 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013617 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13618 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013619 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13620 :end' >>confcache
13621if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13622 if test -w "$cache_file"; then
13623 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013624 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13625$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013626 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013627 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13629$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013630 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013631fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013632rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013633
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013634test "x$prefix" = xNONE && prefix=$ac_default_prefix
13635# Let make expand exec_prefix.
13636test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013637
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013638DEFS=-DHAVE_CONFIG_H
13639
Skip Montanaro6dead952003-09-25 14:50:04 +000013640ac_libobjs=
13641ac_ltlibobjs=
13642for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13643 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013644 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013646 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13647 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13649 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013650done
13651LIBOBJS=$ac_libobjs
13652
13653LTLIBOBJS=$ac_ltlibobjs
13654
13655
Martin v. Löwis11437992002-04-12 09:54:03 +000013656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013658: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013659ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013660ac_clean_files_save=$ac_clean_files
13661ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013662{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13663$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13664as_write_fail=0
13665cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013666#! $SHELL
13667# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013668# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013669# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013670# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013671
Martin v. Löwis11437992002-04-12 09:54:03 +000013672debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013673ac_cs_recheck=false
13674ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013675
Matthias Kloseb9621712010-04-24 17:59:49 +000013676SHELL=\${CONFIG_SHELL-$SHELL}
13677export SHELL
13678_ASEOF
13679cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13680## -------------------- ##
13681## M4sh Initialization. ##
13682## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013683
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013684# Be more Bourne compatible
13685DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013686if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013687 emulate sh
13688 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013689 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013690 # is contrary to our usage. Disable this feature.
13691 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013692 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013693else
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 case `(set -o) 2>/dev/null` in #(
13695 *posix*) :
13696 set -o posix ;; #(
13697 *) :
13698 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013699esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013700fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013701
13702
Matthias Kloseb9621712010-04-24 17:59:49 +000013703as_nl='
13704'
13705export as_nl
13706# Printing a long string crashes Solaris 7 /usr/bin/printf.
13707as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13708as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13709as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13710# Prefer a ksh shell builtin over an external printf program on Solaris,
13711# but without wasting forks for bash or zsh.
13712if test -z "$BASH_VERSION$ZSH_VERSION" \
13713 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13714 as_echo='print -r --'
13715 as_echo_n='print -rn --'
13716elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13717 as_echo='printf %s\n'
13718 as_echo_n='printf %s'
13719else
13720 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13721 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13722 as_echo_n='/usr/ucb/echo -n'
13723 else
13724 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13725 as_echo_n_body='eval
13726 arg=$1;
13727 case $arg in #(
13728 *"$as_nl"*)
13729 expr "X$arg" : "X\\(.*\\)$as_nl";
13730 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13731 esac;
13732 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13733 '
13734 export as_echo_n_body
13735 as_echo_n='sh -c $as_echo_n_body as_echo'
13736 fi
13737 export as_echo_body
13738 as_echo='sh -c $as_echo_body as_echo'
13739fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013740
13741# The user is always right.
13742if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 PATH_SEPARATOR=:
13744 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13745 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13746 PATH_SEPARATOR=';'
13747 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013748fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750
13751# IFS
13752# We need space, tab and new line, in precisely that order. Quoting is
13753# there to prevent editors from complaining about space-tab.
13754# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13755# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013756IFS=" "" $as_nl"
13757
13758# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013759case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013760 *[\\/]* ) as_myself=$0 ;;
13761 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013762for as_dir in $PATH
13763do
13764 IFS=$as_save_IFS
13765 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013766 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13767 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013768IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013770 ;;
13771esac
13772# We did not find ourselves, most probably we were run as `sh COMMAND'
13773# in which case we are not to be found in the path.
13774if test "x$as_myself" = x; then
13775 as_myself=$0
13776fi
13777if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013778 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13779 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013780fi
13781
Matthias Kloseb9621712010-04-24 17:59:49 +000013782# Unset variables that we do not need and which cause bugs (e.g. in
13783# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13784# suppresses any "Segmentation fault" message there. '((' could
13785# trigger a bug in pdksh 5.2.14.
13786for as_var in BASH_ENV ENV MAIL MAILPATH
13787do eval test x\${$as_var+set} = xset \
13788 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013789done
13790PS1='$ '
13791PS2='> '
13792PS4='+ '
13793
13794# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013795LC_ALL=C
13796export LC_ALL
13797LANGUAGE=C
13798export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013799
Matthias Kloseb9621712010-04-24 17:59:49 +000013800# CDPATH.
13801(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13802
13803
13804# as_fn_error ERROR [LINENO LOG_FD]
13805# ---------------------------------
13806# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13807# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13808# script with status $?, using 1 if that was 0.
13809as_fn_error ()
13810{
13811 as_status=$?; test $as_status -eq 0 && as_status=1
13812 if test "$3"; then
13813 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13814 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
13815 fi
13816 $as_echo "$as_me: error: $1" >&2
13817 as_fn_exit $as_status
13818} # as_fn_error
13819
13820
13821# as_fn_set_status STATUS
13822# -----------------------
13823# Set $? to STATUS, without forking.
13824as_fn_set_status ()
13825{
13826 return $1
13827} # as_fn_set_status
13828
13829# as_fn_exit STATUS
13830# -----------------
13831# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13832as_fn_exit ()
13833{
13834 set +e
13835 as_fn_set_status $1
13836 exit $1
13837} # as_fn_exit
13838
13839# as_fn_unset VAR
13840# ---------------
13841# Portably unset VAR.
13842as_fn_unset ()
13843{
13844 { eval $1=; unset $1;}
13845}
13846as_unset=as_fn_unset
13847# as_fn_append VAR VALUE
13848# ----------------------
13849# Append the text in VALUE to the end of the definition contained in VAR. Take
13850# advantage of any shell optimizations that allow amortized linear growth over
13851# repeated appends, instead of the typical quadratic growth present in naive
13852# implementations.
13853if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13854 eval 'as_fn_append ()
13855 {
13856 eval $1+=\$2
13857 }'
13858else
13859 as_fn_append ()
13860 {
13861 eval $1=\$$1\$2
13862 }
13863fi # as_fn_append
13864
13865# as_fn_arith ARG...
13866# ------------------
13867# Perform arithmetic evaluation on the ARGs, and store the result in the
13868# global $as_val. Take advantage of shells that can avoid forks. The arguments
13869# must be portable across $(()) and expr.
13870if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13871 eval 'as_fn_arith ()
13872 {
13873 as_val=$(( $* ))
13874 }'
13875else
13876 as_fn_arith ()
13877 {
13878 as_val=`expr "$@" || test $? -eq 1`
13879 }
13880fi # as_fn_arith
13881
13882
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013883if expr a : '\(a\)' >/dev/null 2>&1 &&
13884 test "X`expr 00001 : '.*\(...\)'`" = X001; then
13885 as_expr=expr
13886else
13887 as_expr=false
13888fi
13889
13890if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13891 as_basename=basename
13892else
13893 as_basename=false
13894fi
13895
Matthias Kloseb9621712010-04-24 17:59:49 +000013896if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13897 as_dirname=dirname
13898else
13899 as_dirname=false
13900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013902as_me=`$as_basename -- "$0" ||
13903$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13904 X"$0" : 'X\(//\)$' \| \
13905 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000013906$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907 sed '/^.*\/\([^/][^/]*\)\/*$/{
13908 s//\1/
13909 q
13910 }
13911 /^X\/\(\/\/\)$/{
13912 s//\1/
13913 q
13914 }
13915 /^X\/\(\/\).*/{
13916 s//\1/
13917 q
13918 }
13919 s/.*/./; q'`
13920
Matthias Kloseb9621712010-04-24 17:59:49 +000013921# Avoid depending upon Character Ranges.
13922as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13923as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13924as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13925as_cr_digits='0123456789'
13926as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013927
13928ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000013929case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013930-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000013931 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013932 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000013933 xy) ECHO_C='\c';;
13934 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13935 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013936 esac;;
13937*)
13938 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000013939esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013940
Martin v. Löwis11437992002-04-12 09:54:03 +000013941rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013942if test -d conf$$.dir; then
13943 rm -f conf$$.dir/conf$$.file
13944else
13945 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000013946 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013947fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013948if (echo >conf$$.file) 2>/dev/null; then
13949 if ln -s conf$$.file conf$$ 2>/dev/null; then
13950 as_ln_s='ln -s'
13951 # ... but there are two gotchas:
13952 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13953 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13954 # In both cases, we have to default to `cp -p'.
13955 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13956 as_ln_s='cp -p'
13957 elif ln conf$$.file conf$$ 2>/dev/null; then
13958 as_ln_s=ln
13959 else
Martin v. Löwis11437992002-04-12 09:54:03 +000013960 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000013961 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013962else
13963 as_ln_s='cp -p'
13964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013965rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13966rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000013967
Matthias Kloseb9621712010-04-24 17:59:49 +000013968
13969# as_fn_mkdir_p
13970# -------------
13971# Create "$as_dir" as a directory, including parents if necessary.
13972as_fn_mkdir_p ()
13973{
13974
13975 case $as_dir in #(
13976 -*) as_dir=./$as_dir;;
13977 esac
13978 test -d "$as_dir" || eval $as_mkdir_p || {
13979 as_dirs=
13980 while :; do
13981 case $as_dir in #(
13982 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13983 *) as_qdir=$as_dir;;
13984 esac
13985 as_dirs="'$as_qdir' $as_dirs"
13986 as_dir=`$as_dirname -- "$as_dir" ||
13987$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13988 X"$as_dir" : 'X\(//\)[^/]' \| \
13989 X"$as_dir" : 'X\(//\)$' \| \
13990 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13991$as_echo X"$as_dir" |
13992 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13993 s//\1/
13994 q
13995 }
13996 /^X\(\/\/\)[^/].*/{
13997 s//\1/
13998 q
13999 }
14000 /^X\(\/\/\)$/{
14001 s//\1/
14002 q
14003 }
14004 /^X\(\/\).*/{
14005 s//\1/
14006 q
14007 }
14008 s/.*/./; q'`
14009 test -d "$as_dir" && break
14010 done
14011 test -z "$as_dirs" || eval "mkdir $as_dirs"
14012 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
14013
14014
14015} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014016if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014017 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014018else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014019 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014020 as_mkdir_p=false
14021fi
14022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014023if test -x / >/dev/null 2>&1; then
14024 as_test_x='test -x'
14025else
14026 if ls -dL / >/dev/null 2>&1; then
14027 as_ls_L_option=L
14028 else
14029 as_ls_L_option=
14030 fi
14031 as_test_x='
14032 eval sh -c '\''
14033 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014034 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014035 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014036 case $1 in #(
14037 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014038 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014039 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014040 ???[sx]*):;;*)false;;esac;fi
14041 '\'' sh
14042 '
14043fi
14044as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014045
14046# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014047as_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 +000014048
14049# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014050as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014051
14052
Martin v. Löwis11437992002-04-12 09:54:03 +000014053exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014054## ----------------------------------- ##
14055## Main body of $CONFIG_STATUS script. ##
14056## ----------------------------------- ##
14057_ASEOF
14058test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014059
Matthias Kloseb9621712010-04-24 17:59:49 +000014060cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14061# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014062# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014063# values after options handling.
14064ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014065This file was extended by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +000014066generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014067
14068 CONFIG_FILES = $CONFIG_FILES
14069 CONFIG_HEADERS = $CONFIG_HEADERS
14070 CONFIG_LINKS = $CONFIG_LINKS
14071 CONFIG_COMMANDS = $CONFIG_COMMANDS
14072 $ $0 $@
14073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014074on `(hostname || uname -n) 2>/dev/null | sed 1q`
14075"
14076
Martin v. Löwis11437992002-04-12 09:54:03 +000014077_ACEOF
14078
Matthias Kloseb9621712010-04-24 17:59:49 +000014079case $ac_config_files in *"
14080"*) set x $ac_config_files; shift; ac_config_files=$*;;
14081esac
14082
14083case $ac_config_headers in *"
14084"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14085esac
14086
14087
14088cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014089# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000014090config_files="$ac_config_files"
14091config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014093_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014094
Matthias Kloseb9621712010-04-24 17:59:49 +000014095cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014096ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014097\`$as_me' instantiates files and other configuration actions
14098from templates according to the current configuration. Unless the files
14099and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014100
Matthias Kloseb9621712010-04-24 17:59:49 +000014101Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014102
14103 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014104 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014105 --config print configuration, then exit
14106 -q, --quiet, --silent
14107 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014108 -d, --debug don't remove temporary files
14109 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014110 --file=FILE[:TEMPLATE]
14111 instantiate the configuration file FILE
14112 --header=FILE[:TEMPLATE]
14113 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014114
14115Configuration files:
14116$config_files
14117
14118Configuration headers:
14119$config_headers
14120
Matthias Kloseb9621712010-04-24 17:59:49 +000014121Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014124cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14125ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014126ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014127python config.status 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014128configured by $0, generated by GNU Autoconf 2.65,
14129 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014130
Matthias Kloseb9621712010-04-24 17:59:49 +000014131Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014132This config.status script is free software; the Free Software Foundation
14133gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014134
14135ac_pwd='$ac_pwd'
14136srcdir='$srcdir'
14137INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014138test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014139_ACEOF
14140
Matthias Kloseb9621712010-04-24 17:59:49 +000014141cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14142# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014143ac_need_defaults=:
14144while test $# != 0
14145do
14146 case $1 in
14147 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014148 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14149 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014150 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014151 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014152 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014153 ac_option=$1
14154 ac_optarg=$2
14155 ac_shift=shift
14156 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014157 esac
14158
Skip Montanaro6dead952003-09-25 14:50:04 +000014159 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014160 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014161 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14162 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014163 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 $as_echo "$ac_cs_version"; exit ;;
14165 --config | --confi | --conf | --con | --co | --c )
14166 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014167 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014168 debug=: ;;
14169 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014170 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014171 case $ac_optarg in
14172 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14173 esac
14174 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014175 ac_need_defaults=false;;
14176 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014177 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014178 case $ac_optarg in
14179 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14180 esac
14181 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014182 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014183 --he | --h)
14184 # Conflict between --help and --header
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 as_fn_error "ambiguous option: \`$1'
14186Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014187 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014188 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014189 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14190 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14191 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014192
14193 # This is an error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014194 -*) as_fn_error "unrecognized option: \`$1'
14195Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014196
Matthias Kloseb9621712010-04-24 17:59:49 +000014197 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014199
14200 esac
14201 shift
14202done
14203
Skip Montanaro6dead952003-09-25 14:50:04 +000014204ac_configure_extra_args=
14205
14206if $ac_cs_silent; then
14207 exec 6>/dev/null
14208 ac_configure_extra_args="$ac_configure_extra_args --silent"
14209fi
14210
14211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014212cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014213if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014214 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14215 shift
14216 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14217 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014218 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014219 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014220fi
14221
Martin v. Löwis11437992002-04-12 09:54:03 +000014222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014223cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014224exec 5>>config.log
14225{
14226 echo
14227 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14228## Running $as_me. ##
14229_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014230 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014231} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014234cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014235_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014236
Matthias Kloseb9621712010-04-24 17:59:49 +000014237cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014238
14239# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014240for ac_config_target in $ac_config_targets
14241do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014242 case $ac_config_target in
14243 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14244 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14245 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014246 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14247 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014248 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14249 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014250 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014251
Matthias Kloseb9621712010-04-24 17:59:49 +000014252 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014253 esac
14254done
14255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014256
Martin v. Löwis11437992002-04-12 09:54:03 +000014257# If the user did not use the arguments to specify the items to instantiate,
14258# then the envvar interface is used. Set only those that are not.
14259# We use the long form for the default assignment because of an extremely
14260# bizarre bug on SunOS 4.1.3.
14261if $ac_need_defaults; then
14262 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14263 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14264fi
14265
Skip Montanaro6dead952003-09-25 14:50:04 +000014266# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014267# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014268# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014269# Hook for its removal unless debugging.
14270# Note that there is a small window in which the directory will not be cleaned:
14271# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014272$debug ||
14273{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014274 tmp=
14275 trap 'exit_status=$?
14276 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14277' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014278 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014279}
Martin v. Löwis11437992002-04-12 09:54:03 +000014280# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014281
Martin v. Löwis11437992002-04-12 09:54:03 +000014282{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014283 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014284 test -n "$tmp" && test -d "$tmp"
14285} ||
14286{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287 tmp=./conf$$-$RANDOM
14288 (umask 077 && mkdir "$tmp")
Matthias Kloseb9621712010-04-24 17:59:49 +000014289} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014290
Matthias Kloseb9621712010-04-24 17:59:49 +000014291# Set up the scripts for CONFIG_FILES section.
14292# No need to generate them if there are no CONFIG_FILES.
14293# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014294if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014295
Matthias Kloseb9621712010-04-24 17:59:49 +000014296
14297ac_cr=`echo X | tr X '\015'`
14298# On cygwin, bash can eat \r inside `` if the user requested igncr.
14299# But we know of no other shell where ac_cr would be empty at this
14300# point, so we can use a bashism as a fallback.
14301if test "x$ac_cr" = x; then
14302 eval ac_cr=\$\'\\r\'
14303fi
14304ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14305if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14306 ac_cs_awk_cr='\r'
14307else
14308 ac_cs_awk_cr=$ac_cr
14309fi
14310
14311echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014312_ACEOF
14313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014314
Matthias Kloseb9621712010-04-24 17:59:49 +000014315{
14316 echo "cat >conf$$subs.awk <<_ACEOF" &&
14317 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14318 echo "_ACEOF"
14319} >conf$$subs.sh ||
14320 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14321ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014322ac_delim='%!_!# '
14323for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014324 . ./conf$$subs.sh ||
14325 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014326
Matthias Kloseb9621712010-04-24 17:59:49 +000014327 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14328 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014329 break
14330 elif $ac_last_try; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014331 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014332 else
14333 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014334 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014335done
Matthias Kloseb9621712010-04-24 17:59:49 +000014336rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014337
Matthias Kloseb9621712010-04-24 17:59:49 +000014338cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14339cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014341sed -n '
14342h
14343s/^/S["/; s/!.*/"]=/
14344p
14345g
14346s/^[^!]*!//
14347:repl
14348t repl
14349s/'"$ac_delim"'$//
14350t delim
14351:nl
14352h
14353s/\(.\{148\}\)..*/\1/
14354t more1
14355s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14356p
14357n
14358b repl
14359:more1
14360s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14361p
14362g
14363s/.\{148\}//
14364t nl
14365:delim
14366h
14367s/\(.\{148\}\)..*/\1/
14368t more2
14369s/["\\]/\\&/g; s/^/"/; s/$/"/
14370p
14371b
14372:more2
14373s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14374p
14375g
14376s/.\{148\}//
14377t delim
14378' <conf$$subs.awk | sed '
14379/^[^""]/{
14380 N
14381 s/\n//
14382}
14383' >>$CONFIG_STATUS || ac_write_fail=1
14384rm -f conf$$subs.awk
14385cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14386_ACAWK
14387cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14388 for (key in S) S_is_set[key] = 1
14389 FS = ""
14390
14391}
14392{
14393 line = $ 0
14394 nfields = split(line, field, "@")
14395 substed = 0
14396 len = length(field[1])
14397 for (i = 2; i < nfields; i++) {
14398 key = field[i]
14399 keylen = length(key)
14400 if (S_is_set[key]) {
14401 value = S[key]
14402 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14403 len += length(value) + length(field[++i])
14404 substed = 1
14405 } else
14406 len += 1 + keylen
14407 }
14408
14409 print line
14410}
14411
14412_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014414cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14415if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14416 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14417else
14418 cat
14419fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14420 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014421_ACEOF
14422
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014423# VPATH may cause trouble with some makes, so we remove $(srcdir),
14424# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14425# trailing colons and then remove the whole line if VPATH becomes empty
14426# (actually we leave an empty line to preserve line numbers).
14427if test "x$srcdir" = x.; then
14428 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14429s/:*\$(srcdir):*/:/
14430s/:*\${srcdir}:*/:/
14431s/:*@srcdir@:*/:/
14432s/^\([^=]*=[ ]*\):*/\1/
14433s/:*$//
14434s/^[^=]*=[ ]*$//
14435}'
14436fi
14437
Matthias Kloseb9621712010-04-24 17:59:49 +000014438cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014439fi # test -n "$CONFIG_FILES"
14440
Matthias Kloseb9621712010-04-24 17:59:49 +000014441# Set up the scripts for CONFIG_HEADERS section.
14442# No need to generate them if there are no CONFIG_HEADERS.
14443# This happens for instance with `./config.status Makefile'.
14444if test -n "$CONFIG_HEADERS"; then
14445cat >"$tmp/defines.awk" <<\_ACAWK ||
14446BEGIN {
14447_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014448
Matthias Kloseb9621712010-04-24 17:59:49 +000014449# Transform confdefs.h into an awk script `defines.awk', embedded as
14450# here-document in config.status, that substitutes the proper values into
14451# config.h.in to produce config.h.
14452
14453# Create a delimiter string that does not exist in confdefs.h, to ease
14454# handling of long lines.
14455ac_delim='%!_!# '
14456for ac_last_try in false false :; do
14457 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14458 if test -z "$ac_t"; then
14459 break
14460 elif $ac_last_try; then
14461 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14462 else
14463 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14464 fi
14465done
14466
14467# For the awk script, D is an array of macro values keyed by name,
14468# likewise P contains macro parameters if any. Preserve backslash
14469# newline sequences.
14470
14471ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14472sed -n '
14473s/.\{148\}/&'"$ac_delim"'/g
14474t rset
14475:rset
14476s/^[ ]*#[ ]*define[ ][ ]*/ /
14477t def
14478d
14479:def
14480s/\\$//
14481t bsnl
14482s/["\\]/\\&/g
14483s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14484D["\1"]=" \3"/p
14485s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14486d
14487:bsnl
14488s/["\\]/\\&/g
14489s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14490D["\1"]=" \3\\\\\\n"\\/p
14491t cont
14492s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14493t cont
14494d
14495:cont
14496n
14497s/.\{148\}/&'"$ac_delim"'/g
14498t clear
14499:clear
14500s/\\$//
14501t bsnlc
14502s/["\\]/\\&/g; s/^/"/; s/$/"/p
14503d
14504:bsnlc
14505s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14506b cont
14507' <confdefs.h | sed '
14508s/'"$ac_delim"'/"\\\
14509"/g' >>$CONFIG_STATUS || ac_write_fail=1
14510
14511cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14512 for (key in D) D_is_set[key] = 1
14513 FS = ""
14514}
14515/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14516 line = \$ 0
14517 split(line, arg, " ")
14518 if (arg[1] == "#") {
14519 defundef = arg[2]
14520 mac1 = arg[3]
14521 } else {
14522 defundef = substr(arg[1], 2)
14523 mac1 = arg[2]
14524 }
14525 split(mac1, mac2, "(") #)
14526 macro = mac2[1]
14527 prefix = substr(line, 1, index(line, defundef) - 1)
14528 if (D_is_set[macro]) {
14529 # Preserve the white space surrounding the "#".
14530 print prefix "define", macro P[macro] D[macro]
14531 next
14532 } else {
14533 # Replace #undef with comments. This is necessary, for example,
14534 # in the case of _POSIX_SOURCE, which is predefined and required
14535 # on some systems where configure will not decide to define it.
14536 if (defundef == "undef") {
14537 print "/*", prefix defundef, macro, "*/"
14538 next
14539 }
14540 }
14541}
14542{ print }
14543_ACAWK
14544_ACEOF
14545cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14546 as_fn_error "could not setup config headers machinery" "$LINENO" 5
14547fi # test -n "$CONFIG_HEADERS"
14548
14549
14550eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14551shift
14552for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014553do
14554 case $ac_tag in
14555 :[FHLC]) ac_mode=$ac_tag; continue;;
14556 esac
14557 case $ac_mode$ac_tag in
14558 :[FHL]*:*);;
Matthias Kloseb9621712010-04-24 17:59:49 +000014559 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014560 :[FH]-) ac_tag=-:-;;
14561 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14562 esac
14563 ac_save_IFS=$IFS
14564 IFS=:
14565 set x $ac_tag
14566 IFS=$ac_save_IFS
14567 shift
14568 ac_file=$1
14569 shift
14570
14571 case $ac_mode in
14572 :L) ac_source=$1;;
14573 :[FH])
14574 ac_file_inputs=
14575 for ac_f
14576 do
14577 case $ac_f in
14578 -) ac_f="$tmp/stdin";;
14579 *) # Look for the file first in the build tree, then in the source tree
14580 # (if the path is not absolute). The absolute path cannot be DOS-style,
14581 # because $ac_f cannot contain `:'.
14582 test -f "$ac_f" ||
14583 case $ac_f in
14584 [\\/$]*) false;;
14585 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14586 esac ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014587 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014588 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014589 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14590 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014591 done
14592
14593 # Let's still pretend it is `configure' which instantiates (i.e., don't
14594 # use $as_me), people would be surprised to read:
14595 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014596 configure_input='Generated from '`
14597 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14598 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014599 if test x"$ac_file" != x-; then
14600 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014601 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14602$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014603 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014604 # Neutralize special characters interpreted by sed in replacement strings.
14605 case $configure_input in #(
14606 *\&* | *\|* | *\\* )
14607 ac_sed_conf_input=`$as_echo "$configure_input" |
14608 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14609 *) ac_sed_conf_input=$configure_input;;
14610 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014611
14612 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014613 *:-:* | *:-) cat >"$tmp/stdin" \
14614 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014615 esac
14616 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014617 esac
14618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014619 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014620$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014621 X"$ac_file" : 'X\(//\)[^/]' \| \
14622 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014623 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014624$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14626 s//\1/
14627 q
14628 }
14629 /^X\(\/\/\)[^/].*/{
14630 s//\1/
14631 q
14632 }
14633 /^X\(\/\/\)$/{
14634 s//\1/
14635 q
14636 }
14637 /^X\(\/\).*/{
14638 s//\1/
14639 q
14640 }
14641 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014642 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014643 ac_builddir=.
14644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014645case "$ac_dir" in
14646.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14647*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014648 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014649 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014650 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014651 case $ac_top_builddir_sub in
14652 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14653 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14654 esac ;;
14655esac
14656ac_abs_top_builddir=$ac_pwd
14657ac_abs_builddir=$ac_pwd$ac_dir_suffix
14658# for backward compatibility:
14659ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014660
14661case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014662 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014663 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014664 ac_top_srcdir=$ac_top_builddir_sub
14665 ac_abs_top_srcdir=$ac_pwd ;;
14666 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014667 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668 ac_top_srcdir=$srcdir
14669 ac_abs_top_srcdir=$srcdir ;;
14670 *) # Relative name.
14671 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14672 ac_top_srcdir=$ac_top_build_prefix$srcdir
14673 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014674esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014675ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014676
Martin v. Löwis11437992002-04-12 09:54:03 +000014677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678 case $ac_mode in
14679 :F)
14680 #
14681 # CONFIG_FILE
14682 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014683
14684 case $INSTALL in
14685 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014686 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014687 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014688_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014689
Matthias Kloseb9621712010-04-24 17:59:49 +000014690cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014691# If the template does not know about datarootdir, expand it.
14692# FIXME: This hack should be removed a few years after 2.60.
14693ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014694ac_sed_dataroot='
14695/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014696 p
14697 q
14698}
14699/@datadir@/p
14700/@docdir@/p
14701/@infodir@/p
14702/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014703/@mandir@/p'
14704case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014705*datarootdir*) ac_datarootdir_seen=yes;;
14706*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014707 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14708$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014710cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014711 ac_datarootdir_hack='
14712 s&@datadir@&$datadir&g
14713 s&@docdir@&$docdir&g
14714 s&@infodir@&$infodir&g
14715 s&@localedir@&$localedir&g
14716 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014717 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014718esac
14719_ACEOF
14720
14721# Neutralize VPATH when `$srcdir' = `.'.
14722# Shell code in configure.ac might set extrasub.
14723# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014724cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14725ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014726$extrasub
14727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014728cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014729:t
14730/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014731s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014732s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014733s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014734s&@srcdir@&$ac_srcdir&;t t
14735s&@abs_srcdir@&$ac_abs_srcdir&;t t
14736s&@top_srcdir@&$ac_top_srcdir&;t t
14737s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14738s&@builddir@&$ac_builddir&;t t
14739s&@abs_builddir@&$ac_abs_builddir&;t t
14740s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14741s&@INSTALL@&$ac_INSTALL&;t t
14742$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014743"
14744eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
14745 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014747test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14748 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14749 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014751which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014752$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014753which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014755 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014756 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014757 -) cat "$tmp/out" && rm -f "$tmp/out";;
14758 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14759 esac \
14760 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014761 ;;
14762 :H)
14763 #
14764 # CONFIG_HEADER
14765 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014766 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014767 {
14768 $as_echo "/* $configure_input */" \
14769 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14770 } >"$tmp/config.h" \
14771 || as_fn_error "could not create $ac_file" "$LINENO" 5
14772 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14773 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14774$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014775 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014776 rm -f "$ac_file"
14777 mv "$tmp/config.h" "$ac_file" \
14778 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014779 fi
14780 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014781 $as_echo "/* $configure_input */" \
14782 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
14783 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014784 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014785 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014787
14788 esac
14789
14790done # for ac_tag
14791
Guido van Rossum627b2d71993-12-24 10:39:16 +000014792
Matthias Kloseb9621712010-04-24 17:59:49 +000014793as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014794_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014795ac_clean_files=$ac_clean_files_save
14796
Matthias Kloseb9621712010-04-24 17:59:49 +000014797test $ac_write_fail = 0 ||
14798 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14799
Martin v. Löwis11437992002-04-12 09:54:03 +000014800
14801# configure is writing to config.log, and then calls config.status.
14802# config.status does its own redirection, appending to config.log.
14803# Unfortunately, on DOS this fails, as config.log is still kept open
14804# by configure, so config.status won't be able to write to it; its
14805# output is simply discarded. So we exec the FD to /dev/null,
14806# effectively closing config.log, so it can be properly (re)opened and
14807# appended to by config.status. When coming back to configure, we
14808# need to make the FD available again.
14809if test "$no_create" != yes; then
14810 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014811 ac_config_status_args=
14812 test "$silent" = yes &&
14813 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000014814 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000014815 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000014816 exec 5>>config.log
14817 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14818 # would make configure fail if this is the last instruction.
Matthias Kloseb9621712010-04-24 17:59:49 +000014819 $ac_cs_success || as_fn_exit $?
14820fi
14821if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14823$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014824fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014825
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014826
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014827echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014828if test ! -f Modules/Setup
14829then
14830 cp $srcdir/Modules/Setup.dist Modules/Setup
14831fi
14832
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014833echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014834if test ! -f Modules/Setup.local
14835then
14836 echo "# Edit this file for local setup changes" >Modules/Setup.local
14837fi
14838
14839echo "creating Makefile"
14840$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
14841 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000014842 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014843mv config.c Modules