blob: 1b084e9a4ebb40a4932cf9ed27d81cf09e664908 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Jesus Cea740f53a2010-04-28 11:35:30 +00002# From configure.in Revision: 80481 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Matthias Kloseb9621712010-04-24 17:59:49 +00004# Generated by GNU Autoconf 2.65 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Matthias Kloseb9621712010-04-24 17:59:49 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
11# Inc.
12#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
220 BASH_ENV=/dev/null
221 ENV=/dev/null
222 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
223 export CONFIG_SHELL
224 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
225fi
226
227 if test x$as_have_required = xno; then :
228 $as_echo "$0: This script requires a shell more modern than all"
229 $as_echo "$0: the shells that I found on your system."
230 if test x${ZSH_VERSION+set} = xset ; then
231 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
232 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
233 else
234 $as_echo "$0: Please tell bug-autoconf@gnu.org and
235$0: http://bugs.python.org/ about your system, including
236$0: any error possibly output before this message. Then
237$0: install a modern shell, or manually run the script
238$0: under such a shell if you do have one."
239 fi
240 exit 1
241fi
242fi
243fi
244SHELL=${CONFIG_SHELL-/bin/sh}
245export SHELL
246# Unset more variables known to interfere with behavior of common tools.
247CLICOLOR_FORCE= GREP_OPTIONS=
248unset CLICOLOR_FORCE GREP_OPTIONS
249
250## --------------------- ##
251## M4sh Shell Functions. ##
252## --------------------- ##
253# as_fn_unset VAR
254# ---------------
255# Portably unset VAR.
256as_fn_unset ()
257{
258 { eval $1=; unset $1;}
259}
260as_unset=as_fn_unset
261
262# as_fn_set_status STATUS
263# -----------------------
264# Set $? to STATUS, without forking.
265as_fn_set_status ()
266{
267 return $1
268} # as_fn_set_status
269
270# as_fn_exit STATUS
271# -----------------
272# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
273as_fn_exit ()
274{
275 set +e
276 as_fn_set_status $1
277 exit $1
278} # as_fn_exit
279
280# as_fn_mkdir_p
281# -------------
282# Create "$as_dir" as a directory, including parents if necessary.
283as_fn_mkdir_p ()
284{
285
286 case $as_dir in #(
287 -*) as_dir=./$as_dir;;
288 esac
289 test -d "$as_dir" || eval $as_mkdir_p || {
290 as_dirs=
291 while :; do
292 case $as_dir in #(
293 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
294 *) as_qdir=$as_dir;;
295 esac
296 as_dirs="'$as_qdir' $as_dirs"
297 as_dir=`$as_dirname -- "$as_dir" ||
298$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
299 X"$as_dir" : 'X\(//\)[^/]' \| \
300 X"$as_dir" : 'X\(//\)$' \| \
301 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
302$as_echo X"$as_dir" |
303 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)[^/].*/{
308 s//\1/
309 q
310 }
311 /^X\(\/\/\)$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\).*/{
316 s//\1/
317 q
318 }
319 s/.*/./; q'`
320 test -d "$as_dir" && break
321 done
322 test -z "$as_dirs" || eval "mkdir $as_dirs"
323 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
324
325
326} # as_fn_mkdir_p
327# as_fn_append VAR VALUE
328# ----------------------
329# Append the text in VALUE to the end of the definition contained in VAR. Take
330# advantage of any shell optimizations that allow amortized linear growth over
331# repeated appends, instead of the typical quadratic growth present in naive
332# implementations.
333if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
334 eval 'as_fn_append ()
335 {
336 eval $1+=\$2
337 }'
338else
339 as_fn_append ()
340 {
341 eval $1=\$$1\$2
342 }
343fi # as_fn_append
344
345# as_fn_arith ARG...
346# ------------------
347# Perform arithmetic evaluation on the ARGs, and store the result in the
348# global $as_val. Take advantage of shells that can avoid forks. The arguments
349# must be portable across $(()) and expr.
350if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
351 eval 'as_fn_arith ()
352 {
353 as_val=$(( $* ))
354 }'
355else
356 as_fn_arith ()
357 {
358 as_val=`expr "$@" || test $? -eq 1`
359 }
360fi # as_fn_arith
361
362
363# as_fn_error ERROR [LINENO LOG_FD]
364# ---------------------------------
365# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
366# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
367# script with status $?, using 1 if that was 0.
368as_fn_error ()
369{
370 as_status=$?; test $as_status -eq 0 && as_status=1
371 if test "$3"; then
372 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
374 fi
375 $as_echo "$as_me: error: $1" >&2
376 as_fn_exit $as_status
377} # as_fn_error
378
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000379if expr a : '\(a\)' >/dev/null 2>&1 &&
380 test "X`expr 00001 : '.*\(...\)'`" = X001; then
381 as_expr=expr
382else
383 as_expr=false
384fi
385
386if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
387 as_basename=basename
388else
389 as_basename=false
390fi
391
Matthias Kloseb9621712010-04-24 17:59:49 +0000392if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
393 as_dirname=dirname
394else
395 as_dirname=false
396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000397
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000398as_me=`$as_basename -- "$0" ||
399$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
400 X"$0" : 'X\(//\)$' \| \
401 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000402$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000403 sed '/^.*\/\([^/][^/]*\)\/*$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\/\)$/{
408 s//\1/
409 q
410 }
411 /^X\/\(\/\).*/{
412 s//\1/
413 q
414 }
415 s/.*/./; q'`
416
Matthias Kloseb9621712010-04-24 17:59:49 +0000417# Avoid depending upon Character Ranges.
418as_cr_letters='abcdefghijklmnopqrstuvwxyz'
419as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
420as_cr_Letters=$as_cr_letters$as_cr_LETTERS
421as_cr_digits='0123456789'
422as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000423
424
Matthias Kloseb9621712010-04-24 17:59:49 +0000425 as_lineno_1=$LINENO as_lineno_1a=$LINENO
426 as_lineno_2=$LINENO as_lineno_2a=$LINENO
427 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
428 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
429 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430 sed -n '
431 p
432 /[$]LINENO/=
433 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000434 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000435 s/[$]LINENO.*/&-/
436 t lineno
437 b
438 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000439 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440 :loop
441 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000443 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000444 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000445 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000446 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000447
448 # Don't try to exec as it changes $[0], causing all sort of problems
449 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 # original and so on. Autoconf is especially sensitive to this).
451 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 # Exit status is that of the last command.
453 exit
454}
455
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000457case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000458-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000459 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000460 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000461 xy) ECHO_C='\c';;
462 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
463 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000464 esac;;
465*)
466 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000467esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000468
Martin v. Löwis11437992002-04-12 09:54:03 +0000469rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000470if test -d conf$$.dir; then
471 rm -f conf$$.dir/conf$$.file
472else
473 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000474 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000475fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000476if (echo >conf$$.file) 2>/dev/null; then
477 if ln -s conf$$.file conf$$ 2>/dev/null; then
478 as_ln_s='ln -s'
479 # ... but there are two gotchas:
480 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
481 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
482 # In both cases, we have to default to `cp -p'.
483 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
484 as_ln_s='cp -p'
485 elif ln conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s=ln
487 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000490else
491 as_ln_s='cp -p'
492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000493rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
494rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000495
Skip Montanaro6dead952003-09-25 14:50:04 +0000496if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000497 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000498else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000499 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000500 as_mkdir_p=false
501fi
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503if test -x / >/dev/null 2>&1; then
504 as_test_x='test -x'
505else
506 if ls -dL / >/dev/null 2>&1; then
507 as_ls_L_option=L
508 else
509 as_ls_L_option=
510 fi
511 as_test_x='
512 eval sh -c '\''
513 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000514 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000515 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000516 case $1 in #(
517 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000519 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000520 ???[sx]*):;;*)false;;esac;fi
521 '\'' sh
522 '
523fi
524as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000525
526# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000527as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000528
529# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000530as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000531
532
Matthias Kloseb9621712010-04-24 17:59:49 +0000533test -n "$DJDIR" || exec 7<&0 </dev/null
534exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000535
536# Name of the host.
537# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
538# so uname gets run too.
539ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
540
Martin v. Löwis11437992002-04-12 09:54:03 +0000541#
542# Initializations.
543#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000545ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000546ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000547LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000548cross_compiling=no
549subdirs=
550MFLAGS=
551MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
Martin v. Löwis11437992002-04-12 09:54:03 +0000553# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000554PACKAGE_NAME='python'
555PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000556PACKAGE_VERSION='3.2'
557PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000558PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000559PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
561ac_unique_file="Include/object.h"
562# Factoring default headers for most tests.
563ac_includes_default="\
564#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000565#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# include <sys/types.h>
567#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000569# include <sys/stat.h>
570#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000571#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000572# include <stdlib.h>
573# include <stddef.h>
574#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <stdlib.h>
577# endif
578#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000579#ifdef HAVE_STRING_H
580# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# include <memory.h>
582# endif
583# include <string.h>
584#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000585#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000586# include <strings.h>
587#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000588#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000590#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000591#ifdef HAVE_STDINT_H
592# include <stdint.h>
593#endif
594#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000595# include <unistd.h>
596#endif"
597
Matthias Kloseb9621712010-04-24 17:59:49 +0000598ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000599SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000600THREADHEADERS
601LIBC
602LIBM
603HAVE_GETHOSTBYNAME
604HAVE_GETHOSTBYNAME_R
605HAVE_GETHOSTBYNAME_R_3_ARG
606HAVE_GETHOSTBYNAME_R_5_ARG
607HAVE_GETHOSTBYNAME_R_6_ARG
608LIBOBJS
609TRUE
610MACHDEP_OBJS
611DYNLOADFILE
612DLINCLDIR
613THREADOBJ
614LDLAST
615USE_THREAD_MODULE
616SIGNAL_OBJS
617USE_SIGNAL_MODULE
618LIBFFI_INCLUDEDIR
619PKG_CONFIG
620SHLIBS
621CFLAGSFORSHARED
622LINKFORSHARED
623CCSHARED
624BLDSHARED
625LDCXXSHARED
626LDSHARED
627SO
628LIBTOOL_CRUFT
629OTHER_LIBTOOL_OPT
630UNIVERSAL_ARCH_FLAGS
631BASECFLAGS
632OPT
633LN
634INSTALL_DATA
635INSTALL_SCRIPT
636INSTALL_PROGRAM
637SVNVERSION
638ARFLAGS
639AR
640RANLIB
641GNULD
642LINKCC
643RUNSHARED
644INSTSONAME
645LDLIBRARYDIR
646BLDLIBRARY
647DLLLIBRARY
648LDLIBRARY
649LIBRARY
650BUILDEXEEXT
651EGREP
652GREP
653CPP
654MAINCC
655CXX
656OBJEXT
657EXEEXT
658ac_ct_CC
659CPPFLAGS
660LDFLAGS
661CFLAGS
662CC
663EXPORT_MACOSX_DEPLOYMENT_TARGET
664CONFIGURE_MACOSX_DEPLOYMENT_TARGET
665SGI_ABI
666MACHDEP
667FRAMEWORKUNIXTOOLSPREFIX
668FRAMEWORKALTINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKINSTALLLAST
671FRAMEWORKINSTALLFIRST
672PYTHONFRAMEWORKINSTALLDIR
673PYTHONFRAMEWORKPREFIX
674PYTHONFRAMEWORKDIR
675PYTHONFRAMEWORKIDENTIFIER
676PYTHONFRAMEWORK
677LIPO_32BIT_FLAGS
678ARCH_RUN_32BIT
679UNIVERSALSDK
680CONFIG_ARGS
681SOVERSION
682VERSION
683target_alias
684host_alias
685build_alias
686LIBS
687ECHO_T
688ECHO_N
689ECHO_C
690DEFS
691mandir
692localedir
693libdir
694psdir
695pdfdir
696dvidir
697htmldir
698infodir
699docdir
700oldincludedir
701includedir
702localstatedir
703sharedstatedir
704sysconfdir
705datadir
706datarootdir
707libexecdir
708sbindir
709bindir
710program_transform_name
711prefix
712exec_prefix
713PACKAGE_URL
714PACKAGE_BUGREPORT
715PACKAGE_STRING
716PACKAGE_VERSION
717PACKAGE_TARNAME
718PACKAGE_NAME
719PATH_SEPARATOR
720SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000721ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000722ac_user_opts='
723enable_option_checking
724enable_universalsdk
725with_universal_archs
726with_framework_name
727enable_framework
728with_gcc
729with_cxx_main
730with_suffix
731enable_shared
732enable_profiling
733with_pydebug
734with_libs
735with_system_expat
736with_system_ffi
737with_dbmliborder
738with_signal_module
739with_dec_threads
740with_threads
741with_thread
742enable_ipv6
743with_doc_strings
744with_tsc
745with_pymalloc
746with_valgrind
747with_wctype_functions
748with_fpectl
749with_libm
750with_libc
751enable_big_digits
752with_wide_unicode
753with_computed_gotos
754'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000755 ac_precious_vars='build_alias
756host_alias
757target_alias
758CC
759CFLAGS
760LDFLAGS
761LIBS
762CPPFLAGS
763CPP'
764
Guido van Rossum627b2d71993-12-24 10:39:16 +0000765
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000767ac_init_help=
768ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000769ac_unrecognized_opts=
770ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000771# The variables have the same names as the options, with
772# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000773cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000774exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000775no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000776no_recursion=
777prefix=NONE
778program_prefix=NONE
779program_suffix=NONE
780program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000781silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000782site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000783srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000785x_includes=NONE
786x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000787
788# Installation directory options.
789# These are left unexpanded so users can "make install exec_prefix=/foo"
790# and all the variables that are supposed to be based on exec_prefix
791# by default will actually change.
792# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000793# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000794bindir='${exec_prefix}/bin'
795sbindir='${exec_prefix}/sbin'
796libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000797datarootdir='${prefix}/share'
798datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000799sysconfdir='${prefix}/etc'
800sharedstatedir='${prefix}/com'
801localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000802includedir='${prefix}/include'
803oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000804docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
805infodir='${datarootdir}/info'
806htmldir='${docdir}'
807dvidir='${docdir}'
808pdfdir='${docdir}'
809psdir='${docdir}'
810libdir='${exec_prefix}/lib'
811localedir='${datarootdir}/locale'
812mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000813
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000817do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818 # If the previous option needs an argument, assign it.
819 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000820 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821 ac_prev=
822 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000823 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000825 case $ac_option in
826 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
827 *) ac_optarg=yes ;;
828 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 # Accept the important Cygnus configure options, so we can diagnose typos.
831
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000832 case $ac_dashdash$ac_option in
833 --)
834 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000836 -bindir | --bindir | --bindi | --bind | --bin | --bi)
837 ac_prev=bindir ;;
838 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000839 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000840
841 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000842 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000843 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000844 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000846 -cache-file | --cache-file | --cache-fil | --cache-fi \
847 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
848 ac_prev=cache_file ;;
849 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
850 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 cache_file=$ac_optarg ;;
852
853 --config-cache | -C)
854 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000856 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000857 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000859 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000860
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
862 | --dataroo | --dataro | --datar)
863 ac_prev=datarootdir ;;
864 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
865 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
866 datarootdir=$ac_optarg ;;
867
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000869 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000871 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
872 as_fn_error "invalid feature name: $ac_useropt"
873 ac_useropt_orig=$ac_useropt
874 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
875 case $ac_user_opts in
876 *"
877"enable_$ac_useropt"
878"*) ;;
879 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
880 ac_unrecognized_sep=', ';;
881 esac
882 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883
884 -docdir | --docdir | --docdi | --doc | --do)
885 ac_prev=docdir ;;
886 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
887 docdir=$ac_optarg ;;
888
889 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
890 ac_prev=dvidir ;;
891 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
892 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
894 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000895 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000896 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000897 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
898 as_fn_error "invalid feature name: $ac_useropt"
899 ac_useropt_orig=$ac_useropt
900 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
901 case $ac_user_opts in
902 *"
903"enable_$ac_useropt"
904"*) ;;
905 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
906 ac_unrecognized_sep=', ';;
907 esac
908 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
911 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
912 | --exec | --exe | --ex)
913 ac_prev=exec_prefix ;;
914 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
915 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
916 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918
919 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000920 # Obsolete; use --with-gas.
921 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 -help | --help | --hel | --he | -h)
924 ac_init_help=long ;;
925 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
926 ac_init_help=recursive ;;
927 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
928 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
930 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
936 ac_prev=htmldir ;;
937 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
938 | --ht=*)
939 htmldir=$ac_optarg ;;
940
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 -includedir | --includedir | --includedi | --included | --include \
942 | --includ | --inclu | --incl | --inc)
943 ac_prev=includedir ;;
944 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
945 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947
948 -infodir | --infodir | --infodi | --infod | --info | --inf)
949 ac_prev=infodir ;;
950 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952
953 -libdir | --libdir | --libdi | --libd)
954 ac_prev=libdir ;;
955 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
958 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
959 | --libexe | --libex | --libe)
960 ac_prev=libexecdir ;;
961 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
962 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000963 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000965 -localedir | --localedir | --localedi | --localed | --locale)
966 ac_prev=localedir ;;
967 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
968 localedir=$ac_optarg ;;
969
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000971 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972 ac_prev=localstatedir ;;
973 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000974 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976
977 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
978 ac_prev=mandir ;;
979 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000983 # Obsolete; use --without-fp.
984 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985
986 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988 no_create=yes ;;
989
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000990 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
991 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
992 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
995 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
996 | --oldin | --oldi | --old | --ol | --o)
997 ac_prev=oldincludedir ;;
998 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
999 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1000 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001002
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1004 ac_prev=prefix ;;
1005 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
1008 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1009 | --program-pre | --program-pr | --program-p)
1010 ac_prev=program_prefix ;;
1011 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1012 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
1015 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1016 | --program-suf | --program-su | --program-s)
1017 ac_prev=program_suffix ;;
1018 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1019 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
1022 -program-transform-name | --program-transform-name \
1023 | --program-transform-nam | --program-transform-na \
1024 | --program-transform-n | --program-transform- \
1025 | --program-transform | --program-transfor \
1026 | --program-transfo | --program-transf \
1027 | --program-trans | --program-tran \
1028 | --progr-tra | --program-tr | --program-t)
1029 ac_prev=program_transform_name ;;
1030 -program-transform-name=* | --program-transform-name=* \
1031 | --program-transform-nam=* | --program-transform-na=* \
1032 | --program-transform-n=* | --program-transform-=* \
1033 | --program-transform=* | --program-transfor=* \
1034 | --program-transfo=* | --program-transf=* \
1035 | --program-trans=* | --program-tran=* \
1036 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001039 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1040 ac_prev=pdfdir ;;
1041 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1042 pdfdir=$ac_optarg ;;
1043
1044 -psdir | --psdir | --psdi | --psd | --ps)
1045 ac_prev=psdir ;;
1046 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1047 psdir=$ac_optarg ;;
1048
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1050 | -silent | --silent | --silen | --sile | --sil)
1051 silent=yes ;;
1052
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1054 ac_prev=sbindir ;;
1055 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1056 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
1059 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1060 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1061 | --sharedst | --shareds | --shared | --share | --shar \
1062 | --sha | --sh)
1063 ac_prev=sharedstatedir ;;
1064 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1065 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1066 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1067 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 -site | --site | --sit)
1071 ac_prev=site ;;
1072 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1076 ac_prev=srcdir ;;
1077 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1081 | --syscon | --sysco | --sysc | --sys | --sy)
1082 ac_prev=sysconfdir ;;
1083 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1084 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001086
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1093 verbose=yes ;;
1094
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 -version | --version | --versio | --versi | --vers | -V)
1096 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001099 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001100 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001101 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1102 as_fn_error "invalid package name: $ac_useropt"
1103 ac_useropt_orig=$ac_useropt
1104 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1105 case $ac_user_opts in
1106 *"
1107"with_$ac_useropt"
1108"*) ;;
1109 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1110 ac_unrecognized_sep=', ';;
1111 esac
1112 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001115 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001116 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001117 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1118 as_fn_error "invalid package name: $ac_useropt"
1119 ac_useropt_orig=$ac_useropt
1120 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1121 case $ac_user_opts in
1122 *"
1123"with_$ac_useropt"
1124"*) ;;
1125 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1126 ac_unrecognized_sep=', ';;
1127 esac
1128 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001130 --x)
1131 # Obsolete; use --with-x.
1132 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133
1134 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1135 | --x-incl | --x-inc | --x-in | --x-i)
1136 ac_prev=x_includes ;;
1137 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1138 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140
1141 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1142 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1143 ac_prev=x_libraries ;;
1144 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1145 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
Matthias Kloseb9621712010-04-24 17:59:49 +00001148 -*) as_fn_error "unrecognized option: \`$ac_option'
1149Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150 ;;
1151
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 *=*)
1153 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1154 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001155 case $ac_envvar in #(
1156 '' | [0-9]* | *[!_$as_cr_alnum]* )
1157 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1158 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001159 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 export $ac_envvar ;;
1161
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001164 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001166 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168 ;;
1169
1170 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001171done
1172
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176fi
1177
Matthias Kloseb9621712010-04-24 17:59:49 +00001178if test -n "$ac_unrecognized_opts"; then
1179 case $enable_option_checking in
1180 no) ;;
1181 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1182 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1183 esac
1184fi
1185
1186# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001187for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1188 datadir sysconfdir sharedstatedir localstatedir includedir \
1189 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1190 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001192 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 # Remove trailing slashes.
1194 case $ac_val in
1195 */ )
1196 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1197 eval $ac_var=\$ac_val;;
1198 esac
1199 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001201 [\\/$]* | ?:[\\/]* ) continue;;
1202 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001205done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001206
Martin v. Löwis11437992002-04-12 09:54:03 +00001207# There might be people who depend on the old broken behavior: `$host'
1208# used to hold the argument of --host etc.
1209# FIXME: To remove some day.
1210build=$build_alias
1211host=$host_alias
1212target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213
Martin v. Löwis11437992002-04-12 09:54:03 +00001214# FIXME: To remove some day.
1215if test "x$host_alias" != x; then
1216 if test "x$build_alias" = x; then
1217 cross_compiling=maybe
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 If a cross compiler is detected then cross compile mode will be used." >&2
1220 elif test "x$build_alias" != "x$host_alias"; then
1221 cross_compiling=yes
1222 fi
1223fi
1224
1225ac_tool_prefix=
1226test -n "$host_alias" && ac_tool_prefix=$host_alias-
1227
1228test "$silent" = yes && exec 6>/dev/null
1229
Guido van Rossum627b2d71993-12-24 10:39:16 +00001230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001231ac_pwd=`pwd` && test -n "$ac_pwd" &&
1232ac_ls_di=`ls -di .` &&
1233ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Matthias Kloseb9621712010-04-24 17:59:49 +00001234 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001235test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Matthias Kloseb9621712010-04-24 17:59:49 +00001236 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001237
1238
Guido van Rossum627b2d71993-12-24 10:39:16 +00001239# Find the source files, if location was not specified.
1240if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001242 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001243 ac_confdir=`$as_dirname -- "$as_myself" ||
1244$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1245 X"$as_myself" : 'X\(//\)[^/]' \| \
1246 X"$as_myself" : 'X\(//\)$' \| \
1247 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1248$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001249 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1250 s//\1/
1251 q
1252 }
1253 /^X\(\/\/\)[^/].*/{
1254 s//\1/
1255 q
1256 }
1257 /^X\(\/\/\)$/{
1258 s//\1/
1259 q
1260 }
1261 /^X\(\/\).*/{
1262 s//\1/
1263 q
1264 }
1265 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001268 srcdir=..
1269 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001270else
1271 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001273if test ! -r "$srcdir/$ac_unique_file"; then
1274 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Matthias Kloseb9621712010-04-24 17:59:49 +00001275 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1278ac_abs_confdir=`(
Matthias Kloseb9621712010-04-24 17:59:49 +00001279 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001280 pwd)`
1281# When building in place, set srcdir=.
1282if test "$ac_abs_confdir" = "$ac_pwd"; then
1283 srcdir=.
1284fi
1285# Remove unnecessary trailing slashes from srcdir.
1286# Double slashes in file names in object file debugging info
1287# mess up M-x gdb in Emacs.
1288case $srcdir in
1289*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1290esac
1291for ac_var in $ac_precious_vars; do
1292 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1293 eval ac_env_${ac_var}_value=\$${ac_var}
1294 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1295 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1296done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001297
Martin v. Löwis11437992002-04-12 09:54:03 +00001298#
1299# Report the --help message.
1300#
1301if test "$ac_init_help" = "long"; then
1302 # Omit some internal or obsolete options to make the list less imposing.
1303 # This message is too long to be a string in the A/UX 3.1 sh.
1304 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001305\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001306
1307Usage: $0 [OPTION]... [VAR=VALUE]...
1308
1309To assign environment variables (e.g., CC, CFLAGS...), specify them as
1310VAR=VALUE. See below for descriptions of some of the useful variables.
1311
1312Defaults for the options are specified in brackets.
1313
1314Configuration:
1315 -h, --help display this help and exit
1316 --help=short display options specific to this package
1317 --help=recursive display the short help of all the included packages
1318 -V, --version display version information and exit
1319 -q, --quiet, --silent do not print \`checking...' messages
1320 --cache-file=FILE cache test results in FILE [disabled]
1321 -C, --config-cache alias for \`--cache-file=config.cache'
1322 -n, --no-create do not create output files
1323 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1324
Martin v. Löwis11437992002-04-12 09:54:03 +00001325Installation directories:
1326 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001327 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001328 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001329 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001330
1331By default, \`make install' will install all the files in
1332\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1333an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1334for instance \`--prefix=\$HOME'.
1335
1336For better control, use the options below.
1337
1338Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001339 --bindir=DIR user executables [EPREFIX/bin]
1340 --sbindir=DIR system admin executables [EPREFIX/sbin]
1341 --libexecdir=DIR program executables [EPREFIX/libexec]
1342 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1343 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1344 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1345 --libdir=DIR object code libraries [EPREFIX/lib]
1346 --includedir=DIR C header files [PREFIX/include]
1347 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1348 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1349 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1350 --infodir=DIR info documentation [DATAROOTDIR/info]
1351 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1352 --mandir=DIR man documentation [DATAROOTDIR/man]
1353 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1354 --htmldir=DIR html documentation [DOCDIR]
1355 --dvidir=DIR dvi documentation [DOCDIR]
1356 --pdfdir=DIR pdf documentation [DOCDIR]
1357 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001358_ACEOF
1359
1360 cat <<\_ACEOF
1361_ACEOF
1362fi
1363
1364if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001365 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001366 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001367 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001368 cat <<\_ACEOF
1369
1370Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001371 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001372 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1373 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001374 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001375 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001376 --enable-framework[=INSTALLDIR]
1377 Build (MacOSX|Darwin) framework
1378 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001379 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001380 --enable-ipv6 Enable ipv6 (with ipv4) support
1381 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001382 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001383 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001384
1385Optional Packages:
1386 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1387 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001388 --with-universal-archs=ARCH
1389 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001390 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001391 --with-framework-name=FRAMEWORK
1392 specify an alternate name of the framework built
1393 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001394 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001395 --with-cxx-main=<compiler>
1396 compile main() and link python executable with C++
1397 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001398 --with-suffix=.exe set executable suffix
1399 --with-pydebug build with Py_DEBUG defined
1400 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001401 --with-system-expat build pyexpat module using an installed expat
1402 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001403 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001404 --with-dbmliborder=db1:db2:...
1405 order to check db backends for dbm. Valid value is a
1406 colon separated string with the backend names
1407 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001408 --with-signal-module disable/enable signal module
1409 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1410 --with(out)-threads[=DIRECTORY]
1411 disable/enable thread support
1412 --with(out)-thread[=DIRECTORY]
1413 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001414 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001415 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001416 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001417 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with-fpectl enable SIGFPE catching
1420 --with-libm=STRING math library
1421 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001422 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001423 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1424 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
1426Some influential environment variables:
1427 CC C compiler command
1428 CFLAGS C compiler flags
1429 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1430 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001431 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001432 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001433 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 CPP C preprocessor
1435
1436Use these variables to override the choices made by `configure' or to help
1437it to find libraries and programs with nonstandard names/locations.
1438
Georg Brandle2e15612009-05-20 18:25:10 +00001439Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001440_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001441ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001442fi
1443
1444if test "$ac_init_help" = "recursive"; then
1445 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001446 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001447 test -d "$ac_dir" ||
1448 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1449 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001450 ac_builddir=.
1451
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001452case "$ac_dir" in
1453.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1454*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001455 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001456 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001457 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001458 case $ac_top_builddir_sub in
1459 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1460 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1461 esac ;;
1462esac
1463ac_abs_top_builddir=$ac_pwd
1464ac_abs_builddir=$ac_pwd$ac_dir_suffix
1465# for backward compatibility:
1466ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001467
1468case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001469 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001471 ac_top_srcdir=$ac_top_builddir_sub
1472 ac_abs_top_srcdir=$ac_pwd ;;
1473 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001475 ac_top_srcdir=$srcdir
1476 ac_abs_top_srcdir=$srcdir ;;
1477 *) # Relative name.
1478 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1479 ac_top_srcdir=$ac_top_build_prefix$srcdir
1480 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001481esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001482ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001484 cd "$ac_dir" || { ac_status=$?; continue; }
1485 # Check for guested configure.
1486 if test -f "$ac_srcdir/configure.gnu"; then
1487 echo &&
1488 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1489 elif test -f "$ac_srcdir/configure"; then
1490 echo &&
1491 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001493 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494 fi || ac_status=$?
1495 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001496 done
1497fi
1498
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001500if $ac_init_version; then
1501 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001502python configure 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +00001503generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001504
Matthias Kloseb9621712010-04-24 17:59:49 +00001505Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001506This configure script is free software; the Free Software Foundation
1507gives unlimited permission to copy, distribute and modify it.
1508_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001509 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001511
1512## ------------------------ ##
1513## Autoconf initialization. ##
1514## ------------------------ ##
1515
1516# ac_fn_c_try_compile LINENO
1517# --------------------------
1518# Try to compile conftest.$ac_ext, and return whether this succeeded.
1519ac_fn_c_try_compile ()
1520{
1521 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1522 rm -f conftest.$ac_objext
1523 if { { ac_try="$ac_compile"
1524case "(($ac_try" in
1525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1526 *) ac_try_echo=$ac_try;;
1527esac
1528eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1529$as_echo "$ac_try_echo"; } >&5
1530 (eval "$ac_compile") 2>conftest.err
1531 ac_status=$?
1532 if test -s conftest.err; then
1533 grep -v '^ *+' conftest.err >conftest.er1
1534 cat conftest.er1 >&5
1535 mv -f conftest.er1 conftest.err
1536 fi
1537 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1538 test $ac_status = 0; } && {
1539 test -z "$ac_c_werror_flag" ||
1540 test ! -s conftest.err
1541 } && test -s conftest.$ac_objext; then :
1542 ac_retval=0
1543else
1544 $as_echo "$as_me: failed program was:" >&5
1545sed 's/^/| /' conftest.$ac_ext >&5
1546
1547 ac_retval=1
1548fi
1549 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1550 as_fn_set_status $ac_retval
1551
1552} # ac_fn_c_try_compile
1553
1554# ac_fn_c_try_cpp LINENO
1555# ----------------------
1556# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1557ac_fn_c_try_cpp ()
1558{
1559 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1560 if { { ac_try="$ac_cpp conftest.$ac_ext"
1561case "(($ac_try" in
1562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1563 *) ac_try_echo=$ac_try;;
1564esac
1565eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1566$as_echo "$ac_try_echo"; } >&5
1567 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1568 ac_status=$?
1569 if test -s conftest.err; then
1570 grep -v '^ *+' conftest.err >conftest.er1
1571 cat conftest.er1 >&5
1572 mv -f conftest.er1 conftest.err
1573 fi
1574 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1575 test $ac_status = 0; } >/dev/null && {
1576 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1577 test ! -s conftest.err
1578 }; then :
1579 ac_retval=0
1580else
1581 $as_echo "$as_me: failed program was:" >&5
1582sed 's/^/| /' conftest.$ac_ext >&5
1583
1584 ac_retval=1
1585fi
1586 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1587 as_fn_set_status $ac_retval
1588
1589} # ac_fn_c_try_cpp
1590
1591# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1592# -------------------------------------------------------
1593# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1594# the include files in INCLUDES and setting the cache variable VAR
1595# accordingly.
1596ac_fn_c_check_header_mongrel ()
1597{
1598 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1599 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1601$as_echo_n "checking for $2... " >&6; }
1602if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1603 $as_echo_n "(cached) " >&6
1604fi
1605eval ac_res=\$$3
1606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1607$as_echo "$ac_res" >&6; }
1608else
1609 # Is the header compilable?
1610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1611$as_echo_n "checking $2 usability... " >&6; }
1612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1613/* end confdefs.h. */
1614$4
1615#include <$2>
1616_ACEOF
1617if ac_fn_c_try_compile "$LINENO"; then :
1618 ac_header_compiler=yes
1619else
1620 ac_header_compiler=no
1621fi
1622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1624$as_echo "$ac_header_compiler" >&6; }
1625
1626# Is the header present?
1627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1628$as_echo_n "checking $2 presence... " >&6; }
1629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1630/* end confdefs.h. */
1631#include <$2>
1632_ACEOF
1633if ac_fn_c_try_cpp "$LINENO"; then :
1634 ac_header_preproc=yes
1635else
1636 ac_header_preproc=no
1637fi
1638rm -f conftest.err conftest.$ac_ext
1639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1640$as_echo "$ac_header_preproc" >&6; }
1641
1642# So? What about this header?
1643case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1644 yes:no: )
1645 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1646$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1647 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1648$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1649 ;;
1650 no:yes:* )
1651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1652$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1654$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1656$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1657 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1658$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1659 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1660$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1661( cat <<\_ASBOX
1662## -------------------------------------- ##
1663## Report this to http://bugs.python.org/ ##
1664## -------------------------------------- ##
1665_ASBOX
1666 ) | sed "s/^/$as_me: WARNING: /" >&2
1667 ;;
1668esac
1669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1670$as_echo_n "checking for $2... " >&6; }
1671if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1672 $as_echo_n "(cached) " >&6
1673else
1674 eval "$3=\$ac_header_compiler"
1675fi
1676eval ac_res=\$$3
1677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1678$as_echo "$ac_res" >&6; }
1679fi
1680 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1681
1682} # ac_fn_c_check_header_mongrel
1683
1684# ac_fn_c_try_run LINENO
1685# ----------------------
1686# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1687# that executables *can* be run.
1688ac_fn_c_try_run ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691 if { { ac_try="$ac_link"
1692case "(($ac_try" in
1693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694 *) ac_try_echo=$ac_try;;
1695esac
1696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697$as_echo "$ac_try_echo"; } >&5
1698 (eval "$ac_link") 2>&5
1699 ac_status=$?
1700 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1701 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1702 { { case "(($ac_try" in
1703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1704 *) ac_try_echo=$ac_try;;
1705esac
1706eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1707$as_echo "$ac_try_echo"; } >&5
1708 (eval "$ac_try") 2>&5
1709 ac_status=$?
1710 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1711 test $ac_status = 0; }; }; then :
1712 ac_retval=0
1713else
1714 $as_echo "$as_me: program exited with status $ac_status" >&5
1715 $as_echo "$as_me: failed program was:" >&5
1716sed 's/^/| /' conftest.$ac_ext >&5
1717
1718 ac_retval=$ac_status
1719fi
1720 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1721 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1722 as_fn_set_status $ac_retval
1723
1724} # ac_fn_c_try_run
1725
1726# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1727# -------------------------------------------------------
1728# Tests whether HEADER exists and can be compiled using the include files in
1729# INCLUDES, setting the cache variable VAR accordingly.
1730ac_fn_c_check_header_compile ()
1731{
1732 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1734$as_echo_n "checking for $2... " >&6; }
1735if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1736 $as_echo_n "(cached) " >&6
1737else
1738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1739/* end confdefs.h. */
1740$4
1741#include <$2>
1742_ACEOF
1743if ac_fn_c_try_compile "$LINENO"; then :
1744 eval "$3=yes"
1745else
1746 eval "$3=no"
1747fi
1748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1749fi
1750eval ac_res=\$$3
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1752$as_echo "$ac_res" >&6; }
1753 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1754
1755} # ac_fn_c_check_header_compile
1756
1757# ac_fn_c_try_link LINENO
1758# -----------------------
1759# Try to link conftest.$ac_ext, and return whether this succeeded.
1760ac_fn_c_try_link ()
1761{
1762 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1763 rm -f conftest.$ac_objext conftest$ac_exeext
1764 if { { ac_try="$ac_link"
1765case "(($ac_try" in
1766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1767 *) ac_try_echo=$ac_try;;
1768esac
1769eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1770$as_echo "$ac_try_echo"; } >&5
1771 (eval "$ac_link") 2>conftest.err
1772 ac_status=$?
1773 if test -s conftest.err; then
1774 grep -v '^ *+' conftest.err >conftest.er1
1775 cat conftest.er1 >&5
1776 mv -f conftest.er1 conftest.err
1777 fi
1778 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1779 test $ac_status = 0; } && {
1780 test -z "$ac_c_werror_flag" ||
1781 test ! -s conftest.err
1782 } && test -s conftest$ac_exeext && {
1783 test "$cross_compiling" = yes ||
1784 $as_test_x conftest$ac_exeext
1785 }; then :
1786 ac_retval=0
1787else
1788 $as_echo "$as_me: failed program was:" >&5
1789sed 's/^/| /' conftest.$ac_ext >&5
1790
1791 ac_retval=1
1792fi
1793 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1794 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1795 # interfere with the next link command; also delete a directory that is
1796 # left behind by Apple's compiler. We do this before executing the actions.
1797 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1798 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1799 as_fn_set_status $ac_retval
1800
1801} # ac_fn_c_try_link
1802
1803# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1804# -------------------------------------------
1805# Tests whether TYPE exists after having included INCLUDES, setting cache
1806# variable VAR accordingly.
1807ac_fn_c_check_type ()
1808{
1809 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1811$as_echo_n "checking for $2... " >&6; }
1812if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1813 $as_echo_n "(cached) " >&6
1814else
1815 eval "$3=no"
1816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1817/* end confdefs.h. */
1818$4
1819int
1820main ()
1821{
1822if (sizeof ($2))
1823 return 0;
1824 ;
1825 return 0;
1826}
1827_ACEOF
1828if ac_fn_c_try_compile "$LINENO"; then :
1829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1830/* end confdefs.h. */
1831$4
1832int
1833main ()
1834{
1835if (sizeof (($2)))
1836 return 0;
1837 ;
1838 return 0;
1839}
1840_ACEOF
1841if ac_fn_c_try_compile "$LINENO"; then :
1842
1843else
1844 eval "$3=yes"
1845fi
1846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1847fi
1848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1849fi
1850eval ac_res=\$$3
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1852$as_echo "$ac_res" >&6; }
1853 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1854
1855} # ac_fn_c_check_type
1856
1857# ac_fn_c_find_uintX_t LINENO BITS VAR
1858# ------------------------------------
1859# Finds an unsigned integer type with width BITS, setting cache variable VAR
1860# accordingly.
1861ac_fn_c_find_uintX_t ()
1862{
1863 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1865$as_echo_n "checking for uint$2_t... " >&6; }
1866if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1867 $as_echo_n "(cached) " >&6
1868else
1869 eval "$3=no"
1870 # Order is important - never check a type that is potentially smaller
1871 # than half of the expected target width.
1872 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1873 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1875/* end confdefs.h. */
1876$ac_includes_default
1877int
1878main ()
1879{
1880static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1881test_array [0] = 0
1882
1883 ;
1884 return 0;
1885}
1886_ACEOF
1887if ac_fn_c_try_compile "$LINENO"; then :
1888 case $ac_type in #(
1889 uint$2_t) :
1890 eval "$3=yes" ;; #(
1891 *) :
1892 eval "$3=\$ac_type" ;;
1893esac
1894fi
1895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1896 eval as_val=\$$3
1897 if test "x$as_val" = x""no; then :
1898
1899else
1900 break
1901fi
1902 done
1903fi
1904eval ac_res=\$$3
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1906$as_echo "$ac_res" >&6; }
1907 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1908
1909} # ac_fn_c_find_uintX_t
1910
1911# ac_fn_c_find_intX_t LINENO BITS VAR
1912# -----------------------------------
1913# Finds a signed integer type with width BITS, setting cache variable VAR
1914# accordingly.
1915ac_fn_c_find_intX_t ()
1916{
1917 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1919$as_echo_n "checking for int$2_t... " >&6; }
1920if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1921 $as_echo_n "(cached) " >&6
1922else
1923 eval "$3=no"
1924 # Order is important - never check a type that is potentially smaller
1925 # than half of the expected target width.
1926 for ac_type in int$2_t 'int' 'long int' \
1927 'long long int' 'short int' 'signed char'; do
1928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1929/* end confdefs.h. */
1930$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001931int
1932main ()
1933{
Jesus Cea740f53a2010-04-28 11:35:30 +00001934static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1935 0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001936test_array [0] = 0
1937
1938 ;
1939 return 0;
1940}
1941_ACEOF
1942if ac_fn_c_try_compile "$LINENO"; then :
1943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944/* end confdefs.h. */
1945$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001946int
1947main ()
1948{
Jesus Cea740f53a2010-04-28 11:35:30 +00001949static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1950 ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001951 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1952test_array [0] = 0
1953
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959
1960else
1961 case $ac_type in #(
1962 int$2_t) :
1963 eval "$3=yes" ;; #(
1964 *) :
1965 eval "$3=\$ac_type" ;;
1966esac
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969fi
1970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1971 eval as_val=\$$3
1972 if test "x$as_val" = x""no; then :
1973
1974else
1975 break
1976fi
1977 done
1978fi
1979eval ac_res=\$$3
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1981$as_echo "$ac_res" >&6; }
1982 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1983
1984} # ac_fn_c_find_intX_t
1985
1986# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1987# --------------------------------------------
1988# Tries to find the compile-time value of EXPR in a program that includes
1989# INCLUDES, setting VAR accordingly. Returns whether the value could be
1990# computed
1991ac_fn_c_compute_int ()
1992{
1993 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994 if test "$cross_compiling" = yes; then
1995 # Depending upon the size, compute the lo and hi bounds.
1996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1997/* end confdefs.h. */
1998$4
1999int
2000main ()
2001{
2002static int test_array [1 - 2 * !(($2) >= 0)];
2003test_array [0] = 0
2004
2005 ;
2006 return 0;
2007}
2008_ACEOF
2009if ac_fn_c_try_compile "$LINENO"; then :
2010 ac_lo=0 ac_mid=0
2011 while :; do
2012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$4
2015int
2016main ()
2017{
2018static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2019test_array [0] = 0
2020
2021 ;
2022 return 0;
2023}
2024_ACEOF
2025if ac_fn_c_try_compile "$LINENO"; then :
2026 ac_hi=$ac_mid; break
2027else
2028 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2029 if test $ac_lo -le $ac_mid; then
2030 ac_lo= ac_hi=
2031 break
2032 fi
2033 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2034fi
2035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2036 done
2037else
2038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2039/* end confdefs.h. */
2040$4
2041int
2042main ()
2043{
2044static int test_array [1 - 2 * !(($2) < 0)];
2045test_array [0] = 0
2046
2047 ;
2048 return 0;
2049}
2050_ACEOF
2051if ac_fn_c_try_compile "$LINENO"; then :
2052 ac_hi=-1 ac_mid=-1
2053 while :; do
2054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2061test_array [0] = 0
2062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_lo=$ac_mid; break
2069else
2070 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2071 if test $ac_mid -le $ac_hi; then
2072 ac_lo= ac_hi=
2073 break
2074 fi
2075 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078 done
2079else
2080 ac_lo= ac_hi=
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085# Binary search between lo and hi bounds.
2086while test "x$ac_lo" != "x$ac_hi"; do
2087 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
2092main ()
2093{
2094static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2095test_array [0] = 0
2096
2097 ;
2098 return 0;
2099}
2100_ACEOF
2101if ac_fn_c_try_compile "$LINENO"; then :
2102 ac_hi=$ac_mid
2103else
2104 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2105fi
2106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2107done
2108case $ac_lo in #((
2109?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2110'') ac_retval=1 ;;
2111esac
2112 else
2113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2114/* end confdefs.h. */
2115$4
2116static long int longval () { return $2; }
2117static unsigned long int ulongval () { return $2; }
2118#include <stdio.h>
2119#include <stdlib.h>
2120int
2121main ()
2122{
2123
2124 FILE *f = fopen ("conftest.val", "w");
2125 if (! f)
2126 return 1;
2127 if (($2) < 0)
2128 {
2129 long int i = longval ();
2130 if (i != ($2))
2131 return 1;
2132 fprintf (f, "%ld", i);
2133 }
2134 else
2135 {
2136 unsigned long int i = ulongval ();
2137 if (i != ($2))
2138 return 1;
2139 fprintf (f, "%lu", i);
2140 }
2141 /* Do not output a trailing newline, as this causes \r\n confusion
2142 on some platforms. */
2143 return ferror (f) || fclose (f) != 0;
2144
2145 ;
2146 return 0;
2147}
2148_ACEOF
2149if ac_fn_c_try_run "$LINENO"; then :
2150 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2151else
2152 ac_retval=1
2153fi
2154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2155 conftest.$ac_objext conftest.beam conftest.$ac_ext
2156rm -f conftest.val
2157
2158 fi
2159 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2160 as_fn_set_status $ac_retval
2161
2162} # ac_fn_c_compute_int
2163
2164# ac_fn_c_check_func LINENO FUNC VAR
2165# ----------------------------------
2166# Tests whether FUNC exists, setting the cache variable VAR accordingly
2167ac_fn_c_check_func ()
2168{
2169 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2171$as_echo_n "checking for $2... " >&6; }
2172if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2173 $as_echo_n "(cached) " >&6
2174else
2175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2176/* end confdefs.h. */
2177/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2178 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2179#define $2 innocuous_$2
2180
2181/* System header to define __stub macros and hopefully few prototypes,
2182 which can conflict with char $2 (); below.
2183 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2184 <limits.h> exists even on freestanding compilers. */
2185
2186#ifdef __STDC__
2187# include <limits.h>
2188#else
2189# include <assert.h>
2190#endif
2191
2192#undef $2
2193
2194/* Override any GCC internal prototype to avoid an error.
2195 Use char because int might match the return type of a GCC
2196 builtin and then its argument prototype would still apply. */
2197#ifdef __cplusplus
2198extern "C"
2199#endif
2200char $2 ();
2201/* The GNU C library defines this for functions which it implements
2202 to always fail with ENOSYS. Some functions are actually named
2203 something starting with __ and the normal name is an alias. */
2204#if defined __stub_$2 || defined __stub___$2
2205choke me
2206#endif
2207
2208int
2209main ()
2210{
2211return $2 ();
2212 ;
2213 return 0;
2214}
2215_ACEOF
2216if ac_fn_c_try_link "$LINENO"; then :
2217 eval "$3=yes"
2218else
2219 eval "$3=no"
2220fi
2221rm -f core conftest.err conftest.$ac_objext \
2222 conftest$ac_exeext conftest.$ac_ext
2223fi
2224eval ac_res=\$$3
2225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2226$as_echo "$ac_res" >&6; }
2227 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2228
2229} # ac_fn_c_check_func
2230
2231# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2232# ----------------------------------------------------
2233# Tries to find if the field MEMBER exists in type AGGR, after including
2234# INCLUDES, setting cache variable VAR accordingly.
2235ac_fn_c_check_member ()
2236{
2237 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2239$as_echo_n "checking for $2.$3... " >&6; }
2240if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2241 $as_echo_n "(cached) " >&6
2242else
2243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2244/* end confdefs.h. */
2245$5
2246int
2247main ()
2248{
2249static $2 ac_aggr;
2250if (ac_aggr.$3)
2251return 0;
2252 ;
2253 return 0;
2254}
2255_ACEOF
2256if ac_fn_c_try_compile "$LINENO"; then :
2257 eval "$4=yes"
2258else
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260/* end confdefs.h. */
2261$5
2262int
2263main ()
2264{
2265static $2 ac_aggr;
2266if (sizeof ac_aggr.$3)
2267return 0;
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272if ac_fn_c_try_compile "$LINENO"; then :
2273 eval "$4=yes"
2274else
2275 eval "$4=no"
2276fi
2277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2278fi
2279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2280fi
2281eval ac_res=\$$4
2282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2283$as_echo "$ac_res" >&6; }
2284 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2285
2286} # ac_fn_c_check_member
2287
2288# ac_fn_c_check_decl LINENO SYMBOL VAR
2289# ------------------------------------
2290# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2291ac_fn_c_check_decl ()
2292{
2293 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2295$as_echo_n "checking whether $2 is declared... " >&6; }
2296if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2297 $as_echo_n "(cached) " >&6
2298else
2299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2300/* end confdefs.h. */
2301$4
2302int
2303main ()
2304{
2305#ifndef $2
2306 (void) $2;
2307#endif
2308
2309 ;
2310 return 0;
2311}
2312_ACEOF
2313if ac_fn_c_try_compile "$LINENO"; then :
2314 eval "$3=yes"
2315else
2316 eval "$3=no"
2317fi
2318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2319fi
2320eval ac_res=\$$3
2321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2322$as_echo "$ac_res" >&6; }
2323 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2324
2325} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002326cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002327This file contains any messages produced by compilers while
2328running configure, to aid debugging if configure makes a mistake.
2329
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002330It was created by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +00002331generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002332
2333 $ $0 $@
2334
2335_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002336exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002337{
2338cat <<_ASUNAME
2339## --------- ##
2340## Platform. ##
2341## --------- ##
2342
2343hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2344uname -m = `(uname -m) 2>/dev/null || echo unknown`
2345uname -r = `(uname -r) 2>/dev/null || echo unknown`
2346uname -s = `(uname -s) 2>/dev/null || echo unknown`
2347uname -v = `(uname -v) 2>/dev/null || echo unknown`
2348
2349/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2350/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2351
2352/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2353/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2354/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002355/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002356/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2357/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2358/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2359
2360_ASUNAME
2361
2362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2363for as_dir in $PATH
2364do
2365 IFS=$as_save_IFS
2366 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002367 $as_echo "PATH: $as_dir"
2368 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002370
2371} >&5
2372
2373cat >&5 <<_ACEOF
2374
2375
2376## ----------- ##
2377## Core tests. ##
2378## ----------- ##
2379
2380_ACEOF
2381
2382
2383# Keep a trace of the command line.
2384# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002385# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002386# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002387# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002388ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002389ac_configure_args0=
2390ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002391ac_must_keep_next=false
2392for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002393do
Skip Montanaro6dead952003-09-25 14:50:04 +00002394 for ac_arg
2395 do
2396 case $ac_arg in
2397 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2398 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2399 | -silent | --silent | --silen | --sile | --sil)
2400 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002401 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002402 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002403 esac
2404 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002405 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002407 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002409 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002410 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002411 case $ac_arg in
2412 *=* | --config-cache | -C | -disable-* | --disable-* \
2413 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2414 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2415 | -with-* | --with-* | -without-* | --without-* | --x)
2416 case "$ac_configure_args0 " in
2417 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2418 esac
2419 ;;
2420 -* ) ac_must_keep_next=true ;;
2421 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002423 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 ;;
2425 esac
2426 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002427done
Matthias Kloseb9621712010-04-24 17:59:49 +00002428{ ac_configure_args0=; unset ac_configure_args0;}
2429{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002430
2431# When interrupted or exit'd, cleanup temporary files, and complete
2432# config.log. We remove comments because anyway the quotes in there
2433# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002434# WARNING: Use '\'' to represent an apostrophe within the trap.
2435# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002436trap 'exit_status=$?
2437 # Save into config.log some information that might help in debugging.
2438 {
2439 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002440
Martin v. Löwis11437992002-04-12 09:54:03 +00002441 cat <<\_ASBOX
2442## ---------------- ##
2443## Cache variables. ##
2444## ---------------- ##
2445_ASBOX
2446 echo
2447 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448(
2449 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2450 eval ac_val=\$$ac_var
2451 case $ac_val in #(
2452 *${as_nl}*)
2453 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002454 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2455$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456 esac
2457 case $ac_var in #(
2458 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002459 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2460 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461 esac ;;
2462 esac
2463 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002464 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2466 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 "s/'\''/'\''\\\\'\'''\''/g;
2469 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2470 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002471 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002473 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 esac |
2475 sort
2476)
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002478
2479 cat <<\_ASBOX
2480## ----------------- ##
2481## Output variables. ##
2482## ----------------- ##
2483_ASBOX
2484 echo
2485 for ac_var in $ac_subst_vars
2486 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 eval ac_val=\$$ac_var
2488 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 done | sort
2493 echo
2494
2495 if test -n "$ac_subst_files"; then
2496 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497## ------------------- ##
2498## File substitutions. ##
2499## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002500_ASBOX
2501 echo
2502 for ac_var in $ac_subst_files
2503 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 eval ac_val=\$$ac_var
2505 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002506 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 done | sort
2510 echo
2511 fi
2512
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 if test -s confdefs.h; then
2514 cat <<\_ASBOX
2515## ----------- ##
2516## confdefs.h. ##
2517## ----------- ##
2518_ASBOX
2519 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
2522 fi
2523 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$as_me: caught signal $ac_signal"
2525 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 rm -f core *.core core.conftest.* &&
2528 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002531for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002533done
2534ac_signal=0
2535
2536# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002538
Matthias Kloseb9621712010-04-24 17:59:49 +00002539$as_echo "/* confdefs.h */" > confdefs.h
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541# Predefined preprocessor variables.
2542
2543cat >>confdefs.h <<_ACEOF
2544#define PACKAGE_NAME "$PACKAGE_NAME"
2545_ACEOF
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_VERSION "$PACKAGE_VERSION"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_STRING "$PACKAGE_STRING"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2561_ACEOF
2562
Matthias Kloseb9621712010-04-24 17:59:49 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_URL "$PACKAGE_URL"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567
2568# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002569# Prefer an explicitly selected file to automatically selected ones.
2570ac_site_file1=NONE
2571ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572if test -n "$CONFIG_SITE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002573 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002575 ac_site_file1=$prefix/share/config.site
2576 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577else
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 ac_site_file1=$ac_default_prefix/share/config.site
2579 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002581for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582do
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 test "x$ac_site_file" = xNONE && continue
2584 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2585 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2586$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002588 . "$ac_site_file"
2589 fi
2590done
2591
2592if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 # Some versions of bash will fail to source /dev/null (special files
2594 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2595 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2597$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2600 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 esac
2602 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603else
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2605$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 >$cache_file
2607fi
2608
2609# Check that the precious variables saved in the cache have kept the same
2610# value.
2611ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2614 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2616 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 case $ac_old_set,$ac_new_set in
2618 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2620$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 ac_cache_corrupted=: ;;
2622 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2624$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 ac_cache_corrupted=: ;;
2626 ,);;
2627 *)
2628 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002629 # differences in whitespace do not lead to failure.
2630 ac_old_val_w=`echo x $ac_old_val`
2631 ac_new_val_w=`echo x $ac_new_val`
2632 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2634$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2635 ac_cache_corrupted=:
2636 else
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2638$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2639 eval $ac_var=\$ac_old_val
2640 fi
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2642$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2644$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 fi;;
2646 esac
2647 # Pass precious variables to config.status.
2648 if test "$ac_new_set" = set; then
2649 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002650 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 *) ac_arg=$ac_var=$ac_new_val ;;
2652 esac
2653 case " $ac_configure_args " in
2654 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002655 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 esac
2657 fi
2658done
2659if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002660 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2661$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2663$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2664 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002666## -------------------- ##
2667## Main body of script. ##
2668## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002669
Guido van Rossum7f43da71994-08-01 12:15:30 +00002670ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002671ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002672ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2673ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2674ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675
Guido van Rossum627b2d71993-12-24 10:39:16 +00002676
Michael W. Hudson54241132001-12-07 15:38:26 +00002677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002678ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002679
2680
Martin v. Löwis11437992002-04-12 09:54:03 +00002681
Benjamin Petersond23f8222009-04-05 19:13:16 +00002682if test "$prefix" != "/"; then
2683 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2684fi
2685
2686
Martin v. Löwis11437992002-04-12 09:54:03 +00002687
2688
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002689# We don't use PACKAGE_ variables, and they cause conflicts
2690# with other autoconf-based packages that include Python.h
2691grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2692rm confdefs.h
2693mv confdefs.h.new confdefs.h
2694
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002695
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002696VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002697
Martin v. Löwis1142de32002-03-29 16:28:31 +00002698
2699SOVERSION=1.0
2700
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002701# The later defininition of _XOPEN_SOURCE disables certain features
2702# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2703
Matthias Kloseb9621712010-04-24 17:59:49 +00002704$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002705
2706
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002707# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2708# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2709# them.
2710
Matthias Kloseb9621712010-04-24 17:59:49 +00002711$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002712
2713
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002714# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2715# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2716# them.
2717
Matthias Kloseb9621712010-04-24 17:59:49 +00002718$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002719
2720
Martin v. Löwisd6320502004-08-12 13:45:08 +00002721# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2722# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2723
Matthias Kloseb9621712010-04-24 17:59:49 +00002724$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002725
2726
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002727# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2728# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2729# them.
2730
Matthias Kloseb9621712010-04-24 17:59:49 +00002731$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002732
2733
2734
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002735define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002736
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002737# Arguments passed to configure.
2738
2739CONFIG_ARGS="$ac_configure_args"
2740
Matthias Kloseb9621712010-04-24 17:59:49 +00002741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2742$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002743# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002744if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002745 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002746 case $enableval in
2747 yes)
2748 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002749 if test ! -d "${enableval}"
2750 then
2751 enableval=/
2752 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002753 ;;
2754 esac
2755 case $enableval in
2756 no)
2757 UNIVERSALSDK=
2758 enable_universalsdk=
2759 ;;
2760 *)
2761 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002762 if test ! -d "${UNIVERSALSDK}"
2763 then
Matthias Kloseb9621712010-04-24 17:59:49 +00002764 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002765 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002766 ;;
2767 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002768
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002769
Thomas Wouters477c8d52006-05-27 19:21:47 +00002770else
2771
2772 UNIVERSALSDK=
2773 enable_universalsdk=
2774
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002775fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002776
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002777if test -n "${UNIVERSALSDK}"
2778then
Matthias Kloseb9621712010-04-24 17:59:49 +00002779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2780$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002781else
Matthias Kloseb9621712010-04-24 17:59:49 +00002782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2783$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002784fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002786
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002787
2788
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002789UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002790
Matthias Kloseb9621712010-04-24 17:59:49 +00002791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2792$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002793
2794# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002795if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002796 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2798$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002799 UNIVERSAL_ARCHS="$withval"
2800
2801else
2802
Matthias Kloseb9621712010-04-24 17:59:49 +00002803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2804$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002805
2806fi
2807
2808
2809
2810
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002811
2812# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002813if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002814 withval=$with_framework_name;
2815 PYTHONFRAMEWORK=${withval}
2816 PYTHONFRAMEWORKDIR=${withval}.framework
2817 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2818
2819else
2820
2821 PYTHONFRAMEWORK=Python
2822 PYTHONFRAMEWORKDIR=Python.framework
2823 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2824
2825fi
2826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002827# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002828if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002829 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002830 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002831 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002832 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002833 esac
2834 case $enableval in
2835 no)
2836 PYTHONFRAMEWORK=
2837 PYTHONFRAMEWORKDIR=no-framework
2838 PYTHONFRAMEWORKPREFIX=
2839 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002840 FRAMEWORKINSTALLFIRST=
2841 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002842 FRAMEWORKALTINSTALLFIRST=
2843 FRAMEWORKALTINSTALLLAST=
2844 if test "x${prefix}" = "xNONE"; then
2845 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2846 else
2847 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2848 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002849 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002850 ;;
2851 *)
2852 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002853 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002854 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002855 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002856 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2857 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002858
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002859 if test "x${prefix}" = "xNONE" ; then
2860 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2861 else
2862 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2863 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002864 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002865
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002866 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002867 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002868 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002870 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002871
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002872 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2873
2874 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2875
Jack Jansene578a632001-08-15 01:27:14 +00002876 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002877
Guido van Rossum563e7081996-09-10 18:20:48 +00002878else
Martin v. Löwis11437992002-04-12 09:54:03 +00002879
Jack Jansene578a632001-08-15 01:27:14 +00002880 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002881 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002882 PYTHONFRAMEWORKPREFIX=
2883 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002884 FRAMEWORKINSTALLFIRST=
2885 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002886 FRAMEWORKALTINSTALLFIRST=
2887 FRAMEWORKALTINSTALLLAST=
2888 if test "x${prefix}" = "xNONE" ; then
2889 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2890 else
2891 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2892 fi
Jack Jansene578a632001-08-15 01:27:14 +00002893 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002894
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002895
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002896fi
2897
Thomas Wouters477c8d52006-05-27 19:21:47 +00002898
2899
Michael W. Hudson54241132001-12-07 15:38:26 +00002900
2901
2902
2903
Jack Jansene578a632001-08-15 01:27:14 +00002904
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002905
2906
2907
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002908
Jack Jansene578a632001-08-15 01:27:14 +00002909##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002910## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002911## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002912##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002913# Set name for machine-dependent library files
2914
Matthias Kloseb9621712010-04-24 17:59:49 +00002915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2916$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002917if test -z "$MACHDEP"
2918then
Guido van Rossum563e7081996-09-10 18:20:48 +00002919 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002920 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002921 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002922 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002923 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002924 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002925 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002926 ac_md_system=`echo $ac_sys_system |
2927 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2928 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002929 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002930 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002931
Guido van Rossum07397971997-04-29 21:49:50 +00002932 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002933 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002934 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002935 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002936 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002937 esac
2938fi
Guido van Rossum91922671997-10-09 20:24:13 +00002939
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002940# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2941# disable features if it is defined, without any means to access these
2942# features as extensions. For these systems, we skip the definition of
2943# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2944# some feature, make sure there is no alternative way to access this
2945# feature. Also, when using wildcards, make sure you have verified the
2946# need for not defining _XOPEN_SOURCE on all systems matching the
2947# wildcard, and that the wildcard does not include future systems
2948# (which may remove their limitations).
2949case $ac_sys_system/$ac_sys_release in
2950 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2951 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002952 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002953 # In addition, Stefan Krah confirms that issue #1244610 exists through
2954 # OpenBSD 4.6, but is fixed in 4.7.
2955 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002956 define_xopen_source=no
2957 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2958 # also defined. This can be overridden by defining _BSD_SOURCE
2959 # As this has a different meaning on Linux, only define it on OpenBSD
2960
Matthias Kloseb9621712010-04-24 17:59:49 +00002961$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002962
2963 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002964 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00002965 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2966 # also defined. This can be overridden by defining _BSD_SOURCE
2967 # As this has a different meaning on Linux, only define it on OpenBSD
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00002970
2971 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002972 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2973 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2974 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002975 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002976 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002977 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2978 # of union __?sigval. Reported by Stuart Bishop.
2979 SunOS/5.6)
2980 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002981 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2982 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002983 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002984 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002985 define_xopen_source=no;;
2986 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002987 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002988 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002989 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002990 # On FreeBSD 4, the math functions C89 does not cover are never defined
2991 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2992 FreeBSD/4.*)
2993 define_xopen_source=no;;
2994 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2995 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2996 # identifies itself as Darwin/7.*
2997 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2998 # disables platform specific features beyond repair.
2999 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3000 # has no effect, don't bother defining them
3001 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003002 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003003 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003004 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003005 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3006 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3007 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003008 AIX/4)
3009 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003010 AIX/5)
3011 if test `uname -r` -eq 1; then
3012 define_xopen_source=no
3013 fi
3014 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003015 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3016 # defining NI_NUMERICHOST.
3017 QNX/6.3.2)
3018 define_xopen_source=no
3019 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003020
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003021esac
3022
3023if test $define_xopen_source = yes
3024then
Skip Montanarof0d5f792004-08-15 14:08:23 +00003025 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
3026 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00003027 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
3028 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00003029 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00003030 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00003031
Matthias Kloseb9621712010-04-24 17:59:49 +00003032$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
Skip Montanarof0d5f792004-08-15 14:08:23 +00003033
3034 ;;
3035 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003036
Matthias Kloseb9621712010-04-24 17:59:49 +00003037$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003038
Skip Montanarof0d5f792004-08-15 14:08:23 +00003039 ;;
3040 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003041
3042 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3043 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3044 # several APIs are not declared. Since this is also needed in some
3045 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00003046 # except for Solaris 10, where it must not be defined,
3047 # as it implies XPG4.2
3048 case $ac_sys_system/$ac_sys_release in
3049 SunOS/5.10)
3050 ;;
3051 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003052
Matthias Kloseb9621712010-04-24 17:59:49 +00003053$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003054
Martin v. Löwis7dece662005-11-26 11:38:24 +00003055 ;;
3056 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003057
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003058
Matthias Kloseb9621712010-04-24 17:59:49 +00003059$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003060
3061
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003062fi
3063
Guido van Rossum91922671997-10-09 20:24:13 +00003064#
3065# SGI compilers allow the specification of the both the ABI and the
3066# ISA on the command line. Depending on the values of these switches,
3067# different and often incompatable code will be generated.
3068#
3069# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3070# thus supply support for various ABI/ISA combinations. The MACHDEP
3071# variable is also adjusted.
3072#
3073
3074if test ! -z "$SGI_ABI"
3075then
3076 CC="cc $SGI_ABI"
3077 LDFLAGS="$SGI_ABI $LDFLAGS"
3078 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3079fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3081$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003082
Jack Jansen6b08a402004-06-03 12:41:45 +00003083# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3084# it may influence the way we can build extensions, so distutils
3085# needs to check it
3086
Thomas Wouters477c8d52006-05-27 19:21:47 +00003087
Jack Jansen6b08a402004-06-03 12:41:45 +00003088CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003089EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003090
Matthias Kloseb9621712010-04-24 17:59:49 +00003091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3092$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003093ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3095$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003096
Guido van Rossum627b2d71993-12-24 10:39:16 +00003097# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003098
3099# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3100# for debug/optimization stuff. BASECFLAGS is for flags that are required
3101# just to get things to compile and link. Users are free to override OPT
3102# when running configure or make. The build should not break if they do.
3103# BASECFLAGS should generally not be messed with, however.
3104
3105# XXX shouldn't some/most/all of this code be merged with the stuff later
3106# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3108$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003111if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003113 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003114 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003115 without_gcc=yes;;
3116 yes) CC=gcc
3117 without_gcc=no;;
3118 *) CC=$withval
3119 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003120 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003121else
Martin v. Löwis11437992002-04-12 09:54:03 +00003122
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003123 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003124 AIX*) CC=cc_r
3125 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003126 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003127 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003128fi
3129
Matthias Kloseb9621712010-04-24 17:59:49 +00003130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3131$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003132
Guido van Rossum8b131c51995-03-09 14:10:13 +00003133# If the user switches compilers, we can't believe the cache
3134if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3135then
Matthias Kloseb9621712010-04-24 17:59:49 +00003136 as_fn_error "cached CC is different -- throw away $cache_file
3137(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003138fi
3139
Victor Stinner00d6a1d2010-03-25 01:02:29 +00003140save_CFLAGS=$CFLAGS
Martin v. Löwis11437992002-04-12 09:54:03 +00003141ac_ext=c
3142ac_cpp='$CPP $CPPFLAGS'
3143ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3144ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3145ac_compiler_gnu=$ac_cv_c_compiler_gnu
3146if test -n "$ac_tool_prefix"; then
3147 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3148set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3150$as_echo_n "checking for $ac_word... " >&6; }
3151if test "${ac_cv_prog_CC+set}" = set; then :
3152 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003153else
3154 if test -n "$CC"; then
3155 ac_cv_prog_CC="$CC" # Let the user override the test.
3156else
Martin v. Löwis11437992002-04-12 09:54:03 +00003157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3158for as_dir in $PATH
3159do
3160 IFS=$as_save_IFS
3161 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003162 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003163 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003164 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003165 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003166 break 2
3167 fi
3168done
Matthias Kloseb9621712010-04-24 17:59:49 +00003169 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003170IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003171
Jack Jansendd19cf82001-12-06 22:36:17 +00003172fi
3173fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003174CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003175if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3177$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003178else
Matthias Kloseb9621712010-04-24 17:59:49 +00003179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3180$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003181fi
3182
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003183
Martin v. Löwis11437992002-04-12 09:54:03 +00003184fi
3185if test -z "$ac_cv_prog_CC"; then
3186 ac_ct_CC=$CC
3187 # Extract the first word of "gcc", so it can be a program name with args.
3188set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3190$as_echo_n "checking for $ac_word... " >&6; }
3191if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3192 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003193else
3194 if test -n "$ac_ct_CC"; then
3195 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3196else
3197as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3198for as_dir in $PATH
3199do
3200 IFS=$as_save_IFS
3201 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003202 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003204 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003205 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003206 break 2
3207 fi
3208done
Matthias Kloseb9621712010-04-24 17:59:49 +00003209 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003210IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003211
3212fi
3213fi
3214ac_ct_CC=$ac_cv_prog_ac_ct_CC
3215if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3217$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003218else
Matthias Kloseb9621712010-04-24 17:59:49 +00003219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3220$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003221fi
3222
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003223 if test "x$ac_ct_CC" = x; then
3224 CC=""
3225 else
3226 case $cross_compiling:$ac_tool_warned in
3227yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003228{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3229$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230ac_tool_warned=yes ;;
3231esac
3232 CC=$ac_ct_CC
3233 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003234else
3235 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003236fi
3237
Jack Jansendd19cf82001-12-06 22:36:17 +00003238if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003239 if test -n "$ac_tool_prefix"; then
3240 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003241set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3243$as_echo_n "checking for $ac_word... " >&6; }
3244if test "${ac_cv_prog_CC+set}" = set; then :
3245 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003246else
3247 if test -n "$CC"; then
3248 ac_cv_prog_CC="$CC" # Let the user override the test.
3249else
Martin v. Löwis11437992002-04-12 09:54:03 +00003250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3251for as_dir in $PATH
3252do
3253 IFS=$as_save_IFS
3254 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003255 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003256 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003257 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003258 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003259 break 2
3260 fi
3261done
Matthias Kloseb9621712010-04-24 17:59:49 +00003262 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003263IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003264
3265fi
3266fi
3267CC=$ac_cv_prog_CC
3268if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3270$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003271else
Matthias Kloseb9621712010-04-24 17:59:49 +00003272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3273$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003274fi
3275
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003276
Martin v. Löwis11437992002-04-12 09:54:03 +00003277 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003278fi
3279if test -z "$CC"; then
3280 # Extract the first word of "cc", so it can be a program name with args.
3281set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3283$as_echo_n "checking for $ac_word... " >&6; }
3284if test "${ac_cv_prog_CC+set}" = set; then :
3285 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003286else
3287 if test -n "$CC"; then
3288 ac_cv_prog_CC="$CC" # Let the user override the test.
3289else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003290 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3292for as_dir in $PATH
3293do
3294 IFS=$as_save_IFS
3295 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003296 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003297 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003298 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3299 ac_prog_rejected=yes
3300 continue
3301 fi
3302 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003303 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003304 break 2
3305 fi
3306done
Matthias Kloseb9621712010-04-24 17:59:49 +00003307 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003308IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003309
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003310if test $ac_prog_rejected = yes; then
3311 # We found a bogon in the path, so make sure we never use it.
3312 set dummy $ac_cv_prog_CC
3313 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003314 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003315 # We chose a different compiler from the bogus one.
3316 # However, it has the same basename, so the bogon will be chosen
3317 # first if we set CC to just the basename; use the full file name.
3318 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003319 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003320 fi
3321fi
3322fi
3323fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003324CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003325if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3327$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003328else
Matthias Kloseb9621712010-04-24 17:59:49 +00003329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3330$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003331fi
3332
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003333
Martin v. Löwis11437992002-04-12 09:54:03 +00003334fi
3335if test -z "$CC"; then
3336 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003337 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003338 do
3339 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3340set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3342$as_echo_n "checking for $ac_word... " >&6; }
3343if test "${ac_cv_prog_CC+set}" = set; then :
3344 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003345else
3346 if test -n "$CC"; then
3347 ac_cv_prog_CC="$CC" # Let the user override the test.
3348else
Martin v. Löwis11437992002-04-12 09:54:03 +00003349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3350for as_dir in $PATH
3351do
3352 IFS=$as_save_IFS
3353 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003355 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003356 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003357 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003358 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003359 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003360done
Matthias Kloseb9621712010-04-24 17:59:49 +00003361 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003362IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003363
3364fi
3365fi
3366CC=$ac_cv_prog_CC
3367if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3369$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003370else
Matthias Kloseb9621712010-04-24 17:59:49 +00003371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3372$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003373fi
3374
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003375
Martin v. Löwis11437992002-04-12 09:54:03 +00003376 test -n "$CC" && break
3377 done
3378fi
3379if test -z "$CC"; then
3380 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003381 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003382do
3383 # Extract the first word of "$ac_prog", so it can be a program name with args.
3384set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3386$as_echo_n "checking for $ac_word... " >&6; }
3387if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3388 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003389else
3390 if test -n "$ac_ct_CC"; then
3391 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3392else
3393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3394for as_dir in $PATH
3395do
3396 IFS=$as_save_IFS
3397 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003398 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003399 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003400 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003401 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003402 break 2
3403 fi
3404done
Matthias Kloseb9621712010-04-24 17:59:49 +00003405 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003406IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003407
Martin v. Löwis11437992002-04-12 09:54:03 +00003408fi
3409fi
3410ac_ct_CC=$ac_cv_prog_ac_ct_CC
3411if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3413$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003414else
Matthias Kloseb9621712010-04-24 17:59:49 +00003415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3416$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003417fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003419
Martin v. Löwis11437992002-04-12 09:54:03 +00003420 test -n "$ac_ct_CC" && break
3421done
Michael W. Hudson54241132001-12-07 15:38:26 +00003422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003423 if test "x$ac_ct_CC" = x; then
3424 CC=""
3425 else
3426 case $cross_compiling:$ac_tool_warned in
3427yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003428{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3429$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003430ac_tool_warned=yes ;;
3431esac
3432 CC=$ac_ct_CC
3433 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003434fi
3435
3436fi
3437
3438
Matthias Kloseb9621712010-04-24 17:59:49 +00003439test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3440$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3441as_fn_error "no acceptable C compiler found in \$PATH
3442See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003443
3444# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003445$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3446set X $ac_compile
3447ac_compiler=$2
3448for ac_option in --version -v -V -qversion; do
3449 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003450case "(($ac_try" in
3451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3452 *) ac_try_echo=$ac_try;;
3453esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003454eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3455$as_echo "$ac_try_echo"; } >&5
3456 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003457 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003458 if test -s conftest.err; then
3459 sed '10a\
3460... rest of stderr output deleted ...
3461 10q' conftest.err >conftest.er1
3462 cat conftest.er1 >&5
3463 fi
3464 rm -f conftest.er1 conftest.err
3465 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3466 test $ac_status = 0; }
3467done
Martin v. Löwis11437992002-04-12 09:54:03 +00003468
Matthias Kloseb9621712010-04-24 17:59:49 +00003469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003470/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003471
Martin v. Löwis11437992002-04-12 09:54:03 +00003472int
3473main ()
3474{
3475
3476 ;
3477 return 0;
3478}
3479_ACEOF
3480ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003481ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003482# Try to create an executable without -o first, disregard a.out.
3483# It will help us diagnose broken compilers, and finding out an intuition
3484# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3486$as_echo_n "checking whether the C compiler works... " >&6; }
3487ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3488
3489# The possible output files:
3490ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3491
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003492ac_rmfiles=
3493for ac_file in $ac_files
3494do
3495 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003496 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003497 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3498 esac
3499done
3500rm -f $ac_rmfiles
3501
Matthias Kloseb9621712010-04-24 17:59:49 +00003502if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003503case "(($ac_try" in
3504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3505 *) ac_try_echo=$ac_try;;
3506esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003507eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3508$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003509 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003511 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3512 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003513 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3514# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3515# in a Makefile. We should not override ac_cv_exeext if it was cached,
3516# so that the user can short-circuit this test for compilers unknown to
3517# Autoconf.
3518for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003519do
3520 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003521 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003522 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003523 ;;
3524 [ab].out )
3525 # We found the default executable, but exeext='' is most
3526 # certainly right.
3527 break;;
3528 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003529 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003530 then :; else
3531 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3532 fi
3533 # We set ac_cv_exeext here because the later test for it is not
3534 # safe: cross compilers may not add the suffix if given an `-o'
3535 # argument, so we may need to know it at that point already.
3536 # Even if this section looks crufty: it has the advantage of
3537 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003538 break;;
3539 * )
3540 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003541 esac
3542done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543test "$ac_cv_exeext" = no && ac_cv_exeext=
3544
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003545else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003546 ac_file=''
3547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003548if test -z "$ac_file"; then :
3549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3550$as_echo "no" >&6; }
3551$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003552sed 's/^/| /' conftest.$ac_ext >&5
3553
Matthias Kloseb9621712010-04-24 17:59:49 +00003554{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3555$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3556{ as_fn_set_status 77
3557as_fn_error "C compiler cannot create executables
3558See \`config.log' for more details." "$LINENO" 5; }; }
3559else
3560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3561$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3564$as_echo_n "checking for C compiler default output file name... " >&6; }
3565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3566$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003567ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003568
Matthias Kloseb9621712010-04-24 17:59:49 +00003569rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003570ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3572$as_echo_n "checking for suffix of executables... " >&6; }
3573if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574case "(($ac_try" in
3575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3576 *) ac_try_echo=$ac_try;;
3577esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003578eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3579$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003580 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003581 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3583 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003584 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3585# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3586# work properly (i.e., refer to `conftest.exe'), while it won't with
3587# `rm'.
3588for ac_file in conftest.exe conftest conftest.*; do
3589 test -f "$ac_file" || continue
3590 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003591 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003592 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3593 break;;
3594 * ) break;;
3595 esac
3596done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003597else
Matthias Kloseb9621712010-04-24 17:59:49 +00003598 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3599$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3600as_fn_error "cannot compute suffix of executables: cannot compile and link
3601See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003603rm -f conftest conftest$ac_cv_exeext
3604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3605$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003606
3607rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003608EXEEXT=$ac_cv_exeext
3609ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3611/* end confdefs.h. */
3612#include <stdio.h>
3613int
3614main ()
3615{
3616FILE *f = fopen ("conftest.out", "w");
3617 return ferror (f) || fclose (f) != 0;
3618
3619 ;
3620 return 0;
3621}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003623ac_clean_files="$ac_clean_files conftest.out"
3624# Check that the compiler produces executables we can run. If not, either
3625# the compiler is broken, or we cross compile.
3626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3627$as_echo_n "checking whether we are cross compiling... " >&6; }
3628if test "$cross_compiling" != yes; then
3629 { { ac_try="$ac_link"
3630case "(($ac_try" in
3631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3632 *) ac_try_echo=$ac_try;;
3633esac
3634eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3635$as_echo "$ac_try_echo"; } >&5
3636 (eval "$ac_link") 2>&5
3637 ac_status=$?
3638 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3639 test $ac_status = 0; }
3640 if { ac_try='./conftest$ac_cv_exeext'
3641 { { case "(($ac_try" in
3642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3643 *) ac_try_echo=$ac_try;;
3644esac
3645eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3646$as_echo "$ac_try_echo"; } >&5
3647 (eval "$ac_try") 2>&5
3648 ac_status=$?
3649 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3650 test $ac_status = 0; }; }; then
3651 cross_compiling=no
3652 else
3653 if test "$cross_compiling" = maybe; then
3654 cross_compiling=yes
3655 else
3656 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3658as_fn_error "cannot run C compiled programs.
3659If you meant to cross compile, use \`--host'.
3660See \`config.log' for more details." "$LINENO" 5; }
3661 fi
3662 fi
3663fi
3664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3665$as_echo "$cross_compiling" >&6; }
3666
3667rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3668ac_clean_files=$ac_clean_files_save
3669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3670$as_echo_n "checking for suffix of object files... " >&6; }
3671if test "${ac_cv_objext+set}" = set; then :
3672 $as_echo_n "(cached) " >&6
3673else
3674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003675/* end confdefs.h. */
3676
3677int
3678main ()
3679{
3680
3681 ;
3682 return 0;
3683}
3684_ACEOF
3685rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003686if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003687case "(($ac_try" in
3688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3689 *) ac_try_echo=$ac_try;;
3690esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003691eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3692$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003694 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3696 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003697 for ac_file in conftest.o conftest.obj conftest.*; do
3698 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003699 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003701 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3702 break;;
3703 esac
3704done
3705else
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003707sed 's/^/| /' conftest.$ac_ext >&5
3708
Matthias Kloseb9621712010-04-24 17:59:49 +00003709{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3710$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3711as_fn_error "cannot compute suffix of object files: cannot compile
3712See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003713fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003714rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3717$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003718OBJEXT=$ac_cv_objext
3719ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3721$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3722if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3723 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003724else
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003727
Martin v. Löwis11437992002-04-12 09:54:03 +00003728int
3729main ()
3730{
3731#ifndef __GNUC__
3732 choke me
3733#endif
3734
3735 ;
3736 return 0;
3737}
3738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003739if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 ac_compiler_gnu=yes
3741else
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003745ac_cv_c_compiler_gnu=$ac_compiler_gnu
3746
3747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3749$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3750if test $ac_compiler_gnu = yes; then
3751 GCC=yes
3752else
3753 GCC=
3754fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003755ac_test_CFLAGS=${CFLAGS+set}
3756ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3758$as_echo_n "checking whether $CC accepts -g... " >&6; }
3759if test "${ac_cv_prog_cc_g+set}" = set; then :
3760 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003761else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762 ac_save_c_werror_flag=$ac_c_werror_flag
3763 ac_c_werror_flag=yes
3764 ac_cv_prog_cc_g=no
3765 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003768
Martin v. Löwis11437992002-04-12 09:54:03 +00003769int
3770main ()
3771{
3772
3773 ;
3774 return 0;
3775}
3776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003777if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003778 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003779else
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 CFLAGS=""
3781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782/* end confdefs.h. */
3783
3784int
3785main ()
3786{
3787
3788 ;
3789 return 0;
3790}
3791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003792if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793
Matthias Kloseb9621712010-04-24 17:59:49 +00003794else
3795 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798/* end confdefs.h. */
3799
3800int
3801main ()
3802{
3803
3804 ;
3805 return 0;
3806}
3807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003808if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3816 ac_c_werror_flag=$ac_save_c_werror_flag
3817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3819$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003820if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003821 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003822elif test $ac_cv_prog_cc_g = yes; then
3823 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003824 CFLAGS="-g -O2"
3825 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003826 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003827 fi
3828else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003829 if test "$GCC" = yes; then
3830 CFLAGS="-O2"
3831 else
3832 CFLAGS=
3833 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3836$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3837if test "${ac_cv_prog_cc_c89+set}" = set; then :
3838 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003839else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003841ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003843/* end confdefs.h. */
3844#include <stdarg.h>
3845#include <stdio.h>
3846#include <sys/types.h>
3847#include <sys/stat.h>
3848/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3849struct buf { int x; };
3850FILE * (*rcsopen) (struct buf *, struct stat *, int);
3851static char *e (p, i)
3852 char **p;
3853 int i;
3854{
3855 return p[i];
3856}
3857static char *f (char * (*g) (char **, int), char **p, ...)
3858{
3859 char *s;
3860 va_list v;
3861 va_start (v,p);
3862 s = g (p, va_arg (v,int));
3863 va_end (v);
3864 return s;
3865}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003866
3867/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3868 function prototypes and stuff, but not '\xHH' hex character constants.
3869 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003871 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3872 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003874int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003876/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3877 inside strings and character constants. */
3878#define FOO(x) 'x'
3879int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3880
Skip Montanaro6dead952003-09-25 14:50:04 +00003881int test (int i, double x);
3882struct s1 {int (*f) (int a);};
3883struct s2 {int (*f) (double a);};
3884int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3885int argc;
3886char **argv;
3887int
3888main ()
3889{
3890return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3891 ;
3892 return 0;
3893}
3894_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3896 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003897do
3898 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003899 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003900 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902rm -f core conftest.err conftest.$ac_objext
3903 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003904done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003906CC=$ac_save_CC
3907
3908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909# AC_CACHE_VAL
3910case "x$ac_cv_prog_cc_c89" in
3911 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3913$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003914 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3916$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003917 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3920$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003921esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003922if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003923
Matthias Kloseb9621712010-04-24 17:59:49 +00003924fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003925
Martin v. Löwis11437992002-04-12 09:54:03 +00003926ac_ext=c
3927ac_cpp='$CPP $CPPFLAGS'
3928ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3929ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3930ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003931
Victor Stinner00d6a1d2010-03-25 01:02:29 +00003932CFLAGS=$save_CFLAGS
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003933
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003934
3935
Matthias Kloseb9621712010-04-24 17:59:49 +00003936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3937$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003940if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003942
3943 case $withval in
3944 no) with_cxx_main=no
3945 MAINCC='$(CC)';;
3946 yes) with_cxx_main=yes
3947 MAINCC='$(CXX)';;
3948 *) with_cxx_main=yes
3949 MAINCC=$withval
3950 if test -z "$CXX"
3951 then
3952 CXX=$withval
3953 fi;;
3954 esac
3955else
3956
3957 with_cxx_main=no
3958 MAINCC='$(CC)'
3959
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960fi
3961
Matthias Kloseb9621712010-04-24 17:59:49 +00003962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3963$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003964
3965preset_cxx="$CXX"
3966if test -z "$CXX"
3967then
3968 case "$CC" in
3969 gcc) # Extract the first word of "g++", so it can be a program name with args.
3970set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3972$as_echo_n "checking for $ac_word... " >&6; }
3973if test "${ac_cv_path_CXX+set}" = set; then :
3974 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003975else
3976 case $CXX in
3977 [\\/]* | ?:[\\/]*)
3978 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3979 ;;
3980 *)
3981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3982for as_dir in notfound
3983do
3984 IFS=$as_save_IFS
3985 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003986 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003988 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00003989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003990 break 2
3991 fi
3992done
Matthias Kloseb9621712010-04-24 17:59:49 +00003993 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003995
3996 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3997 ;;
3998esac
3999fi
4000CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004001if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4003$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004004else
Matthias Kloseb9621712010-04-24 17:59:49 +00004005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4006$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004009 ;;
4010 cc) # Extract the first word of "c++", so it can be a program name with args.
4011set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4013$as_echo_n "checking for $ac_word... " >&6; }
4014if test "${ac_cv_path_CXX+set}" = set; then :
4015 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004016else
4017 case $CXX in
4018 [\\/]* | ?:[\\/]*)
4019 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4020 ;;
4021 *)
4022 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4023for as_dir in notfound
4024do
4025 IFS=$as_save_IFS
4026 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004028 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004029 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004031 break 2
4032 fi
4033done
Matthias Kloseb9621712010-04-24 17:59:49 +00004034 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004035IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004036
4037 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4038 ;;
4039esac
4040fi
4041CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004042if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4044$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004045else
Matthias Kloseb9621712010-04-24 17:59:49 +00004046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4047$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004049
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004050 ;;
4051 esac
4052 if test "$CXX" = "notfound"
4053 then
4054 CXX=""
4055 fi
4056fi
4057if test -z "$CXX"
4058then
4059 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4060do
4061 # Extract the first word of "$ac_prog", so it can be a program name with args.
4062set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4064$as_echo_n "checking for $ac_word... " >&6; }
4065if test "${ac_cv_prog_CXX+set}" = set; then :
4066 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004067else
4068 if test -n "$CXX"; then
4069 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4070else
4071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4072for as_dir in $PATH
4073do
4074 IFS=$as_save_IFS
4075 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004076 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004077 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004078 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004080 break 2
4081 fi
4082done
Matthias Kloseb9621712010-04-24 17:59:49 +00004083 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004084IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004085
4086fi
4087fi
4088CXX=$ac_cv_prog_CXX
4089if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4091$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004092else
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4094$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004095fi
4096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004097
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004098 test -n "$CXX" && break
4099done
4100test -n "$CXX" || CXX="notfound"
4101
4102 if test "$CXX" = "notfound"
4103 then
4104 CXX=""
4105 fi
4106fi
4107if test "$preset_cxx" != "$CXX"
4108then
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004110
4111 By default, distutils will build C++ extension modules with \"$CXX\".
4112 If this is not intended, then set CXX on the configure command line.
4113 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004114$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004115
4116 By default, distutils will build C++ extension modules with \"$CXX\".
4117 If this is not intended, then set CXX on the configure command line.
4118 " >&2;}
4119fi
4120
4121
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004122# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004123
4124ac_ext=c
4125ac_cpp='$CPP $CPPFLAGS'
4126ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4127ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4128ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4130$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004131# On Suns, sometimes $CPP names a directory.
4132if test -n "$CPP" && test -d "$CPP"; then
4133 CPP=
4134fi
4135if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 if test "${ac_cv_prog_CPP+set}" = set; then :
4137 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004138else
Martin v. Löwis11437992002-04-12 09:54:03 +00004139 # Double quotes because CPP needs to be expanded
4140 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4141 do
4142 ac_preproc_ok=false
4143for ac_c_preproc_warn_flag in '' yes
4144do
4145 # Use a header file that comes with gcc, so configuring glibc
4146 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004147 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4148 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004149 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004150 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004152/* end confdefs.h. */
4153#ifdef __STDC__
4154# include <limits.h>
4155#else
4156# include <assert.h>
4157#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004158 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004160if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004161
Matthias Kloseb9621712010-04-24 17:59:49 +00004162else
Martin v. Löwis11437992002-04-12 09:54:03 +00004163 # Broken: fails on valid input.
4164continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004165fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004166rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004167
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004168 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004169 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004172#include <ac_nonexistent.h>
4173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004174if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004175 # Broken: success on invalid input.
4176continue
4177else
Martin v. Löwis11437992002-04-12 09:54:03 +00004178 # Passes both tests.
4179ac_preproc_ok=:
4180break
4181fi
4182rm -f conftest.err conftest.$ac_ext
4183
4184done
4185# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4186rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004187if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004188 break
4189fi
4190
4191 done
4192 ac_cv_prog_CPP=$CPP
4193
4194fi
4195 CPP=$ac_cv_prog_CPP
4196else
4197 ac_cv_prog_CPP=$CPP
4198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4200$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004201ac_preproc_ok=false
4202for ac_c_preproc_warn_flag in '' yes
4203do
4204 # Use a header file that comes with gcc, so configuring glibc
4205 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004206 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4207 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 # On the NeXT, cc -E runs the code through the compiler's parser,
4209 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004211/* end confdefs.h. */
4212#ifdef __STDC__
4213# include <limits.h>
4214#else
4215# include <assert.h>
4216#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004217 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004219if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004220
Matthias Kloseb9621712010-04-24 17:59:49 +00004221else
Martin v. Löwis11437992002-04-12 09:54:03 +00004222 # Broken: fails on valid input.
4223continue
4224fi
4225rm -f conftest.err conftest.$ac_ext
4226
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004228 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004231#include <ac_nonexistent.h>
4232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004233if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004234 # Broken: success on invalid input.
4235continue
4236else
Martin v. Löwis11437992002-04-12 09:54:03 +00004237 # Passes both tests.
4238ac_preproc_ok=:
4239break
4240fi
4241rm -f conftest.err conftest.$ac_ext
4242
4243done
4244# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4245rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004246if $ac_preproc_ok; then :
4247
Martin v. Löwis11437992002-04-12 09:54:03 +00004248else
Matthias Kloseb9621712010-04-24 17:59:49 +00004249 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4250$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4251as_fn_error "C preprocessor \"$CPP\" fails sanity check
4252See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004253fi
4254
4255ac_ext=c
4256ac_cpp='$CPP $CPPFLAGS'
4257ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4258ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4259ac_compiler_gnu=$ac_cv_c_compiler_gnu
4260
4261
Matthias Kloseb9621712010-04-24 17:59:49 +00004262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4263$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4264if test "${ac_cv_path_GREP+set}" = set; then :
4265 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004266else
Matthias Kloseb9621712010-04-24 17:59:49 +00004267 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004268 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004269 # Loop through the user's path and test for each of PROGNAME-LIST
4270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4272do
4273 IFS=$as_save_IFS
4274 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004275 for ac_prog in grep ggrep; do
4276 for ac_exec_ext in '' $ac_executable_extensions; do
4277 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4278 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4279# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280 # Check for GNU $ac_path_GREP
4281case `"$ac_path_GREP" --version 2>&1` in
4282*GNU*)
4283 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4284*)
4285 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004286 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004287 while :
4288 do
4289 cat "conftest.in" "conftest.in" >"conftest.tmp"
4290 mv "conftest.tmp" "conftest.in"
4291 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004292 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004293 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4294 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004295 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004296 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4297 # Best one so far, save it but keep looking for a better one
4298 ac_cv_path_GREP="$ac_path_GREP"
4299 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004300 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 # 10*(2^10) chars as input seems more than enough
4302 test $ac_count -gt 10 && break
4303 done
4304 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4305esac
4306
Matthias Kloseb9621712010-04-24 17:59:49 +00004307 $ac_path_GREP_found && break 3
4308 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004310 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004312 if test -z "$ac_cv_path_GREP"; then
4313 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4314 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004315else
4316 ac_cv_path_GREP=$GREP
4317fi
4318
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4321$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 GREP="$ac_cv_path_GREP"
4323
4324
Matthias Kloseb9621712010-04-24 17:59:49 +00004325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4326$as_echo_n "checking for egrep... " >&6; }
4327if test "${ac_cv_path_EGREP+set}" = set; then :
4328 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329else
4330 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4331 then ac_cv_path_EGREP="$GREP -E"
4332 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004333 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004335 # Loop through the user's path and test for each of PROGNAME-LIST
4336 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4338do
4339 IFS=$as_save_IFS
4340 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 for ac_prog in egrep; do
4342 for ac_exec_ext in '' $ac_executable_extensions; do
4343 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4344 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4345# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346 # Check for GNU $ac_path_EGREP
4347case `"$ac_path_EGREP" --version 2>&1` in
4348*GNU*)
4349 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4350*)
4351 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004352 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353 while :
4354 do
4355 cat "conftest.in" "conftest.in" >"conftest.tmp"
4356 mv "conftest.tmp" "conftest.in"
4357 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4360 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4363 # Best one so far, save it but keep looking for a better one
4364 ac_cv_path_EGREP="$ac_path_EGREP"
4365 ac_path_EGREP_max=$ac_count
4366 fi
4367 # 10*(2^10) chars as input seems more than enough
4368 test $ac_count -gt 10 && break
4369 done
4370 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4371esac
4372
Matthias Kloseb9621712010-04-24 17:59:49 +00004373 $ac_path_EGREP_found && break 3
4374 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004376 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004377IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004378 if test -z "$ac_cv_path_EGREP"; then
4379 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4380 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381else
4382 ac_cv_path_EGREP=$EGREP
4383fi
4384
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385 fi
4386fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4388$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004389 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004390
4391
Matthias Kloseb9621712010-04-24 17:59:49 +00004392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4393$as_echo_n "checking for ANSI C header files... " >&6; }
4394if test "${ac_cv_header_stdc+set}" = set; then :
4395 $as_echo_n "(cached) " >&6
4396else
4397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004398/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004399#include <stdlib.h>
4400#include <stdarg.h>
4401#include <string.h>
4402#include <float.h>
4403
4404int
4405main ()
4406{
4407
4408 ;
4409 return 0;
4410}
4411_ACEOF
4412if ac_fn_c_try_compile "$LINENO"; then :
4413 ac_cv_header_stdc=yes
4414else
4415 ac_cv_header_stdc=no
4416fi
4417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4418
4419if test $ac_cv_header_stdc = yes; then
4420 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4422/* end confdefs.h. */
4423#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004424
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004425_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004426if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004427 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004428
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004429else
Matthias Kloseb9621712010-04-24 17:59:49 +00004430 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004431fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004432rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004433
Matthias Kloseb9621712010-04-24 17:59:49 +00004434fi
4435
4436if test $ac_cv_header_stdc = yes; then
4437 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4439/* end confdefs.h. */
4440#include <stdlib.h>
4441
4442_ACEOF
4443if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4444 $EGREP "free" >/dev/null 2>&1; then :
4445
4446else
4447 ac_cv_header_stdc=no
4448fi
4449rm -f conftest*
4450
4451fi
4452
4453if test $ac_cv_header_stdc = yes; then
4454 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4455 if test "$cross_compiling" = yes; then :
4456 :
4457else
4458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4459/* end confdefs.h. */
4460#include <ctype.h>
4461#include <stdlib.h>
4462#if ((' ' & 0x0FF) == 0x020)
4463# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4464# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4465#else
4466# define ISLOWER(c) \
4467 (('a' <= (c) && (c) <= 'i') \
4468 || ('j' <= (c) && (c) <= 'r') \
4469 || ('s' <= (c) && (c) <= 'z'))
4470# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4471#endif
4472
4473#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4474int
4475main ()
4476{
4477 int i;
4478 for (i = 0; i < 256; i++)
4479 if (XOR (islower (i), ISLOWER (i))
4480 || toupper (i) != TOUPPER (i))
4481 return 2;
4482 return 0;
4483}
4484_ACEOF
4485if ac_fn_c_try_run "$LINENO"; then :
4486
4487else
4488 ac_cv_header_stdc=no
4489fi
4490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4491 conftest.$ac_objext conftest.beam conftest.$ac_ext
4492fi
4493
4494fi
4495fi
4496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4497$as_echo "$ac_cv_header_stdc" >&6; }
4498if test $ac_cv_header_stdc = yes; then
4499
4500$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4501
4502fi
4503
4504# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4505for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4506 inttypes.h stdint.h unistd.h
4507do :
4508 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4509ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4510"
4511eval as_val=\$$as_ac_Header
4512 if test "x$as_val" = x""yes; then :
4513 cat >>confdefs.h <<_ACEOF
4514#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4515_ACEOF
4516
4517fi
4518
4519done
4520
4521
4522
4523 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4524if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4525 MINIX=yes
4526else
4527 MINIX=
4528fi
4529
4530
4531 if test "$MINIX" = yes; then
4532
4533$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4534
4535
4536$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4537
4538
4539$as_echo "#define _MINIX 1" >>confdefs.h
4540
4541 fi
4542
4543
4544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4545$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4546if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4547 $as_echo_n "(cached) " >&6
4548else
4549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4550/* end confdefs.h. */
4551
4552# define __EXTENSIONS__ 1
4553 $ac_includes_default
4554int
4555main ()
4556{
4557
4558 ;
4559 return 0;
4560}
4561_ACEOF
4562if ac_fn_c_try_compile "$LINENO"; then :
4563 ac_cv_safe_to_define___extensions__=yes
4564else
4565 ac_cv_safe_to_define___extensions__=no
4566fi
4567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4568fi
4569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4570$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4571 test $ac_cv_safe_to_define___extensions__ = yes &&
4572 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4573
4574 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4575
4576 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4577
4578 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4579
4580 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4581
4582
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004583
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004584# Check for unsupported systems
4585case $ac_sys_system/$ac_sys_release in
4586atheos*|Linux*/1*)
4587 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4588 echo See README for details.
4589 exit 1;;
4590esac
4591
4592
Matthias Kloseb9621712010-04-24 17:59:49 +00004593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4594$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004595
4596# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004597if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004598 withval=$with_suffix;
4599 case $withval in
4600 no) EXEEXT=;;
4601 yes) EXEEXT=.exe;;
4602 *) EXEEXT=$withval;;
4603 esac
4604fi
4605
Matthias Kloseb9621712010-04-24 17:59:49 +00004606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4607$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004608
4609# Test whether we're running on a non-case-sensitive system, in which
4610# case we give a warning if no ext is given
4611
Matthias Kloseb9621712010-04-24 17:59:49 +00004612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4613$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004614if test ! -d CaseSensitiveTestDir; then
4615mkdir CaseSensitiveTestDir
4616fi
4617
4618if test -d casesensitivetestdir
4619then
Matthias Kloseb9621712010-04-24 17:59:49 +00004620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4621$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004622 BUILDEXEEXT=.exe
4623else
Matthias Kloseb9621712010-04-24 17:59:49 +00004624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4625$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004626 BUILDEXEEXT=$EXEEXT
4627fi
4628rmdir CaseSensitiveTestDir
4629
4630case $MACHDEP in
4631bsdos*)
4632 case $CC in
4633 gcc) CC="$CC -D_HAVE_BSDI";;
4634 esac;;
4635esac
4636
4637case $ac_sys_system in
4638hp*|HP*)
4639 case $CC in
4640 cc|*/cc) CC="$CC -Ae";;
4641 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004642esac
4643
4644
4645
Matthias Kloseb9621712010-04-24 17:59:49 +00004646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4647$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004648if test -z "$LIBRARY"
4649then
4650 LIBRARY='libpython$(VERSION).a'
4651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4653$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004654
4655# LDLIBRARY is the name of the library to link against (as opposed to the
4656# name of the library into which to insert object files). BLDLIBRARY is also
4657# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4658# is blank as the main program is not linked directly against LDLIBRARY.
4659# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4660# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4661# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4662# DLLLIBRARY is the shared (i.e., DLL) library.
4663#
4664# RUNSHARED is used to run shared python without installed libraries
4665#
4666# INSTSONAME is the name of the shared library that will be use to install
4667# on the system - some systems like version suffix, others don't
4668
4669
4670
4671
4672
4673
4674LDLIBRARY="$LIBRARY"
4675BLDLIBRARY='$(LDLIBRARY)'
4676INSTSONAME='$(LDLIBRARY)'
4677DLLLIBRARY=''
4678LDLIBRARYDIR=''
4679RUNSHARED=''
4680
4681# LINKCC is the command that links the python executable -- default is $(CC).
4682# If CXX is set, and if it is needed to link a main function that was
4683# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4684# python might then depend on the C++ runtime
4685# This is altered for AIX in order to build the export list before
4686# linking.
4687
Matthias Kloseb9621712010-04-24 17:59:49 +00004688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4689$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004690if test -z "$LINKCC"
4691then
4692 LINKCC='$(PURIFY) $(MAINCC)'
4693 case $ac_sys_system in
4694 AIX*)
4695 exp_extra="\"\""
4696 if test $ac_sys_release -ge 5 -o \
4697 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4698 exp_extra="."
4699 fi
4700 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004701 QNX*)
4702 # qcc must be used because the other compilers do not
4703 # support -N.
4704 LINKCC=qcc;;
4705 esac
4706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4708$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004709
4710# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4711# make sure we default having it set to "no": this is used by
4712# distutils.unixccompiler to know if it should add --enable-new-dtags
4713# to linker command lines, and failing to detect GNU ld simply results
4714# in the same bahaviour as before.
4715
Matthias Kloseb9621712010-04-24 17:59:49 +00004716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4717$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004718ac_prog=ld
4719if test "$GCC" = yes; then
4720 ac_prog=`$CC -print-prog-name=ld`
4721fi
4722case `"$ac_prog" -V 2>&1 < /dev/null` in
4723 *GNU*)
4724 GNULD=yes;;
4725 *)
4726 GNULD=no;;
4727esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4729$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004730
Matthias Kloseb9621712010-04-24 17:59:49 +00004731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4732$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004733# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004734if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004735 enableval=$enable_shared;
4736fi
4737
4738
4739if test -z "$enable_shared"
4740then
4741 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004742 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004743 enable_shared="yes";;
4744 *)
4745 enable_shared="no";;
4746 esac
4747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4749$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004750
Matthias Kloseb9621712010-04-24 17:59:49 +00004751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4752$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004753# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004754if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004755 enableval=$enable_profiling; ac_save_cc="$CC"
4756 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004757 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004758 ac_enable_profiling="no"
4759else
Matthias Kloseb9621712010-04-24 17:59:49 +00004760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004761/* end confdefs.h. */
4762int main() { return 0; }
4763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004764if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004765 ac_enable_profiling="yes"
4766else
Matthias Kloseb9621712010-04-24 17:59:49 +00004767 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4770 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004771fi
4772
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004773 CC="$ac_save_cc"
4774fi
4775
Matthias Kloseb9621712010-04-24 17:59:49 +00004776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4777$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004778
4779case "$ac_enable_profiling" in
4780 "yes")
4781 BASECFLAGS="-pg $BASECFLAGS"
4782 LDFLAGS="-pg $LDFLAGS"
4783 ;;
4784esac
4785
Matthias Kloseb9621712010-04-24 17:59:49 +00004786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4787$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004788
4789# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4790# library that we build, but we do not want to link against it (we
4791# will find it with a -framework option). For this reason there is an
4792# extra variable BLDLIBRARY against which Python and the extension
4793# modules are linked, BLDLIBRARY. This is normally the same as
4794# LDLIBRARY, but empty for MacOSX framework builds.
4795if test "$enable_framework"
4796then
4797 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4798 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4799 BLDLIBRARY=''
4800else
4801 BLDLIBRARY='$(LDLIBRARY)'
4802fi
4803
4804# Other platforms follow
4805if test $enable_shared = "yes"; then
4806
Matthias Kloseb9621712010-04-24 17:59:49 +00004807$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004808
4809 case $ac_sys_system in
4810 CYGWIN*)
4811 LDLIBRARY='libpython$(VERSION).dll.a'
4812 DLLLIBRARY='libpython$(VERSION).dll'
4813 ;;
4814 SunOS*)
4815 LDLIBRARY='libpython$(VERSION).so'
4816 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4817 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4818 INSTSONAME="$LDLIBRARY".$SOVERSION
4819 ;;
4820 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4821 LDLIBRARY='libpython$(VERSION).so'
4822 BLDLIBRARY='-L. -lpython$(VERSION)'
4823 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4824 case $ac_sys_system in
4825 FreeBSD*)
4826 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4827 ;;
4828 esac
4829 INSTSONAME="$LDLIBRARY".$SOVERSION
4830 ;;
4831 hp*|HP*)
4832 case `uname -m` in
4833 ia64)
4834 LDLIBRARY='libpython$(VERSION).so'
4835 ;;
4836 *)
4837 LDLIBRARY='libpython$(VERSION).sl'
4838 ;;
4839 esac
4840 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4841 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4842 ;;
4843 OSF*)
4844 LDLIBRARY='libpython$(VERSION).so'
4845 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4846 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4847 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848 Darwin*)
4849 LDLIBRARY='libpython$(VERSION).dylib'
4850 BLDLIBRARY='-L. -lpython$(VERSION)'
4851 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4852 ;;
4853
4854 esac
4855else # shared is disabled
4856 case $ac_sys_system in
4857 CYGWIN*)
4858 BLDLIBRARY='$(LIBRARY)'
4859 LDLIBRARY='libpython$(VERSION).dll.a'
4860 ;;
4861 esac
4862fi
4863
Matthias Kloseb9621712010-04-24 17:59:49 +00004864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4865$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004866
4867if test -n "$ac_tool_prefix"; then
4868 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4869set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4871$as_echo_n "checking for $ac_word... " >&6; }
4872if test "${ac_cv_prog_RANLIB+set}" = set; then :
4873 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004874else
4875 if test -n "$RANLIB"; then
4876 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4877else
4878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4879for as_dir in $PATH
4880do
4881 IFS=$as_save_IFS
4882 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004883 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004884 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4885 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004887 break 2
4888 fi
4889done
Matthias Kloseb9621712010-04-24 17:59:49 +00004890 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004891IFS=$as_save_IFS
4892
4893fi
4894fi
4895RANLIB=$ac_cv_prog_RANLIB
4896if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4898$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004899else
Matthias Kloseb9621712010-04-24 17:59:49 +00004900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4901$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004902fi
4903
4904
4905fi
4906if test -z "$ac_cv_prog_RANLIB"; then
4907 ac_ct_RANLIB=$RANLIB
4908 # Extract the first word of "ranlib", so it can be a program name with args.
4909set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4911$as_echo_n "checking for $ac_word... " >&6; }
4912if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4913 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004914else
4915 if test -n "$ac_ct_RANLIB"; then
4916 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4917else
4918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4919for as_dir in $PATH
4920do
4921 IFS=$as_save_IFS
4922 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004923 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004924 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4925 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927 break 2
4928 fi
4929done
Matthias Kloseb9621712010-04-24 17:59:49 +00004930 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004931IFS=$as_save_IFS
4932
4933fi
4934fi
4935ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4936if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4938$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004939else
Matthias Kloseb9621712010-04-24 17:59:49 +00004940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4941$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004942fi
4943
4944 if test "x$ac_ct_RANLIB" = x; then
4945 RANLIB=":"
4946 else
4947 case $cross_compiling:$ac_tool_warned in
4948yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00004949{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4950$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951ac_tool_warned=yes ;;
4952esac
4953 RANLIB=$ac_ct_RANLIB
4954 fi
4955else
4956 RANLIB="$ac_cv_prog_RANLIB"
4957fi
4958
4959
4960for ac_prog in ar aal
4961do
4962 # Extract the first word of "$ac_prog", so it can be a program name with args.
4963set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4965$as_echo_n "checking for $ac_word... " >&6; }
4966if test "${ac_cv_prog_AR+set}" = set; then :
4967 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968else
4969 if test -n "$AR"; then
4970 ac_cv_prog_AR="$AR" # Let the user override the test.
4971else
4972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4973for as_dir in $PATH
4974do
4975 IFS=$as_save_IFS
4976 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004977 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4979 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981 break 2
4982 fi
4983done
Matthias Kloseb9621712010-04-24 17:59:49 +00004984 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004985IFS=$as_save_IFS
4986
4987fi
4988fi
4989AR=$ac_cv_prog_AR
4990if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4992$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004993else
Matthias Kloseb9621712010-04-24 17:59:49 +00004994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4995$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996fi
4997
4998
4999 test -n "$AR" && break
5000done
5001test -n "$AR" || AR="ar"
5002
5003
5004# tweak ARFLAGS only if the user didn't set it on the command line
5005
5006if test -z "$ARFLAGS"
5007then
5008 ARFLAGS="rc"
5009fi
5010
5011
5012# Extract the first word of "svnversion", so it can be a program name with args.
5013set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5015$as_echo_n "checking for $ac_word... " >&6; }
5016if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5017 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018else
5019 if test -n "$SVNVERSION"; then
5020 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5021else
5022as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5023for as_dir in $PATH
5024do
5025 IFS=$as_save_IFS
5026 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005027 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005028 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5029 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005030 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005031 break 2
5032 fi
5033done
Matthias Kloseb9621712010-04-24 17:59:49 +00005034 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005035IFS=$as_save_IFS
5036
5037 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5038fi
5039fi
5040SVNVERSION=$ac_cv_prog_SVNVERSION
5041if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5043$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044else
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5046$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005047fi
5048
5049
5050if test $SVNVERSION = found
5051then
5052 SVNVERSION="svnversion \$(srcdir)"
5053else
5054 SVNVERSION="echo Unversioned directory"
5055fi
5056
5057case $MACHDEP in
5058bsdos*|hp*|HP*)
5059 # install -d does not work on BSDI or HP-UX
5060 if test -z "$INSTALL"
5061 then
5062 INSTALL="${srcdir}/install-sh -c"
5063 fi
5064esac
5065ac_aux_dir=
5066for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 for ac_t in install-sh install.sh shtool; do
5068 if test -f "$ac_dir/$ac_t"; then
5069 ac_aux_dir=$ac_dir
5070 ac_install_sh="$ac_aux_dir/$ac_t -c"
5071 break 2
5072 fi
5073 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074done
5075if test -z "$ac_aux_dir"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077fi
5078
5079# These three variables are undocumented and unsupported,
5080# and are intended to be withdrawn in a future Autoconf release.
5081# They can cause serious problems if a builder's source tree is in a directory
5082# whose full name contains unusual characters.
5083ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5084ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5085ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5086
5087
5088# Find a good install program. We prefer a C program (faster),
5089# so one script is as good as another. But avoid the broken or
5090# incompatible versions:
5091# SysV /etc/install, /usr/sbin/install
5092# SunOS /usr/etc/install
5093# IRIX /sbin/install
5094# AIX /bin/install
5095# AmigaOS /C/install, which installs bootblocks on floppy discs
5096# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5097# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5098# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5099# OS/2's system install, which has a completely different semantic
5100# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005101# Reject install programs that cannot install multiple files.
5102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5103$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005104if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005105if test "${ac_cv_path_install+set}" = set; then :
5106 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005107else
5108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5109for as_dir in $PATH
5110do
5111 IFS=$as_save_IFS
5112 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 # Account for people who put trailing slashes in PATH elements.
5114case $as_dir/ in #((
5115 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005116 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005117 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005118 /usr/ucb/* ) ;;
5119 *)
5120 # OSF1 and SCO ODT 3.0 have their own names for install.
5121 # Don't use installbsd from OSF since it installs stuff as root
5122 # by default.
5123 for ac_prog in ginstall scoinst install; do
5124 for ac_exec_ext in '' $ac_executable_extensions; do
5125 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5126 if test $ac_prog = install &&
5127 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5128 # AIX install. It has an incompatible calling convention.
5129 :
5130 elif test $ac_prog = install &&
5131 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5132 # program-specific install script used by HP pwplus--don't use.
5133 :
5134 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005135 rm -rf conftest.one conftest.two conftest.dir
5136 echo one > conftest.one
5137 echo two > conftest.two
5138 mkdir conftest.dir
5139 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5140 test -s conftest.one && test -s conftest.two &&
5141 test -s conftest.dir/conftest.one &&
5142 test -s conftest.dir/conftest.two
5143 then
5144 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5145 break 3
5146 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005147 fi
5148 fi
5149 done
5150 done
5151 ;;
5152esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005153
5154 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005155IFS=$as_save_IFS
5156
Matthias Kloseb9621712010-04-24 17:59:49 +00005157rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005158
5159fi
5160 if test "${ac_cv_path_install+set}" = set; then
5161 INSTALL=$ac_cv_path_install
5162 else
5163 # As a last resort, use the slow shell script. Don't cache a
5164 # value for INSTALL within a source directory, because that will
5165 # break other packages using the cache if that directory is
5166 # removed, or if the value is a relative name.
5167 INSTALL=$ac_install_sh
5168 fi
5169fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5171$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005172
5173# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5174# It thinks the first close brace ends the variable substitution.
5175test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5176
5177test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5178
5179test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5180
5181
5182# Not every filesystem supports hard links
5183
5184if test -z "$LN" ; then
5185 case $ac_sys_system in
5186 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005187 *) LN=ln;;
5188 esac
5189fi
5190
5191# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5193$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005194
5195# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005196if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197 withval=$with_pydebug;
5198if test "$withval" != no
5199then
5200
Matthias Kloseb9621712010-04-24 17:59:49 +00005201$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005202
Matthias Kloseb9621712010-04-24 17:59:49 +00005203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5204$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005205 Py_DEBUG='true'
Matthias Kloseb9621712010-04-24 17:59:49 +00005206else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5207$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005208fi
5209else
Matthias Kloseb9621712010-04-24 17:59:49 +00005210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5211$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005212fi
5213
5214
5215# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5216# merged with this chunk of code?
5217
5218# Optimizer/debugger flags
5219# ------------------------
5220# (The following bit of code is complicated enough - please keep things
5221# indented properly. Just pretend you're editing Python code. ;-)
5222
5223# There are two parallel sets of case statements below, one that checks to
5224# see if OPT was set and one that does BASECFLAGS setting based upon
5225# compiler and platform. BASECFLAGS tweaks need to be made even if the
5226# user set OPT.
5227
5228# tweak OPT based on compiler and platform, only if the user didn't set
5229# it on the command line
5230
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005231if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005232then
5233 case $GCC in
5234 yes)
5235 if test "$CC" != 'g++' ; then
5236 STRICT_PROTO="-Wstrict-prototypes"
5237 fi
5238 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5239 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5240 WRAP="-fwrapv"
5241 fi
5242 case $ac_cv_prog_cc_g in
5243 yes)
5244 if test "$Py_DEBUG" = 'true' ; then
5245 # Optimization messes up debuggers, so turn it off for
5246 # debug builds.
5247 OPT="-g -Wall $STRICT_PROTO"
5248 else
5249 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5250 fi
5251 ;;
5252 *)
5253 OPT="-O3 -Wall $STRICT_PROTO"
5254 ;;
5255 esac
5256 case $ac_sys_system in
5257 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5258 ;;
5259 esac
5260 ;;
5261
5262 *)
5263 OPT="-O"
5264 ;;
5265 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005266fi
5267
5268
5269
5270# The -arch flags for universal builds on OSX
5271UNIVERSAL_ARCH_FLAGS=
5272
5273
5274# tweak BASECFLAGS based on compiler and platform
5275case $GCC in
5276yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005277 # Python doesn't violate C99 aliasing rules, but older versions of
5278 # GCC produce warnings for legal Python code. Enable
5279 # -fno-strict-aliasing on versions of GCC that support but produce
5280 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5282$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005283 ac_save_cc="$CC"
5284 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005285 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005286 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5287 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005288else
Matthias Kloseb9621712010-04-24 17:59:49 +00005289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005290/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005291
Matthias Kloseb159a552010-04-25 21:00:44 +00005292
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005293int
5294main ()
5295{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005296int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005297 ;
5298 return 0;
5299}
Matthias Kloseb159a552010-04-25 21:00:44 +00005300
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005302if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005303
5304 CC="$ac_save_cc -fstrict-aliasing"
5305 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005307/* end confdefs.h. */
5308
Matthias Kloseb159a552010-04-25 21:00:44 +00005309
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005310int
5311main ()
5312{
5313void f(int **x) {} int main() { double *x; f((int **) &x); return 0; }
5314 ;
5315 return 0;
5316}
Matthias Kloseb159a552010-04-25 21:00:44 +00005317
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005319if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005320
5321 ac_cv_no_strict_aliasing=no
5322
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005323else
Matthias Kloseb159a552010-04-25 21:00:44 +00005324
5325 ac_cv_no_strict_aliasing=yes
5326
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005327fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005329
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005330else
Matthias Kloseb159a552010-04-25 21:00:44 +00005331
5332 ac_cv_no_strict_aliasing=no
5333
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005336fi
5337
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005338 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005339 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5341$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005342 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005343 then
5344 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5345 fi
5346
5347 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5348 # support. Without this, treatment of subnormals doesn't follow
5349 # the standard.
5350 case $ac_sys_machine in
5351 alpha*)
5352 BASECFLAGS="$BASECFLAGS -mieee"
5353 ;;
5354 esac
5355
5356 case $ac_sys_system in
5357 SCO_SV*)
5358 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5359 ;;
5360 # is there any other compiler on Darwin besides gcc?
5361 Darwin*)
5362 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5363 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005364 if test "${CC}" = gcc
5365 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5367$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005368 case "${UNIVERSALSDK}" in
5369 */MacOSX10.4u.sdk)
5370 # Build using 10.4 SDK, force usage of gcc when the
5371 # compiler is gcc, otherwise the user will get very
5372 # confusing error messages when building on OSX 10.6
5373 CC=gcc-4.0
5374 CPP=cpp-4.0
5375 ;;
5376 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5378$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005379 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380
5381
5382 if test "${enable_universalsdk}"; then
5383 UNIVERSAL_ARCH_FLAGS=""
5384 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5385 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5386 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005387 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005388 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5389 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005390 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005391 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005392
5393 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5394 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005395 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005396 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005398 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5399 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005400 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005401 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005402
5403 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5404 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005405 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005406 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005409 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 +00005410
5411 fi
5412
5413
Ronald Oussoren666028b2010-04-18 19:07:43 +00005414 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5415 if test "${UNIVERSALSDK}" != "/"
5416 then
5417 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5418 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005419 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005420 fi
5421 fi
5422
5423 # Calculate the right deployment target for this build.
5424 #
5425 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5426 if test ${cur_target} '>' 10.2; then
5427 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005428 if test ${enable_universalsdk}; then
5429 if test "${UNIVERSAL_ARCHS}" = "all"; then
5430 # Ensure that the default platform for a
5431 # 4-way universal build is OSX 10.5,
5432 # that's the first OS release where
5433 # 4-way builds make sense.
5434 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005435
5436 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5437 cur_target='10.5'
5438
5439 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5440 cur_target='10.5'
5441
5442 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5443 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005444 fi
5445 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005446 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005447 # On Intel macs default to a deployment
5448 # target of 10.4, that's the first OSX
5449 # release with Intel support.
5450 cur_target="10.4"
5451 fi
5452 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453 fi
5454 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5455
5456 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5457 # environment with a value that is the same as what we'll use
5458 # in the Makefile to ensure that we'll get the same compiler
5459 # environment during configure and build time.
5460 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5461 export MACOSX_DEPLOYMENT_TARGET
5462 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5463
5464 ;;
5465 OSF*)
5466 BASECFLAGS="$BASECFLAGS -mieee"
5467 ;;
5468 esac
5469 ;;
5470
5471*)
5472 case $ac_sys_system in
5473 OpenUNIX*|UnixWare*)
5474 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5475 ;;
5476 OSF*)
5477 BASECFLAGS="$BASECFLAGS -ieee -std"
5478 ;;
5479 SCO_SV*)
5480 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5481 ;;
5482 esac
5483 ;;
5484esac
5485
5486if test "$Py_DEBUG" = 'true'; then
5487 :
5488else
5489 OPT="-DNDEBUG $OPT"
5490fi
5491
5492if test "$ac_arch_flags"
5493then
5494 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5495fi
5496
5497# disable check for icc since it seems to pass, but generates a warning
5498if test "$CC" = icc
5499then
5500 ac_cv_opt_olimit_ok=no
5501fi
5502
Matthias Kloseb9621712010-04-24 17:59:49 +00005503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5504$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5505if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5506 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005507else
5508 ac_save_cc="$CC"
5509CC="$CC -OPT:Olimit=0"
Matthias Kloseb9621712010-04-24 17:59:49 +00005510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005511/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005512
5513int
5514main ()
5515{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005517 ;
5518 return 0;
5519}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005521if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005522 ac_cv_opt_olimit_ok=yes
5523else
Matthias Kloseb9621712010-04-24 17:59:49 +00005524 ac_cv_opt_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005525
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005528CC="$ac_save_cc"
5529fi
5530
Matthias Kloseb9621712010-04-24 17:59:49 +00005531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5532$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533if test $ac_cv_opt_olimit_ok = yes; then
5534 case $ac_sys_system in
5535 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5536 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5537 # environment?
5538 Darwin*)
5539 ;;
5540 *)
5541 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5542 ;;
5543 esac
5544else
Matthias Kloseb9621712010-04-24 17:59:49 +00005545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5546$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5547 if test "${ac_cv_olimit_ok+set}" = set; then :
5548 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549else
5550 ac_save_cc="$CC"
5551 CC="$CC -Olimit 1500"
Matthias Kloseb9621712010-04-24 17:59:49 +00005552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005554
5555int
5556main ()
5557{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005558int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005559 ;
5560 return 0;
5561}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005563if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005564 ac_cv_olimit_ok=yes
5565else
Matthias Kloseb9621712010-04-24 17:59:49 +00005566 ac_cv_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005567
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005568fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005570 CC="$ac_save_cc"
5571fi
5572
Matthias Kloseb9621712010-04-24 17:59:49 +00005573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5574$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005575 if test $ac_cv_olimit_ok = yes; then
5576 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5577 fi
5578fi
5579
5580# Check whether GCC supports PyArg_ParseTuple format
5581if test "$GCC" = "yes"
5582then
Matthias Kloseb9621712010-04-24 17:59:49 +00005583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5584$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005585 save_CFLAGS=$CFLAGS
5586 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588/* end confdefs.h. */
5589
5590 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591int
5592main ()
5593{
5594
5595 ;
5596 return 0;
5597}
Matthias Kloseb159a552010-04-25 21:00:44 +00005598
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005600if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601
Matthias Kloseb159a552010-04-25 21:00:44 +00005602
Matthias Kloseb9621712010-04-24 17:59:49 +00005603$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604
Matthias Kloseb159a552010-04-25 21:00:44 +00005605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005606$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005607
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608else
Matthias Kloseb159a552010-04-25 21:00:44 +00005609
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005611$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612
5613fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5615 CFLAGS=$save_CFLAGS
5616fi
5617
5618# On some compilers, pthreads are available without further options
5619# (e.g. MacOS X). On some of these systems, the compiler will not
5620# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5621# So we have to see first whether pthreads are available without
5622# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5624$as_echo_n "checking whether pthreads are available without options... " >&6; }
5625if test "${ac_cv_pthread_is_default+set}" = set; then :
5626 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627else
Matthias Kloseb9621712010-04-24 17:59:49 +00005628 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629 ac_cv_pthread_is_default=no
5630else
Matthias Kloseb9621712010-04-24 17:59:49 +00005631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632/* end confdefs.h. */
5633
5634#include <pthread.h>
5635
5636void* routine(void* p){return NULL;}
5637
5638int main(){
5639 pthread_t p;
5640 if(pthread_create(&p,NULL,routine,NULL)!=0)
5641 return 1;
5642 (void)pthread_detach(p);
5643 return 0;
5644}
5645
5646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005647if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648
5649 ac_cv_pthread_is_default=yes
5650 ac_cv_kthread=no
5651 ac_cv_pthread=no
5652
5653else
Matthias Kloseb9621712010-04-24 17:59:49 +00005654 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5657 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658fi
5659
5660
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661fi
5662
Matthias Kloseb9621712010-04-24 17:59:49 +00005663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5664$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665
5666
5667if test $ac_cv_pthread_is_default = yes
5668then
5669 ac_cv_kpthread=no
5670else
5671# -Kpthread, if available, provides the right #defines
5672# and linker options to make pthread_create available
5673# Some compilers won't report that they do not support -Kpthread,
5674# so we need to run a program to see whether it really made the
5675# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5677$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5678if test "${ac_cv_kpthread+set}" = set; then :
5679 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680else
5681 ac_save_cc="$CC"
5682CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005683if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684 ac_cv_kpthread=no
5685else
Matthias Kloseb9621712010-04-24 17:59:49 +00005686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687/* end confdefs.h. */
5688
5689#include <pthread.h>
5690
5691void* routine(void* p){return NULL;}
5692
5693int main(){
5694 pthread_t p;
5695 if(pthread_create(&p,NULL,routine,NULL)!=0)
5696 return 1;
5697 (void)pthread_detach(p);
5698 return 0;
5699}
5700
5701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005702if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703 ac_cv_kpthread=yes
5704else
Matthias Kloseb9621712010-04-24 17:59:49 +00005705 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005707rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5708 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709fi
5710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711CC="$ac_save_cc"
5712fi
5713
Matthias Kloseb9621712010-04-24 17:59:49 +00005714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5715$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716fi
5717
5718if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5719then
5720# -Kthread, if available, provides the right #defines
5721# and linker options to make pthread_create available
5722# Some compilers won't report that they do not support -Kthread,
5723# so we need to run a program to see whether it really made the
5724# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5726$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5727if test "${ac_cv_kthread+set}" = set; then :
5728 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729else
5730 ac_save_cc="$CC"
5731CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005732if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733 ac_cv_kthread=no
5734else
Matthias Kloseb9621712010-04-24 17:59:49 +00005735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736/* end confdefs.h. */
5737
5738#include <pthread.h>
5739
5740void* routine(void* p){return NULL;}
5741
5742int main(){
5743 pthread_t p;
5744 if(pthread_create(&p,NULL,routine,NULL)!=0)
5745 return 1;
5746 (void)pthread_detach(p);
5747 return 0;
5748}
5749
5750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005751if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752 ac_cv_kthread=yes
5753else
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005756rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5757 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758fi
5759
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760CC="$ac_save_cc"
5761fi
5762
Matthias Kloseb9621712010-04-24 17:59:49 +00005763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5764$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765fi
5766
5767if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5768then
5769# -pthread, if available, provides the right #defines
5770# and linker options to make pthread_create available
5771# Some compilers won't report that they do not support -pthread,
5772# so we need to run a program to see whether it really made the
5773# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5775$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5776if test "${ac_cv_thread+set}" = set; then :
5777 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778else
5779 ac_save_cc="$CC"
5780CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005781if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782 ac_cv_pthread=no
5783else
Matthias Kloseb9621712010-04-24 17:59:49 +00005784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785/* end confdefs.h. */
5786
5787#include <pthread.h>
5788
5789void* routine(void* p){return NULL;}
5790
5791int main(){
5792 pthread_t p;
5793 if(pthread_create(&p,NULL,routine,NULL)!=0)
5794 return 1;
5795 (void)pthread_detach(p);
5796 return 0;
5797}
5798
5799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005800if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801 ac_cv_pthread=yes
5802else
Matthias Kloseb9621712010-04-24 17:59:49 +00005803 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5806 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807fi
5808
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809CC="$ac_save_cc"
5810fi
5811
Matthias Kloseb9621712010-04-24 17:59:49 +00005812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5813$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814fi
5815
5816# If we have set a CC compiler flag for thread support then
5817# check if it works for CXX, too.
5818ac_cv_cxx_thread=no
5819if test ! -z "$CXX"
5820then
Matthias Kloseb9621712010-04-24 17:59:49 +00005821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5822$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823ac_save_cxx="$CXX"
5824
5825if test "$ac_cv_kpthread" = "yes"
5826then
5827 CXX="$CXX -Kpthread"
5828 ac_cv_cxx_thread=yes
5829elif test "$ac_cv_kthread" = "yes"
5830then
5831 CXX="$CXX -Kthread"
5832 ac_cv_cxx_thread=yes
5833elif test "$ac_cv_pthread" = "yes"
5834then
5835 CXX="$CXX -pthread"
5836 ac_cv_cxx_thread=yes
5837fi
5838
5839if test $ac_cv_cxx_thread = yes
5840then
5841 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5842 $CXX -c conftest.$ac_ext 2>&5
5843 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5844 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5845 then
5846 ac_cv_cxx_thread=yes
5847 else
5848 ac_cv_cxx_thread=no
5849 fi
5850 rm -fr conftest*
5851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5853$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854fi
5855CXX="$ac_save_cxx"
5856
5857
5858# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5860$as_echo_n "checking for ANSI C header files... " >&6; }
5861if test "${ac_cv_header_stdc+set}" = set; then :
5862 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863else
Matthias Kloseb9621712010-04-24 17:59:49 +00005864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865/* end confdefs.h. */
5866#include <stdlib.h>
5867#include <stdarg.h>
5868#include <string.h>
5869#include <float.h>
5870
5871int
5872main ()
5873{
5874
5875 ;
5876 return 0;
5877}
5878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005879if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880 ac_cv_header_stdc=yes
5881else
Matthias Kloseb9621712010-04-24 17:59:49 +00005882 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5885
5886if test $ac_cv_header_stdc = yes; then
5887 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889/* end confdefs.h. */
5890#include <string.h>
5891
5892_ACEOF
5893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005894 $EGREP "memchr" >/dev/null 2>&1; then :
5895
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896else
5897 ac_cv_header_stdc=no
5898fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005899rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900
5901fi
5902
5903if test $ac_cv_header_stdc = yes; then
5904 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906/* end confdefs.h. */
5907#include <stdlib.h>
5908
5909_ACEOF
5910if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005911 $EGREP "free" >/dev/null 2>&1; then :
5912
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913else
5914 ac_cv_header_stdc=no
5915fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005916rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917
5918fi
5919
5920if test $ac_cv_header_stdc = yes; then
5921 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005922 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 :
5924else
Matthias Kloseb9621712010-04-24 17:59:49 +00005925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926/* end confdefs.h. */
5927#include <ctype.h>
5928#include <stdlib.h>
5929#if ((' ' & 0x0FF) == 0x020)
5930# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5931# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5932#else
5933# define ISLOWER(c) \
5934 (('a' <= (c) && (c) <= 'i') \
5935 || ('j' <= (c) && (c) <= 'r') \
5936 || ('s' <= (c) && (c) <= 'z'))
5937# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5938#endif
5939
5940#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5941int
5942main ()
5943{
5944 int i;
5945 for (i = 0; i < 256; i++)
5946 if (XOR (islower (i), ISLOWER (i))
5947 || toupper (i) != TOUPPER (i))
5948 return 2;
5949 return 0;
5950}
5951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005952if ac_fn_c_try_run "$LINENO"; then :
5953
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954else
Matthias Kloseb9621712010-04-24 17:59:49 +00005955 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005957rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5958 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959fi
5960
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961fi
5962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5964$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965if test $ac_cv_header_stdc = yes; then
5966
Matthias Kloseb9621712010-04-24 17:59:49 +00005967$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968
5969fi
5970
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005971for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5972fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005973ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005974shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005975unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005976sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5977sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005978sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005979sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005980sys/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 +00005981sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00005982bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005983do :
5984 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5985ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5986eval as_val=\$$as_ac_Header
5987 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00005988 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005989#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005990_ACEOF
5991
5992fi
5993
Guido van Rossum627b2d71993-12-24 10:39:16 +00005994done
5995
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005996ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005997for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00005998 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6000$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
6001if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
6002 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006003else
Matthias Kloseb9621712010-04-24 17:59:49 +00006004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006005/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006006#include <sys/types.h>
6007#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006008
Martin v. Löwis11437992002-04-12 09:54:03 +00006009int
6010main ()
6011{
6012if ((DIR *) 0)
6013return 0;
6014 ;
6015 return 0;
6016}
6017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006018if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006019 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006020else
Matthias Kloseb9621712010-04-24 17:59:49 +00006021 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006025eval ac_res=\$$as_ac_Header
6026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6027$as_echo "$ac_res" >&6; }
6028eval as_val=\$$as_ac_Header
6029 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006030 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006031#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006032_ACEOF
6033
6034ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006035fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006037done
6038# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6039if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6041$as_echo_n "checking for library containing opendir... " >&6; }
6042if test "${ac_cv_search_opendir+set}" = set; then :
6043 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006044else
Martin v. Löwis11437992002-04-12 09:54:03 +00006045 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006049/* Override any GCC internal prototype to avoid an error.
6050 Use char because int might match the return type of a GCC
6051 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006052#ifdef __cplusplus
6053extern "C"
6054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006055char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006056int
6057main ()
6058{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006059return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006060 ;
6061 return 0;
6062}
6063_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006064for ac_lib in '' dir; do
6065 if test -z "$ac_lib"; then
6066 ac_res="none required"
6067 else
6068 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006069 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006070 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006071 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006072 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006074rm -f core conftest.err conftest.$ac_objext \
6075 conftest$ac_exeext
6076 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006077 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006079done
Matthias Kloseb9621712010-04-24 17:59:49 +00006080if test "${ac_cv_search_opendir+set}" = set; then :
6081
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006082else
6083 ac_cv_search_opendir=no
6084fi
6085rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006086LIBS=$ac_func_search_save_LIBS
6087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6089$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006090ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006091if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006092 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006093
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006094fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006095
Michael W. Hudson54241132001-12-07 15:38:26 +00006096else
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6098$as_echo_n "checking for library containing opendir... " >&6; }
6099if test "${ac_cv_search_opendir+set}" = set; then :
6100 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006101else
6102 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006106/* Override any GCC internal prototype to avoid an error.
6107 Use char because int might match the return type of a GCC
6108 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006109#ifdef __cplusplus
6110extern "C"
6111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006112char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006113int
6114main ()
6115{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006116return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006117 ;
6118 return 0;
6119}
6120_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006121for ac_lib in '' x; do
6122 if test -z "$ac_lib"; then
6123 ac_res="none required"
6124 else
6125 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006126 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006127 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006128 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006129 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006131rm -f core conftest.err conftest.$ac_objext \
6132 conftest$ac_exeext
6133 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006134 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006136done
Matthias Kloseb9621712010-04-24 17:59:49 +00006137if test "${ac_cv_search_opendir+set}" = set; then :
6138
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006139else
6140 ac_cv_search_opendir=no
6141fi
6142rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006143LIBS=$ac_func_search_save_LIBS
6144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6146$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006147ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006148if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006149 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006150
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006151fi
6152
6153fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006154
Matthias Kloseb9621712010-04-24 17:59:49 +00006155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6156$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6157if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6158 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006159else
Matthias Kloseb9621712010-04-24 17:59:49 +00006160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006161/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006162#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163int
6164main ()
6165{
6166return makedev(0, 0);
6167 ;
6168 return 0;
6169}
6170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006171if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172 ac_cv_header_sys_types_h_makedev=yes
6173else
Matthias Kloseb9621712010-04-24 17:59:49 +00006174 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006176rm -f core conftest.err conftest.$ac_objext \
6177 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178
6179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6181$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182
6183if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006184ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6185if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006186
Matthias Kloseb9621712010-04-24 17:59:49 +00006187$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188
6189fi
6190
6191
6192
6193 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006194 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6195if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006196
Matthias Kloseb9621712010-04-24 17:59:49 +00006197$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198
6199fi
6200
6201
6202 fi
6203fi
6204
Michael W. Hudson54241132001-12-07 15:38:26 +00006205
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006206# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006207for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006208do :
6209 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006210#ifdef HAVE_CURSES_H
6211#include <curses.h>
6212#endif
6213
Matthias Kloseb9621712010-04-24 17:59:49 +00006214"
6215if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006216 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006217#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006218_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006219
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006220fi
6221
6222done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006223
6224
Martin v. Löwis11017b12006-01-14 18:12:57 +00006225# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006226for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006227do :
6228 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 +00006229#ifdef HAVE_ASM_TYPES_H
6230#include <asm/types.h>
6231#endif
6232#ifdef HAVE_SYS_SOCKET_H
6233#include <sys/socket.h>
6234#endif
6235
Matthias Kloseb9621712010-04-24 17:59:49 +00006236"
6237if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006238 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006239#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006240_ACEOF
6241
6242fi
6243
6244done
6245
6246
Guido van Rossum627b2d71993-12-24 10:39:16 +00006247# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006248was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6250$as_echo_n "checking for clock_t in time.h... " >&6; }
6251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006252/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006253#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006254
6255_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006256if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006257 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006258 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006259else
Martin v. Löwis11437992002-04-12 09:54:03 +00006260
6261
Matthias Kloseb9621712010-04-24 17:59:49 +00006262$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006263
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006264
Guido van Rossum627b2d71993-12-24 10:39:16 +00006265fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006266rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006267
Matthias Kloseb9621712010-04-24 17:59:49 +00006268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6269$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006270
Neal Norwitz11690112002-07-30 01:08:28 +00006271# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6273$as_echo_n "checking for makedev... " >&6; }
6274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006275/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006276
Jesus Cea740f53a2010-04-28 11:35:30 +00006277#if defined(MAJOR_IN_MKDEV)
6278#include <sys/mkdev.h>
6279#elif defined(MAJOR_IN_SYSMACROS)
6280#include <sys/sysmacros.h>
6281#else
6282#include <sys/types.h>
6283#endif
6284
Neal Norwitz11690112002-07-30 01:08:28 +00006285int
6286main ()
6287{
Jesus Cea740f53a2010-04-28 11:35:30 +00006288
6289 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006290 ;
6291 return 0;
6292}
Matthias Kloseb159a552010-04-25 21:00:44 +00006293
Neal Norwitz11690112002-07-30 01:08:28 +00006294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006295if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006296 ac_cv_has_makedev=yes
6297else
Matthias Kloseb9621712010-04-24 17:59:49 +00006298 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006300rm -f core conftest.err conftest.$ac_objext \
6301 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006302if test "$ac_cv_has_makedev" = "no"; then
6303 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006305/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006306
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006307#define _OSF_SOURCE 1
6308#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006309
Neal Norwitz11690112002-07-30 01:08:28 +00006310int
6311main ()
6312{
6313 makedev(0, 0)
6314 ;
6315 return 0;
6316}
6317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006318if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006319 ac_cv_has_makedev=yes
6320else
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006323rm -f core conftest.err conftest.$ac_objext \
6324 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006325 if test "$ac_cv_has_makedev" = "yes"; then
6326
Matthias Kloseb9621712010-04-24 17:59:49 +00006327$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006328
6329 fi
6330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6332$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006333if test "$ac_cv_has_makedev" = "yes"; then
6334
Matthias Kloseb9621712010-04-24 17:59:49 +00006335$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006336
6337fi
6338
Martin v. Löwis399a6892002-10-04 10:22:02 +00006339# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6340# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6341# defined, but the compiler does not support pragma redefine_extname,
6342# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6343# structures (such as rlimit64) without declaring them. As a
6344# work-around, disable LFS on such configurations
6345
6346use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6348$as_echo_n "checking Solaris LFS bug... " >&6; }
6349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006350/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006351
6352#define _LARGEFILE_SOURCE 1
6353#define _FILE_OFFSET_BITS 64
6354#include <sys/resource.h>
6355
Martin v. Löwis399a6892002-10-04 10:22:02 +00006356int
6357main ()
6358{
6359struct rlimit foo;
6360 ;
6361 return 0;
6362}
6363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006364if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006365 sol_lfs_bug=no
6366else
Matthias Kloseb9621712010-04-24 17:59:49 +00006367 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6371$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006372if test "$sol_lfs_bug" = "yes"; then
6373 use_lfs=no
6374fi
6375
6376if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006377# Two defines needed to enable largefile support on various platforms
6378# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006379
Matthias Kloseb9621712010-04-24 17:59:49 +00006380$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006381
6382
Matthias Kloseb9621712010-04-24 17:59:49 +00006383$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006384
Martin v. Löwis399a6892002-10-04 10:22:02 +00006385fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006386
Guido van Rossum84e7b241996-08-19 21:59:00 +00006387# Add some code to confdefs.h so that the test for off_t works on SCO
6388cat >> confdefs.h <<\EOF
6389#if defined(SCO_DS)
6390#undef _OFF_T
6391#endif
6392EOF
6393
Guido van Rossumef2255b2000-03-10 22:30:29 +00006394# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006395ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6396if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006397
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006398else
Martin v. Löwis11437992002-04-12 09:54:03 +00006399
6400cat >>confdefs.h <<_ACEOF
6401#define mode_t int
6402_ACEOF
6403
6404fi
6405
Matthias Kloseb9621712010-04-24 17:59:49 +00006406ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6407if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006408
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006409else
Martin v. Löwis11437992002-04-12 09:54:03 +00006410
6411cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006412#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006413_ACEOF
6414
6415fi
6416
Matthias Kloseb9621712010-04-24 17:59:49 +00006417ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6418if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006419
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006420else
Martin v. Löwis11437992002-04-12 09:54:03 +00006421
6422cat >>confdefs.h <<_ACEOF
6423#define pid_t int
6424_ACEOF
6425
6426fi
6427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006428
Martin v. Löwis11437992002-04-12 09:54:03 +00006429cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006430#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006431_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006432
Matthias Kloseb9621712010-04-24 17:59:49 +00006433ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6434if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006435
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006436else
Martin v. Löwis11437992002-04-12 09:54:03 +00006437
6438cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006439#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006440_ACEOF
6441
6442fi
6443
Matthias Kloseb9621712010-04-24 17:59:49 +00006444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6445$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6446if test "${ac_cv_type_uid_t+set}" = set; then :
6447 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006448else
Matthias Kloseb9621712010-04-24 17:59:49 +00006449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006450/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006451#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006452
6453_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006454if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006455 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006456 ac_cv_type_uid_t=yes
6457else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006458 ac_cv_type_uid_t=no
6459fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006460rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006461
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006462fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6464$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006465if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006466
Matthias Kloseb9621712010-04-24 17:59:49 +00006467$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006468
6469
Matthias Kloseb9621712010-04-24 17:59:49 +00006470$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006471
6472fi
6473
Matthias Kloseb9621712010-04-24 17:59:49 +00006474ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6475case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006476 no|yes) ;; #(
6477 *)
6478
Matthias Kloseb9621712010-04-24 17:59:49 +00006479$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006480
6481
6482cat >>confdefs.h <<_ACEOF
6483#define uint32_t $ac_cv_c_uint32_t
6484_ACEOF
6485;;
6486 esac
6487
Matthias Kloseb9621712010-04-24 17:59:49 +00006488ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6489case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006490 no|yes) ;; #(
6491 *)
6492
Matthias Kloseb9621712010-04-24 17:59:49 +00006493$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006494
6495
6496cat >>confdefs.h <<_ACEOF
6497#define uint64_t $ac_cv_c_uint64_t
6498_ACEOF
6499;;
6500 esac
6501
Matthias Kloseb9621712010-04-24 17:59:49 +00006502ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6503case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006504 no|yes) ;; #(
6505 *)
6506
6507cat >>confdefs.h <<_ACEOF
6508#define int32_t $ac_cv_c_int32_t
6509_ACEOF
6510;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006511esac
6512
Matthias Kloseb9621712010-04-24 17:59:49 +00006513ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6514case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006515 no|yes) ;; #(
6516 *)
6517
6518cat >>confdefs.h <<_ACEOF
6519#define int64_t $ac_cv_c_int64_t
6520_ACEOF
6521;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006522esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006523
Matthias Kloseb9621712010-04-24 17:59:49 +00006524ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6525if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006526
Matthias Kloseb9621712010-04-24 17:59:49 +00006527$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006528
6529fi
6530
Jack Jansendd19cf82001-12-06 22:36:17 +00006531
Michael W. Hudson54241132001-12-07 15:38:26 +00006532# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006533# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006534# The cast to long int works around a bug in the HP C Compiler
6535# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6536# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6537# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6539$as_echo_n "checking size of int... " >&6; }
6540if test "${ac_cv_sizeof_int+set}" = set; then :
6541 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006542else
Matthias Kloseb9621712010-04-24 17:59:49 +00006543 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 +00006544
Martin v. Löwis11437992002-04-12 09:54:03 +00006545else
Matthias Kloseb9621712010-04-24 17:59:49 +00006546 if test "$ac_cv_type_int" = yes; then
6547 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6548$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6549{ as_fn_set_status 77
6550as_fn_error "cannot compute sizeof (int)
6551See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006552 else
6553 ac_cv_sizeof_int=0
6554 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006556
Martin v. Löwis11437992002-04-12 09:54:03 +00006557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6559$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006560
6561
6562
Martin v. Löwis11437992002-04-12 09:54:03 +00006563cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006564#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006565_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006566
6567
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006568# The cast to long int works around a bug in the HP C Compiler
6569# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6570# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6571# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6573$as_echo_n "checking size of long... " >&6; }
6574if test "${ac_cv_sizeof_long+set}" = set; then :
6575 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006576else
Matthias Kloseb9621712010-04-24 17:59:49 +00006577 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 +00006578
Martin v. Löwis11437992002-04-12 09:54:03 +00006579else
Matthias Kloseb9621712010-04-24 17:59:49 +00006580 if test "$ac_cv_type_long" = yes; then
6581 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6582$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6583{ as_fn_set_status 77
6584as_fn_error "cannot compute sizeof (long)
6585See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006586 else
6587 ac_cv_sizeof_long=0
6588 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006590
Martin v. Löwis11437992002-04-12 09:54:03 +00006591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6593$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006594
6595
6596
Martin v. Löwis11437992002-04-12 09:54:03 +00006597cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006598#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006599_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006600
6601
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006602# The cast to long int works around a bug in the HP C Compiler
6603# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6604# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6605# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6607$as_echo_n "checking size of void *... " >&6; }
6608if test "${ac_cv_sizeof_void_p+set}" = set; then :
6609 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006610else
Matthias Kloseb9621712010-04-24 17:59:49 +00006611 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 +00006612
Martin v. Löwis11437992002-04-12 09:54:03 +00006613else
Matthias Kloseb9621712010-04-24 17:59:49 +00006614 if test "$ac_cv_type_void_p" = yes; then
6615 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6616$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6617{ as_fn_set_status 77
6618as_fn_error "cannot compute sizeof (void *)
6619See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006620 else
6621 ac_cv_sizeof_void_p=0
6622 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006624
Martin v. Löwis11437992002-04-12 09:54:03 +00006625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6627$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006628
6629
6630
Martin v. Löwis11437992002-04-12 09:54:03 +00006631cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006632#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006633_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006634
6635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006636# The cast to long int works around a bug in the HP C Compiler
6637# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6638# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6639# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6641$as_echo_n "checking size of short... " >&6; }
6642if test "${ac_cv_sizeof_short+set}" = set; then :
6643 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006644else
Matthias Kloseb9621712010-04-24 17:59:49 +00006645 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 +00006646
Martin v. Löwis11437992002-04-12 09:54:03 +00006647else
Matthias Kloseb9621712010-04-24 17:59:49 +00006648 if test "$ac_cv_type_short" = yes; then
6649 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6650$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6651{ as_fn_set_status 77
6652as_fn_error "cannot compute sizeof (short)
6653See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006654 else
6655 ac_cv_sizeof_short=0
6656 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006658
Martin v. Löwis11437992002-04-12 09:54:03 +00006659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6661$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006662
6663
6664
Martin v. Löwis11437992002-04-12 09:54:03 +00006665cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006666#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006667_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006668
6669
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006670# The cast to long int works around a bug in the HP C Compiler
6671# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6672# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6673# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6675$as_echo_n "checking size of float... " >&6; }
6676if test "${ac_cv_sizeof_float+set}" = set; then :
6677 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006678else
Matthias Kloseb9621712010-04-24 17:59:49 +00006679 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 +00006680
Martin v. Löwis11437992002-04-12 09:54:03 +00006681else
Matthias Kloseb9621712010-04-24 17:59:49 +00006682 if test "$ac_cv_type_float" = yes; then
6683 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6685{ as_fn_set_status 77
6686as_fn_error "cannot compute sizeof (float)
6687See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006688 else
6689 ac_cv_sizeof_float=0
6690 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006692
Martin v. Löwis11437992002-04-12 09:54:03 +00006693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6695$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006696
6697
6698
Martin v. Löwis11437992002-04-12 09:54:03 +00006699cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006700#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006701_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006702
6703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006704# The cast to long int works around a bug in the HP C Compiler
6705# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6706# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6707# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6709$as_echo_n "checking size of double... " >&6; }
6710if test "${ac_cv_sizeof_double+set}" = set; then :
6711 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006712else
Matthias Kloseb9621712010-04-24 17:59:49 +00006713 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 +00006714
Martin v. Löwis11437992002-04-12 09:54:03 +00006715else
Matthias Kloseb9621712010-04-24 17:59:49 +00006716 if test "$ac_cv_type_double" = yes; then
6717 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6718$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6719{ as_fn_set_status 77
6720as_fn_error "cannot compute sizeof (double)
6721See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006722 else
6723 ac_cv_sizeof_double=0
6724 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006726
Martin v. Löwis11437992002-04-12 09:54:03 +00006727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6729$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006730
6731
6732
Martin v. Löwis11437992002-04-12 09:54:03 +00006733cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006734#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006735_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006736
6737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006738# The cast to long int works around a bug in the HP C Compiler
6739# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6740# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6741# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6743$as_echo_n "checking size of fpos_t... " >&6; }
6744if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6745 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006746else
Matthias Kloseb9621712010-04-24 17:59:49 +00006747 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 +00006748
Martin v. Löwis11437992002-04-12 09:54:03 +00006749else
Matthias Kloseb9621712010-04-24 17:59:49 +00006750 if test "$ac_cv_type_fpos_t" = yes; then
6751 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6752$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6753{ as_fn_set_status 77
6754as_fn_error "cannot compute sizeof (fpos_t)
6755See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006756 else
6757 ac_cv_sizeof_fpos_t=0
6758 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006760
Martin v. Löwis11437992002-04-12 09:54:03 +00006761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6763$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006764
6765
6766
Martin v. Löwis11437992002-04-12 09:54:03 +00006767cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006768#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006769_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006770
Michael W. Hudson54241132001-12-07 15:38:26 +00006771
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006772# The cast to long int works around a bug in the HP C Compiler
6773# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6774# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6775# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6777$as_echo_n "checking size of size_t... " >&6; }
6778if test "${ac_cv_sizeof_size_t+set}" = set; then :
6779 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006780else
Matthias Kloseb9621712010-04-24 17:59:49 +00006781 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 +00006782
Martin v. Löwis18e16552006-02-15 17:27:45 +00006783else
Matthias Kloseb9621712010-04-24 17:59:49 +00006784 if test "$ac_cv_type_size_t" = yes; then
6785 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6786$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6787{ as_fn_set_status 77
6788as_fn_error "cannot compute sizeof (size_t)
6789See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006790 else
6791 ac_cv_sizeof_size_t=0
6792 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006794
Martin v. Löwis18e16552006-02-15 17:27:45 +00006795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6797$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006798
6799
6800
Martin v. Löwis18e16552006-02-15 17:27:45 +00006801cat >>confdefs.h <<_ACEOF
6802#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6803_ACEOF
6804
6805
Christian Heimes400adb02008-02-01 08:12:03 +00006806# The cast to long int works around a bug in the HP C Compiler
6807# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6808# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6809# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6811$as_echo_n "checking size of pid_t... " >&6; }
6812if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6813 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006814else
Matthias Kloseb9621712010-04-24 17:59:49 +00006815 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 +00006816
Christian Heimes400adb02008-02-01 08:12:03 +00006817else
Matthias Kloseb9621712010-04-24 17:59:49 +00006818 if test "$ac_cv_type_pid_t" = yes; then
6819 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6820$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6821{ as_fn_set_status 77
6822as_fn_error "cannot compute sizeof (pid_t)
6823See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006824 else
6825 ac_cv_sizeof_pid_t=0
6826 fi
6827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006828
Christian Heimes400adb02008-02-01 08:12:03 +00006829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6831$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006832
6833
6834
6835cat >>confdefs.h <<_ACEOF
6836#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6837_ACEOF
6838
6839
Michael W. Hudson54241132001-12-07 15:38:26 +00006840
Matthias Kloseb9621712010-04-24 17:59:49 +00006841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6842$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006843have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006845/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006846
Martin v. Löwis11437992002-04-12 09:54:03 +00006847int
6848main ()
6849{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006850long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006851 ;
6852 return 0;
6853}
6854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006855if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006856
6857
Matthias Kloseb9621712010-04-24 17:59:49 +00006858$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006859
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006860 have_long_long=yes
6861
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6865$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006866if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006867# The cast to long int works around a bug in the HP C Compiler
6868# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6869# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6870# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6872$as_echo_n "checking size of long long... " >&6; }
6873if test "${ac_cv_sizeof_long_long+set}" = set; then :
6874 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006875else
Matthias Kloseb9621712010-04-24 17:59:49 +00006876 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 +00006877
Martin v. Löwis11437992002-04-12 09:54:03 +00006878else
Matthias Kloseb9621712010-04-24 17:59:49 +00006879 if test "$ac_cv_type_long_long" = yes; then
6880 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6881$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6882{ as_fn_set_status 77
6883as_fn_error "cannot compute sizeof (long long)
6884See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006885 else
6886 ac_cv_sizeof_long_long=0
6887 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006889
Martin v. Löwis11437992002-04-12 09:54:03 +00006890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6892$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006893
6894
6895
Martin v. Löwis11437992002-04-12 09:54:03 +00006896cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006897#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006898_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006899
Michael W. Hudson54241132001-12-07 15:38:26 +00006900
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006901fi
6902
Matthias Kloseb9621712010-04-24 17:59:49 +00006903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6904$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006905have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006907/* end confdefs.h. */
6908
6909int
6910main ()
6911{
6912long double x; x = (long double)0;
6913 ;
6914 return 0;
6915}
6916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006917if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006918
6919
Matthias Kloseb9621712010-04-24 17:59:49 +00006920$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006921
6922 have_long_double=yes
6923
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006924fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6927$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006928if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006929# The cast to long int works around a bug in the HP C Compiler
6930# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6931# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6932# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6934$as_echo_n "checking size of long double... " >&6; }
6935if test "${ac_cv_sizeof_long_double+set}" = set; then :
6936 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006937else
Matthias Kloseb9621712010-04-24 17:59:49 +00006938 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 +00006939
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006940else
Matthias Kloseb9621712010-04-24 17:59:49 +00006941 if test "$ac_cv_type_long_double" = yes; then
6942 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6943$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6944{ as_fn_set_status 77
6945as_fn_error "cannot compute sizeof (long double)
6946See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006947 else
6948 ac_cv_sizeof_long_double=0
6949 fi
6950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006951
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6954$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006955
6956
6957
6958cat >>confdefs.h <<_ACEOF
6959#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6960_ACEOF
6961
6962
6963fi
6964
6965
Matthias Kloseb9621712010-04-24 17:59:49 +00006966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6967$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006968have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006970/* end confdefs.h. */
6971
6972int
6973main ()
6974{
6975_Bool x; x = (_Bool)0;
6976 ;
6977 return 0;
6978}
6979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006980if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00006981
6982
Matthias Kloseb9621712010-04-24 17:59:49 +00006983$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00006984
6985 have_c99_bool=yes
6986
Thomas Woutersb2137042007-02-01 18:02:27 +00006987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
6990$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006991if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006992# The cast to long int works around a bug in the HP C Compiler
6993# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6994# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6995# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
6997$as_echo_n "checking size of _Bool... " >&6; }
6998if test "${ac_cv_sizeof__Bool+set}" = set; then :
6999 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007000else
Matthias Kloseb9621712010-04-24 17:59:49 +00007001 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 +00007002
Thomas Woutersb2137042007-02-01 18:02:27 +00007003else
Matthias Kloseb9621712010-04-24 17:59:49 +00007004 if test "$ac_cv_type__Bool" = yes; then
7005 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7006$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7007{ as_fn_set_status 77
7008as_fn_error "cannot compute sizeof (_Bool)
7009See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007010 else
7011 ac_cv_sizeof__Bool=0
7012 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007014
Thomas Woutersb2137042007-02-01 18:02:27 +00007015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7017$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007018
7019
7020
Thomas Woutersb2137042007-02-01 18:02:27 +00007021cat >>confdefs.h <<_ACEOF
7022#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7023_ACEOF
7024
7025
7026fi
7027
Matthias Kloseb9621712010-04-24 17:59:49 +00007028ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007029 #include <stdint.h>
7030 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007031"
7032if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007033
7034cat >>confdefs.h <<_ACEOF
7035#define HAVE_UINTPTR_T 1
7036_ACEOF
7037
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007038# The cast to long int works around a bug in the HP C Compiler
7039# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7040# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7041# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7043$as_echo_n "checking size of uintptr_t... " >&6; }
7044if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7045 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007046else
Matthias Kloseb9621712010-04-24 17:59:49 +00007047 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 +00007048
Martin v. Löwis11437992002-04-12 09:54:03 +00007049else
Matthias Kloseb9621712010-04-24 17:59:49 +00007050 if test "$ac_cv_type_uintptr_t" = yes; then
7051 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7052$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7053{ as_fn_set_status 77
7054as_fn_error "cannot compute sizeof (uintptr_t)
7055See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007056 else
7057 ac_cv_sizeof_uintptr_t=0
7058 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007060
Martin v. Löwis11437992002-04-12 09:54:03 +00007061fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7063$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007064
7065
7066
Martin v. Löwis11437992002-04-12 09:54:03 +00007067cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007068#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007069_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007070
Michael W. Hudson54241132001-12-07 15:38:26 +00007071
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007072fi
7073
Thomas Wouters89f507f2006-12-13 04:49:30 +00007074
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007075# The cast to long int works around a bug in the HP C Compiler
7076# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7077# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7078# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7080$as_echo_n "checking size of off_t... " >&6; }
7081if test "${ac_cv_sizeof_off_t+set}" = set; then :
7082 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007083else
Matthias Kloseb9621712010-04-24 17:59:49 +00007084 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007085#ifdef HAVE_SYS_TYPES_H
7086#include <sys/types.h>
7087#endif
7088
Matthias Kloseb9621712010-04-24 17:59:49 +00007089"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007090
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007091else
Matthias Kloseb9621712010-04-24 17:59:49 +00007092 if test "$ac_cv_type_off_t" = yes; then
7093 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7094$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7095{ as_fn_set_status 77
7096as_fn_error "cannot compute sizeof (off_t)
7097See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007098 else
7099 ac_cv_sizeof_off_t=0
7100 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007102
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7105$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007106
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007107
7108
Martin v. Löwis11437992002-04-12 09:54:03 +00007109cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007110#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007111_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007112
Michael W. Hudson54241132001-12-07 15:38:26 +00007113
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007114
Matthias Kloseb9621712010-04-24 17:59:49 +00007115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7116$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007117if test "$have_long_long" = yes
7118then
7119if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007120 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007121
Matthias Kloseb9621712010-04-24 17:59:49 +00007122$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007123
Matthias Kloseb9621712010-04-24 17:59:49 +00007124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7125$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007126else
Matthias Kloseb9621712010-04-24 17:59:49 +00007127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7128$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007129fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007130else
Matthias Kloseb9621712010-04-24 17:59:49 +00007131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7132$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007133fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007134
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007135# The cast to long int works around a bug in the HP C Compiler
7136# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7137# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7138# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7140$as_echo_n "checking size of time_t... " >&6; }
7141if test "${ac_cv_sizeof_time_t+set}" = set; then :
7142 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007143else
Matthias Kloseb9621712010-04-24 17:59:49 +00007144 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007145#ifdef HAVE_SYS_TYPES_H
7146#include <sys/types.h>
7147#endif
7148#ifdef HAVE_TIME_H
7149#include <time.h>
7150#endif
7151
Matthias Kloseb9621712010-04-24 17:59:49 +00007152"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007153
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007154else
Matthias Kloseb9621712010-04-24 17:59:49 +00007155 if test "$ac_cv_type_time_t" = yes; then
7156 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7157$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7158{ as_fn_set_status 77
7159as_fn_error "cannot compute sizeof (time_t)
7160See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007161 else
7162 ac_cv_sizeof_time_t=0
7163 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007164fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007165
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7168$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007169
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007170
7171
Martin v. Löwis11437992002-04-12 09:54:03 +00007172cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007173#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007174_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007175
Michael W. Hudson54241132001-12-07 15:38:26 +00007176
7177
Trent Mick635f6fb2000-08-23 21:33:05 +00007178# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007179ac_save_cc="$CC"
7180if test "$ac_cv_kpthread" = "yes"
7181then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007182elif test "$ac_cv_kthread" = "yes"
7183then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007184elif test "$ac_cv_pthread" = "yes"
7185then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007186fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007187
Matthias Kloseb9621712010-04-24 17:59:49 +00007188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7189$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007190have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007192/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007193
7194 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007195int
7196main ()
7197{
Guido van Rossum12580492000-09-24 16:47:19 +00007198pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007199 ;
7200 return 0;
7201}
Matthias Kloseb159a552010-04-25 21:00:44 +00007202
Martin v. Löwis11437992002-04-12 09:54:03 +00007203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007204if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007205 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7209$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007210if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007211 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007212# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7213# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7214# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7216$as_echo_n "checking size of pthread_t... " >&6; }
7217if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7218 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007219else
Matthias Kloseb9621712010-04-24 17:59:49 +00007220 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007221#ifdef HAVE_PTHREAD_H
7222#include <pthread.h>
7223#endif
7224
Matthias Kloseb9621712010-04-24 17:59:49 +00007225"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007226
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007227else
Matthias Kloseb9621712010-04-24 17:59:49 +00007228 if test "$ac_cv_type_pthread_t" = yes; then
7229 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7230$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7231{ as_fn_set_status 77
7232as_fn_error "cannot compute sizeof (pthread_t)
7233See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007234 else
7235 ac_cv_sizeof_pthread_t=0
7236 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007238
Trent Mick635f6fb2000-08-23 21:33:05 +00007239fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7241$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007242
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007243
7244
Martin v. Löwis11437992002-04-12 09:54:03 +00007245cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007246#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007247_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007248
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007249
Trent Mick635f6fb2000-08-23 21:33:05 +00007250fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007251CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007252
Michael W. Hudson54241132001-12-07 15:38:26 +00007253
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007254case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007255 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007256 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7257 ;;
7258 Darwin/*)
7259 OTHER_LIBTOOL_OPT=""
7260 ;;
7261esac
7262
7263
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007264ARCH_RUN_32BIT=""
7265
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007266case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007267 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007268 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7269 if test "${enable_universalsdk}"; then
7270 :
7271 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007272 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007273 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007274 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007275 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007276 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007277 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007278 if test ${gcc_version} '<' 4.0
7279 then
7280 LIBTOOL_CRUFT="-lcc_dynamic"
7281 else
7282 LIBTOOL_CRUFT=""
7283 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007284 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007285 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007286else
Matthias Kloseb9621712010-04-24 17:59:49 +00007287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007288/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007289
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007290 #include <unistd.h>
7291 int main(int argc, char*argv[])
7292 {
7293 if (sizeof(long) == 4) {
7294 return 0;
7295 } else {
7296 return 1;
7297 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007298 }
7299
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007301if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007302 ac_osx_32bit=yes
7303else
Matthias Kloseb9621712010-04-24 17:59:49 +00007304 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007306rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7307 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007308fi
7309
7310
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007311 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007312 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007313 i386)
7314 MACOSX_DEFAULT_ARCH="i386"
7315 ;;
7316 ppc)
7317 MACOSX_DEFAULT_ARCH="ppc"
7318 ;;
7319 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007320 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007321 ;;
7322 esac
7323 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007324 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007325 i386)
7326 MACOSX_DEFAULT_ARCH="x86_64"
7327 ;;
7328 ppc)
7329 MACOSX_DEFAULT_ARCH="ppc64"
7330 ;;
7331 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007332 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007333 ;;
7334 esac
7335
7336 #ARCH_RUN_32BIT="true"
7337 fi
7338
7339 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007340 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007341 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007342esac
7343
Matthias Kloseb9621712010-04-24 17:59:49 +00007344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7345$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007346if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007347then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007348 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007349 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007350 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007351
Matthias Kloseb9621712010-04-24 17:59:49 +00007352$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007353
Matthias Kloseb9621712010-04-24 17:59:49 +00007354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7355$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007356 if test $enable_shared = "yes"
7357 then
Matthias Kloseb9621712010-04-24 17:59:49 +00007358 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 +00007359 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007360else
Matthias Kloseb9621712010-04-24 17:59:49 +00007361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7362$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007363fi
7364
Matthias Kloseb9621712010-04-24 17:59:49 +00007365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7366$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007367case $ac_sys_system/$ac_sys_release in
7368 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007369
Matthias Kloseb9621712010-04-24 17:59:49 +00007370$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007371
Matthias Kloseb9621712010-04-24 17:59:49 +00007372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7373$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007374 ;;
7375 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7377$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007378 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007379esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007380
Guido van Rossum0a516c91994-09-12 10:58:40 +00007381# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007382
Michael W. Hudson54241132001-12-07 15:38:26 +00007383
7384
7385
7386
Benjamin Peterson99f03762010-04-11 22:15:28 +00007387
Guido van Rossum0a516c91994-09-12 10:58:40 +00007388# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007389# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Kloseb9621712010-04-24 17:59:49 +00007390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7391$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007392if test -z "$SO"
7393then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007394 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +00007395 hp*|HP*)
7396 case `uname -m` in
7397 ia64) SO=.so;;
7398 *) SO=.sl;;
7399 esac
7400 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007401 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007402 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007403 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007404else
7405 # this might also be a termcap variable, see #610332
7406 echo
7407 echo '====================================================================='
7408 echo '+ +'
7409 echo '+ WARNING: You have set SO in your environment. +'
7410 echo '+ Do you really mean to change the extension for shared libraries? +'
7411 echo '+ Continuing in 10 seconds to let you to ponder. +'
7412 echo '+ +'
7413 echo '====================================================================='
7414 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7417$as_echo "$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00007418
Georg Brandlb1441c72009-01-03 22:33:39 +00007419
Thomas Wouters477c8d52006-05-27 19:21:47 +00007420cat >>confdefs.h <<_ACEOF
7421#define SHLIB_EXT "$SO"
7422_ACEOF
7423
Guido van Rossum0a516c91994-09-12 10:58:40 +00007424# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007425# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007426# (Shared libraries in this instance are shared modules to be loaded into
7427# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7429$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007430if test -z "$LDSHARED"
7431then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007432 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007433 AIX*)
7434 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007435 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007436 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007437 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007438 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007439 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007440 if test "$GCC" = "yes" ; then
7441 LDSHARED='$(CC) -shared'
7442 LDCXXSHARED='$(CXX) -shared'
7443 else
7444 LDSHARED='$(CC) -G'
7445 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007446 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007447 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007448 if test "$GCC" = "yes" ; then
7449 LDSHARED='$(CC) -shared'
7450 LDCXXSHARED='$(CXX) -shared'
7451 else
7452 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007453 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007454 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007455 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00007456 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007457 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007458 if test "$enable_framework" ; then
7459 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007460 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7461 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007462 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007463 else
7464 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007465 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007466 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007467 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007468 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00007469 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007470 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007471 if test "$enable_framework" ; then
7472 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007473 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7474 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007475 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007476 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007477 # No framework, use the Python app as bundle-loader
7478 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007479 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007480 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007481 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007482 Darwin/*)
7483 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7484 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007485
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007486 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007487 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007488 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007489 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007490 fi
Jack Jansen6b08a402004-06-03 12:41:45 +00007491 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007492 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007493 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007494 else
7495 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007496 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +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 Jansen6b08a402004-06-03 12:41:45 +00007502 else
7503 # No framework, use the Python app as bundle-loader
7504 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7505 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007506 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007507 fi
7508 fi
7509 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007510 Linux*|GNU*|QNX*)
7511 LDSHARED='$(CC) -shared'
7512 LDCXXSHARED='$(CXX) -shared';;
7513 BSD/OS*/4*)
7514 LDSHARED="gcc -shared"
7515 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007516 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007517 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007518 then
Benjamin Petersonab0a7522010-03-14 15:18:25 +00007519 LDSHARED='$(CC) -shared ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007520 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007521 else
7522 LDSHARED="ld -Bshareable ${LDFLAGS}"
7523 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007524 OpenBSD*)
7525 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7526 then
7527 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007528 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007529 else
7530 case `uname -r` in
7531 [01].* | 2.[0-7] | 2.[0-7].*)
7532 LDSHARED="ld -Bshareable ${LDFLAGS}"
7533 ;;
7534 *)
7535 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007536 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007537 ;;
7538 esac
7539 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007540 NetBSD*|DragonFly*)
7541 LDSHARED="cc -shared ${LDFLAGS}"
7542 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007543 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007544 if test "$GCC" = "yes" ; then
7545 LDSHARED='$(CC) -shared'
7546 LDCXXSHARED='$(CXX) -shared'
7547 else
7548 LDSHARED='$(CC) -G'
7549 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007550 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007551 SCO_SV*)
7552 LDSHARED='$(CC) -Wl,-G,-Bexport'
7553 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7554 CYGWIN*)
7555 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7556 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007557 *) LDSHARED="ld";;
7558 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7561$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007562LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007563BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007564# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007565# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7567$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007568if test -z "$CCSHARED"
7569then
Guido van Rossum07397971997-04-29 21:49:50 +00007570 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007571 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007572 then CCSHARED="-fPIC";
7573 elif test `uname -p` = sparc;
7574 then CCSHARED="-xcode=pic32";
7575 else CCSHARED="-Kpic";
7576 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007577 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007578 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007579 else CCSHARED="+z";
7580 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007581 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007582 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007583 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007584 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007585 if test "$GCC" = "yes"
7586 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007587 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007588 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007589 SCO_SV*)
7590 if test "$GCC" = "yes"
7591 then CCSHARED="-fPIC"
7592 else CCSHARED="-Kpic -belf"
7593 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007594 IRIX*/6*) case $CC in
7595 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007596 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007597 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007598 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7601$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007602# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007603# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7605$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007606if test -z "$LINKFORSHARED"
7607then
Guido van Rossum07397971997-04-29 21:49:50 +00007608 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007609 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007610 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007611 LINKFORSHARED="-Wl,-E -Wl,+s";;
7612# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007613 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007614 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007615 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007616 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007617 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007618 if test "$enable_framework"
7619 then
Jack Jansenda49e192005-01-07 13:08:22 +00007620 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007621 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007622 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007623 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007624 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007625 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007626 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007627 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7628 then
7629 LINKFORSHARED="-Wl,--export-dynamic"
7630 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007631 SunOS/5*) case $CC in
7632 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007633 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007634 then
7635 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007636 fi;;
7637 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007638 CYGWIN*)
7639 if test $enable_shared = "no"
7640 then
7641 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7642 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007643 QNX*)
7644 # -Wl,-E causes the symbols to be added to the dynamic
7645 # symbol table so that they can be found when a module
7646 # is loaded. -N 2048K causes the stack size to be set
7647 # to 2048 kilobytes so that the stack doesn't overflow
7648 # when running test_compile.py.
7649 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007650 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7653$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007654
Michael W. Hudson54241132001-12-07 15:38:26 +00007655
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007656
Matthias Kloseb9621712010-04-24 17:59:49 +00007657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7658$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007659if test ! "$LIBRARY" = "$LDLIBRARY"
7660then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007661 case $ac_sys_system in
7662 CYGWIN*)
7663 # Cygwin needs CCSHARED when building extension DLLs
7664 # but not when building the interpreter DLL.
7665 CFLAGSFORSHARED='';;
7666 *)
7667 CFLAGSFORSHARED='$(CCSHARED)'
7668 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7671$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007672
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007673# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7674# library (with --enable-shared).
7675# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007676# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7677# if it is not required, since it creates a dependency of the shared library
7678# to LIBS. This, in turn, means that applications linking the shared libpython
7679# don't need to link LIBS explicitly. The default should be only changed
7680# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007681
Matthias Kloseb9621712010-04-24 17:59:49 +00007682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7683$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007684case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007685 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007686 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007687esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7689$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007690
7691
Guido van Rossum627b2d71993-12-24 10:39:16 +00007692# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7694$as_echo_n "checking for dlopen in -ldl... " >&6; }
7695if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7696 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007697else
Martin v. Löwis11437992002-04-12 09:54:03 +00007698 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007699LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703/* Override any GCC internal prototype to avoid an error.
7704 Use char because int might match the return type of a GCC
7705 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007706#ifdef __cplusplus
7707extern "C"
7708#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007709char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007710int
7711main ()
7712{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007713return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007714 ;
7715 return 0;
7716}
7717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007718if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007719 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007720else
Matthias Kloseb9621712010-04-24 17:59:49 +00007721 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007723rm -f core conftest.err conftest.$ac_objext \
7724 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007725LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7728$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7729if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007730 cat >>confdefs.h <<_ACEOF
7731#define HAVE_LIBDL 1
7732_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007733
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007734 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007735
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007736fi
7737 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7739$as_echo_n "checking for shl_load in -ldld... " >&6; }
7740if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7741 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007742else
Martin v. Löwis11437992002-04-12 09:54:03 +00007743 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007744LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748/* Override any GCC internal prototype to avoid an error.
7749 Use char because int might match the return type of a GCC
7750 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007751#ifdef __cplusplus
7752extern "C"
7753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007754char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007755int
7756main ()
7757{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007758return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007759 ;
7760 return 0;
7761}
7762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007763if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007764 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007765else
Matthias Kloseb9621712010-04-24 17:59:49 +00007766 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007768rm -f core conftest.err conftest.$ac_objext \
7769 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007770LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7773$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7774if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007775 cat >>confdefs.h <<_ACEOF
7776#define HAVE_LIBDLD 1
7777_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007778
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007779 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007780
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007781fi
7782 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007783
Georg Brandlb1441c72009-01-03 22:33:39 +00007784# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007785if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7787$as_echo_n "checking for library containing sem_init... " >&6; }
7788if test "${ac_cv_search_sem_init+set}" = set; then :
7789 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007790else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007791 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007793/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795/* Override any GCC internal prototype to avoid an error.
7796 Use char because int might match the return type of a GCC
7797 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007798#ifdef __cplusplus
7799extern "C"
7800#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007801char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007802int
7803main ()
7804{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007806 ;
7807 return 0;
7808}
7809_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810for ac_lib in '' pthread rt posix4; do
7811 if test -z "$ac_lib"; then
7812 ac_res="none required"
7813 else
7814 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007815 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007816 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007817 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007820rm -f core conftest.err conftest.$ac_objext \
7821 conftest$ac_exeext
7822 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825done
Matthias Kloseb9621712010-04-24 17:59:49 +00007826if test "${ac_cv_search_sem_init+set}" = set; then :
7827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828else
7829 ac_cv_search_sem_init=no
7830fi
7831rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007832LIBS=$ac_func_search_save_LIBS
7833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7835$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007836ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007837if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007839
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007840fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007841 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007842 # posix4 on Solaris 2.6
7843 # pthread (first!) on Linux
7844fi
7845
Martin v. Löwis19d17342003-06-14 21:03:05 +00007846# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7848$as_echo_n "checking for textdomain in -lintl... " >&6; }
7849if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7850 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007851else
7852 ac_check_lib_save_LIBS=$LIBS
7853LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007855/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007857/* Override any GCC internal prototype to avoid an error.
7858 Use char because int might match the return type of a GCC
7859 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007860#ifdef __cplusplus
7861extern "C"
7862#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007863char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007864int
7865main ()
7866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007868 ;
7869 return 0;
7870}
7871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007872if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007873 ac_cv_lib_intl_textdomain=yes
7874else
Matthias Kloseb9621712010-04-24 17:59:49 +00007875 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007877rm -f core conftest.err conftest.$ac_objext \
7878 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007879LIBS=$ac_check_lib_save_LIBS
7880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7882$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7883if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007884
Matthias Kloseb9621712010-04-24 17:59:49 +00007885$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007886
Brett Cannonc6d936e2009-06-07 20:09:53 +00007887 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007888fi
7889
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007890
7891# checks for system dependent C++ extensions support
7892case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007893 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7894$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007896/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007897
7898 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007899int
7900main ()
7901{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007902loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007903 ;
7904 return 0;
7905}
Matthias Kloseb159a552010-04-25 21:00:44 +00007906
Martin v. Löwis11437992002-04-12 09:54:03 +00007907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007908if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007909
Matthias Kloseb159a552010-04-25 21:00:44 +00007910
Matthias Kloseb9621712010-04-24 17:59:49 +00007911$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007912
Matthias Kloseb159a552010-04-25 21:00:44 +00007913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007914$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007915
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007916else
Matthias Kloseb159a552010-04-25 21:00:44 +00007917
7918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007919$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007920
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007922rm -f core conftest.err conftest.$ac_objext \
7923 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007924 *) ;;
7925esac
7926
Guido van Rossum70c7f481998-03-26 18:44:10 +00007927# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7929$as_echo_n "checking for t_open in -lnsl... " >&6; }
7930if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7931 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007932else
Martin v. Löwis11437992002-04-12 09:54:03 +00007933 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007934LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007938/* Override any GCC internal prototype to avoid an error.
7939 Use char because int might match the return type of a GCC
7940 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007941#ifdef __cplusplus
7942extern "C"
7943#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007944char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007945int
7946main ()
7947{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007949 ;
7950 return 0;
7951}
7952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007953if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007954 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007955else
Matthias Kloseb9621712010-04-24 17:59:49 +00007956 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007957fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007958rm -f core conftest.err conftest.$ac_objext \
7959 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007960LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7963$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
7964if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007965 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007966fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007967 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7969$as_echo_n "checking for socket in -lsocket... " >&6; }
7970if test "${ac_cv_lib_socket_socket+set}" = set; then :
7971 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007972else
Martin v. Löwis11437992002-04-12 09:54:03 +00007973 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007974LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007977
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007978/* Override any GCC internal prototype to avoid an error.
7979 Use char because int might match the return type of a GCC
7980 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007981#ifdef __cplusplus
7982extern "C"
7983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007984char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007985int
7986main ()
7987{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007989 ;
7990 return 0;
7991}
7992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007993if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007994 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007995else
Matthias Kloseb9621712010-04-24 17:59:49 +00007996 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007998rm -f core conftest.err conftest.$ac_objext \
7999 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008000LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8003$as_echo "$ac_cv_lib_socket_socket" >&6; }
8004if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008005 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008006fi
8007 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008008
Matthias Kloseb9621712010-04-24 17:59:49 +00008009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8010$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008011
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008012# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008013if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8016$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008017LIBS="$withval $LIBS"
8018
8019else
Matthias Kloseb9621712010-04-24 17:59:49 +00008020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8021$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008022fi
8023
Guido van Rossum7f43da71994-08-01 12:15:30 +00008024
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008025if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008026 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8027set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8029$as_echo_n "checking for $ac_word... " >&6; }
8030if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8031 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008032else
8033 case $PKG_CONFIG in
8034 [\\/]* | ?:[\\/]*)
8035 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8036 ;;
8037 *)
8038 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8039for as_dir in $PATH
8040do
8041 IFS=$as_save_IFS
8042 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008043 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008044 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8045 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008047 break 2
8048 fi
8049done
Matthias Kloseb9621712010-04-24 17:59:49 +00008050 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008051IFS=$as_save_IFS
8052
8053 ;;
8054esac
8055fi
8056PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8057if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8059$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008060else
Matthias Kloseb9621712010-04-24 17:59:49 +00008061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8062$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008063fi
8064
8065
8066fi
8067if test -z "$ac_cv_path_PKG_CONFIG"; then
8068 ac_pt_PKG_CONFIG=$PKG_CONFIG
8069 # Extract the first word of "pkg-config", so it can be a program name with args.
8070set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8072$as_echo_n "checking for $ac_word... " >&6; }
8073if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8074 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008075else
8076 case $ac_pt_PKG_CONFIG in
8077 [\\/]* | ?:[\\/]*)
8078 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8079 ;;
8080 *)
8081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8082for as_dir in $PATH
8083do
8084 IFS=$as_save_IFS
8085 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008087 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8088 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008090 break 2
8091 fi
8092done
Matthias Kloseb9621712010-04-24 17:59:49 +00008093 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008094IFS=$as_save_IFS
8095
8096 ;;
8097esac
8098fi
8099ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8100if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8102$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008103else
Matthias Kloseb9621712010-04-24 17:59:49 +00008104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8105$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008106fi
8107
8108 if test "x$ac_pt_PKG_CONFIG" = x; then
8109 PKG_CONFIG=""
8110 else
8111 case $cross_compiling:$ac_tool_warned in
8112yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008113{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8114$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008115ac_tool_warned=yes ;;
8116esac
8117 PKG_CONFIG=$ac_pt_PKG_CONFIG
8118 fi
8119else
8120 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8121fi
8122
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008123
8124# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8126$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008127
8128# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008129if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008130 withval=$with_system_expat;
8131fi
8132
8133
Matthias Kloseb9621712010-04-24 17:59:49 +00008134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8135$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008136
8137# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8139$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008140
8141# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008142if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008143 withval=$with_system_ffi;
8144fi
8145
8146
8147if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008148 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8149else
8150 LIBFFI_INCLUDEDIR=""
8151fi
8152
8153
Matthias Kloseb9621712010-04-24 17:59:49 +00008154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8155$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008156
Matthias Klose55708cc2009-04-30 08:06:49 +00008157# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8159$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008160
8161# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008162if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008163 withval=$with_dbmliborder;
8164if test x$with_dbmliborder = xyes
8165then
Matthias Kloseb9621712010-04-24 17:59:49 +00008166as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008167else
8168 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8169 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8170 then
Matthias Kloseb9621712010-04-24 17:59:49 +00008171 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008172 fi
8173 done
8174fi
8175fi
8176
Matthias Kloseb9621712010-04-24 17:59:49 +00008177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8178$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008179
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008180# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008181
8182
Matthias Kloseb9621712010-04-24 17:59:49 +00008183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8184$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008185
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008186# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008187if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008188 withval=$with_signal_module;
8189fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008190
8191
8192if test -z "$with_signal_module"
8193then with_signal_module="yes"
8194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8196$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008197
8198if test "${with_signal_module}" = "yes"; then
8199 USE_SIGNAL_MODULE=""
8200 SIGNAL_OBJS=""
8201else
8202 USE_SIGNAL_MODULE="#"
8203 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8204fi
8205
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008206# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008207
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008208USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008209
Matthias Kloseb9621712010-04-24 17:59:49 +00008210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8211$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008212
Guido van Rossumec2f0731997-01-22 20:54:01 +00008213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008214# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008215if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008216 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8218$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008219LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008220if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008221 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008222fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008223else
Matthias Kloseb9621712010-04-24 17:59:49 +00008224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8225$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008226fi
8227
Martin v. Löwis11437992002-04-12 09:54:03 +00008228
8229# Templates for things AC_DEFINEd more than once.
8230# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008231
8232
Martin v. Löwis11437992002-04-12 09:54:03 +00008233
8234
Matthias Kloseb9621712010-04-24 17:59:49 +00008235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8236$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008237
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008239if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008240 withval=$with_threads;
8241fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008242
8243
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008244# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008245
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008246# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008247if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008248 withval=$with_thread; with_threads=$with_thread
8249fi
8250
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008251
8252if test -z "$with_threads"
8253then with_threads="yes"
8254fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8256$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008257
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008258
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008259if test "$with_threads" = "no"
8260then
8261 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008262elif test "$ac_cv_pthread_is_default" = yes
8263then
Matthias Kloseb9621712010-04-24 17:59:49 +00008264 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008265
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008266 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008267 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008268
8269 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008270 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008271elif test "$ac_cv_kpthread" = "yes"
8272then
8273 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008274 if test "$ac_cv_cxx_thread" = "yes"; then
8275 CXX="$CXX -Kpthread"
8276 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008278
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008279 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008280 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008281elif test "$ac_cv_kthread" = "yes"
8282then
8283 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008284 if test "$ac_cv_cxx_thread" = "yes"; then
8285 CXX="$CXX -Kthread"
8286 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008287 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008288
8289 posix_threads=yes
8290 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008291elif test "$ac_cv_pthread" = "yes"
8292then
8293 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008294 if test "$ac_cv_cxx_thread" = "yes"; then
8295 CXX="$CXX -pthread"
8296 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008297 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008298
8299 posix_threads=yes
8300 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008301else
8302 if test ! -z "$with_threads" -a -d "$with_threads"
8303 then LDFLAGS="$LDFLAGS -L$with_threads"
8304 fi
8305 if test ! -z "$withval" -a -d "$withval"
8306 then LDFLAGS="$LDFLAGS -L$withval"
8307 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008308
8309 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008310 # define _POSIX_THREADS in unistd.h. Some apparently don't
8311 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8313$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008315/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008316
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008317#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008318#ifdef _POSIX_THREADS
8319yes
8320#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008321
8322_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008323if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008324 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008325 unistd_defines_pthreads=yes
8326else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008327 unistd_defines_pthreads=no
8328fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008329rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008330
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8332$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008333
Matthias Kloseb9621712010-04-24 17:59:49 +00008334 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008335
Matthias Kloseb9621712010-04-24 17:59:49 +00008336 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8337if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8338 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008339
Matthias Kloseb9621712010-04-24 17:59:49 +00008340 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008341
Martin v. Löwis11437992002-04-12 09:54:03 +00008342
Matthias Kloseb9621712010-04-24 17:59:49 +00008343$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008344
8345 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008346 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008347else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008348
Matthias Kloseb9621712010-04-24 17:59:49 +00008349 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8350if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8351 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008352
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008354
Martin v. Löwis11437992002-04-12 09:54:03 +00008355
Matthias Kloseb9621712010-04-24 17:59:49 +00008356$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008357
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008358 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008359else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008360
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008361 # Just looking for pthread_create in libpthread is not enough:
8362 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8363 # So we really have to include pthread.h, and then link.
8364 _libs=$LIBS
8365 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8367$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008369/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008370#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008371
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008372void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008373int
8374main ()
8375{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008376
8377pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008378 ;
8379 return 0;
8380}
8381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008382if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008383
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8385$as_echo "yes" >&6; }
8386 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008387
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008388 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008389 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008390else
Martin v. Löwis11437992002-04-12 09:54:03 +00008391
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008392 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8394if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8395 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008396
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008397 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008398 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008399else
Guido van Rossumad678af1998-10-02 14:42:15 +00008400
Matthias Kloseb9621712010-04-24 17:59:49 +00008401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8402$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8403if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8404 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008405else
Martin v. Löwis11437992002-04-12 09:54:03 +00008406 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008407LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008410
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008411/* Override any GCC internal prototype to avoid an error.
8412 Use char because int might match the return type of a GCC
8413 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008414#ifdef __cplusplus
8415extern "C"
8416#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008417char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008418int
8419main ()
8420{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008421return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008422 ;
8423 return 0;
8424}
8425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008426if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008427 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008428else
Matthias Kloseb9621712010-04-24 17:59:49 +00008429 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008431rm -f core conftest.err conftest.$ac_objext \
8432 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008433LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8436$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8437if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8438 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008439
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008440 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008441 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008442 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008443else
Greg Steinadf63d62000-07-05 10:38:09 +00008444
Matthias Kloseb9621712010-04-24 17:59:49 +00008445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8446$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8447if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8448 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008449else
Martin v. Löwis11437992002-04-12 09:54:03 +00008450 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008451LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008455/* Override any GCC internal prototype to avoid an error.
8456 Use char because int might match the return type of a GCC
8457 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008458#ifdef __cplusplus
8459extern "C"
8460#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008461char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008462int
8463main ()
8464{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008465return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008466 ;
8467 return 0;
8468}
8469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008470if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008471 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008472else
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008474fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008475rm -f core conftest.err conftest.$ac_objext \
8476 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008477LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8480$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8481if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8482 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008483
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008484 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008485 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008486 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008487else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008488
Matthias Kloseb9621712010-04-24 17:59:49 +00008489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8490$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8491if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8492 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008493else
Martin v. Löwis11437992002-04-12 09:54:03 +00008494 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008495LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008498
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008499/* Override any GCC internal prototype to avoid an error.
8500 Use char because int might match the return type of a GCC
8501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008502#ifdef __cplusplus
8503extern "C"
8504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008505char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008506int
8507main ()
8508{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008510 ;
8511 return 0;
8512}
8513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008514if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008515 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008516else
Matthias Kloseb9621712010-04-24 17:59:49 +00008517 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008519rm -f core conftest.err conftest.$ac_objext \
8520 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008521LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8524$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8525if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8526 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008527
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008528 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008529 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008530 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008531else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008532
Matthias Kloseb9621712010-04-24 17:59:49 +00008533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8534$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8535if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8536 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008537else
Martin v. Löwis11437992002-04-12 09:54:03 +00008538 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008539LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008543/* Override any GCC internal prototype to avoid an error.
8544 Use char because int might match the return type of a GCC
8545 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008546#ifdef __cplusplus
8547extern "C"
8548#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008549char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008550int
8551main ()
8552{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008553return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 ;
8555 return 0;
8556}
8557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008558if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008560else
Matthias Kloseb9621712010-04-24 17:59:49 +00008561 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008563rm -f core conftest.err conftest.$ac_objext \
8564 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008565LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8568$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8569if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8570 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008571
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008572 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008573 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008574 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008575else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008576
Martin v. Löwis130fb172001-07-19 11:00:41 +00008577 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008578fi
8579
Guido van Rossum627b2d71993-12-24 10:39:16 +00008580
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008581fi
8582
Guido van Rossum0be3e491997-05-22 20:33:33 +00008583fi
8584
Guido van Rossum49545951997-12-02 19:28:29 +00008585fi
8586
Guido van Rossumb93a8621998-05-07 13:27:32 +00008587fi
8588
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008590rm -f core conftest.err conftest.$ac_objext \
8591 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008592fi
8593
Martin v. Löwis11437992002-04-12 09:54:03 +00008594
8595fi
8596
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008597
Michael W. Hudson54241132001-12-07 15:38:26 +00008598
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8600$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8601if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8602 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008603else
Martin v. Löwis11437992002-04-12 09:54:03 +00008604 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008605LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008607/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008609/* Override any GCC internal prototype to avoid an error.
8610 Use char because int might match the return type of a GCC
8611 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008612#ifdef __cplusplus
8613extern "C"
8614#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008615char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008616int
8617main ()
8618{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008619return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008620 ;
8621 return 0;
8622}
8623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008624if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008625 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008626else
Matthias Kloseb9621712010-04-24 17:59:49 +00008627 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008629rm -f core conftest.err conftest.$ac_objext \
8630 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008631LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8634$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8635if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8636 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008637
Martin v. Löwis130fb172001-07-19 11:00:41 +00008638 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008639 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008640 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008641fi
8642
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008643
Neal Norwitza978ab02002-11-02 16:58:05 +00008644 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8646$as_echo_n "checking for thr_create in -lthread... " >&6; }
8647if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8648 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008649else
Martin v. Löwis11437992002-04-12 09:54:03 +00008650 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008651LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008653/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655/* Override any GCC internal prototype to avoid an error.
8656 Use char because int might match the return type of a GCC
8657 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008658#ifdef __cplusplus
8659extern "C"
8660#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008661char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008662int
8663main ()
8664{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008665return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008666 ;
8667 return 0;
8668}
8669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008670if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008672else
Matthias Kloseb9621712010-04-24 17:59:49 +00008673 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008675rm -f core conftest.err conftest.$ac_objext \
8676 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008677LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8680$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8681if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8682 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008683
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008684 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008685 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008686 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008687fi
8688
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008689 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008690
Martin v. Löwis130fb172001-07-19 11:00:41 +00008691 if test "$USE_THREAD_MODULE" != "#"
8692 then
8693 # If the above checks didn't disable threads, (at least) OSF1
8694 # needs this '-threads' argument during linking.
8695 case $ac_sys_system in
8696 OSF1) LDLAST=-threads;;
8697 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008698 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008699fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008700
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008701if test "$posix_threads" = "yes"; then
8702 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008703
Matthias Kloseb9621712010-04-24 17:59:49 +00008704$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008705
8706 fi
8707
8708 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8709 case $ac_sys_system/$ac_sys_release in
8710 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008711$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008712
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008713 ;;
8714 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008715$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008716
8717 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008718 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008719$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008720
8721 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008722 esac
8723
Matthias Kloseb9621712010-04-24 17:59:49 +00008724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8725$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8726 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8727 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008728else
Matthias Kloseb9621712010-04-24 17:59:49 +00008729 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008730 ac_cv_pthread_system_supported=no
8731else
Matthias Kloseb9621712010-04-24 17:59:49 +00008732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008733/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008734#include <pthread.h>
8735 void *foo(void *parm) {
8736 return NULL;
8737 }
8738 main() {
8739 pthread_attr_t attr;
8740 pthread_t id;
8741 if (pthread_attr_init(&attr)) exit(-1);
8742 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8743 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8744 exit(0);
8745 }
8746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008747if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008748 ac_cv_pthread_system_supported=yes
8749else
Matthias Kloseb9621712010-04-24 17:59:49 +00008750 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8753 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008754fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008756
Guido van Rossum627b2d71993-12-24 10:39:16 +00008757fi
8758
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8760$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008761 if test "$ac_cv_pthread_system_supported" = "yes"; then
8762
Matthias Kloseb9621712010-04-24 17:59:49 +00008763$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008764
8765 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008766 for ac_func in pthread_sigmask
8767do :
8768 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8769if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008770 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008771#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008772_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008773 case $ac_sys_system in
8774 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008775
Matthias Kloseb9621712010-04-24 17:59:49 +00008776$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008777
8778 ;;
8779 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008780fi
8781done
8782
8783fi
8784
8785
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008786# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008787
Matthias Kloseb9621712010-04-24 17:59:49 +00008788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8789$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008790# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008791if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008792 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008793 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8795$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008796 ipv6=no
8797 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008798 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8799$as_echo "yes" >&6; }
8800 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008801
8802 ipv6=yes
8803 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008804 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008805else
Martin v. Löwis11437992002-04-12 09:54:03 +00008806
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008808
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8810$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008811 ipv6=no
8812
8813else
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008815/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008816 /* AF_INET6 available check */
8817#include <sys/types.h>
8818#include <sys/socket.h>
8819main()
8820{
8821 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8822 exit(1);
8823 else
8824 exit(0);
8825}
8826
Martin v. Löwis11437992002-04-12 09:54:03 +00008827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008828if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008829
Matthias Kloseb9621712010-04-24 17:59:49 +00008830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8831$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008832 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008833
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008834else
Matthias Kloseb159a552010-04-25 21:00:44 +00008835
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8837$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008838 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008839
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8842 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008843fi
8844
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008845
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008846if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8848$as_echo_n "checking if RFC2553 API is available... " >&6; }
8849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008850/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008851
8852 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008853#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008854int
8855main ()
8856{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008857struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008858 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008859 ;
8860 return 0;
8861}
Matthias Kloseb159a552010-04-25 21:00:44 +00008862
Martin v. Löwis11437992002-04-12 09:54:03 +00008863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008864if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008865
8866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008867$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008868 ipv6=yes
8869
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008870else
Matthias Kloseb159a552010-04-25 21:00:44 +00008871
8872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008873$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008874 ipv6=no
8875
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008878fi
8879
8880if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008881 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008882
8883fi
8884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008885fi
8886
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008887
8888ipv6type=unknown
8889ipv6lib=none
8890ipv6trylibc=no
8891
8892if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8894$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008895 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8896 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008897 case $i in
8898 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008900/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008901
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008902#include <netinet/in.h>
8903#ifdef IPV6_INRIA_VERSION
8904yes
8905#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008906_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008907if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008908 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008909 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008910fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008911rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008912
8913 ;;
8914 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008916/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008917
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008918#include <netinet/in.h>
8919#ifdef __KAME__
8920yes
8921#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008922_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008923if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008924 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008925 ipv6type=$i;
8926 ipv6lib=inet6
8927 ipv6libdir=/usr/local/v6/lib
8928 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008929fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008930rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008931
8932 ;;
8933 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008935/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008936
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008937#include <features.h>
8938#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8939yes
8940#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008941_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008942if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008943 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008944 ipv6type=$i;
8945 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008946fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008947rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008948
8949 ;;
8950 linux-inet6)
8951 if test -d /usr/inet6; then
8952 ipv6type=$i
8953 ipv6lib=inet6
8954 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008955 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956 fi
8957 ;;
8958 solaris)
8959 if test -f /etc/netconfig; then
8960 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
8961 ipv6type=$i
8962 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008963 fi
8964 fi
8965 ;;
8966 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008968/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008969
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008970#include <sys/param.h>
8971#ifdef _TOSHIBA_INET6
8972yes
8973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008974_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008977 ipv6type=$i;
8978 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008979 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008980fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008981rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008982
8983 ;;
8984 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008986/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008987
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988#include </usr/local/v6/include/sys/v6config.h>
8989#ifdef __V6D__
8990yes
8991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008992_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008994 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008995 ipv6type=$i;
8996 ipv6lib=v6;
8997 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00008998 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008999fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009000rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001
9002 ;;
9003 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009005/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009006
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007#include <sys/param.h>
9008#ifdef _ZETA_MINAMI_INET6
9009yes
9010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009011_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009012if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009013 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009014 ipv6type=$i;
9015 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009016 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009017fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009018rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009019
9020 ;;
9021 esac
9022 if test "$ipv6type" != "unknown"; then
9023 break
9024 fi
9025 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9027$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009028fi
9029
9030if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9031 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9032 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9033 echo "using lib$ipv6lib"
9034 else
9035 if test $ipv6trylibc = "yes"; then
9036 echo "using libc"
9037 else
9038 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9039 echo "You need to fetch lib$ipv6lib.a from appropriate"
9040 echo 'ipv6 kit and compile beforehand.'
9041 exit 1
9042 fi
9043 fi
9044fi
9045
Matthias Kloseb9621712010-04-24 17:59:49 +00009046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9047$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009049/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009050
9051 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009052int
9053main ()
9054{
9055FSIORefNum fRef = 0
9056 ;
9057 return 0;
9058}
Matthias Kloseb159a552010-04-25 21:00:44 +00009059
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009061if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009062
Matthias Kloseb159a552010-04-25 21:00:44 +00009063
Matthias Kloseb9621712010-04-24 17:59:49 +00009064$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009065
Matthias Kloseb9621712010-04-24 17:59:49 +00009066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9067$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009068
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009069else
Matthias Kloseb159a552010-04-25 21:00:44 +00009070
Matthias Kloseb9621712010-04-24 17:59:49 +00009071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9072$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009073
9074fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9076
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009077# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9079$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009080
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009081# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009082if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009083 withval=$with_doc_strings;
9084fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009085
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009086
9087if test -z "$with_doc_strings"
9088then with_doc_strings="yes"
9089fi
9090if test "$with_doc_strings" != "no"
9091then
9092
Matthias Kloseb9621712010-04-24 17:59:49 +00009093$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009094
9095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9097$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009098
Neil Schemenauera35c6882001-02-27 04:45:05 +00009099# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9101$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009103# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009104if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009105 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009106if test "$withval" != no
9107then
9108
Matthias Kloseb9621712010-04-24 17:59:49 +00009109$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009110
Matthias Kloseb9621712010-04-24 17:59:49 +00009111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9112$as_echo "yes" >&6; }
9113else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9114$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009115fi
9116else
Matthias Kloseb9621712010-04-24 17:59:49 +00009117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9118$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009119fi
9120
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009121
9122# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9124$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009126# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009127if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009128 withval=$with_pymalloc;
9129fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009130
Neil Schemenauera35c6882001-02-27 04:45:05 +00009131
Neil Schemenauer16c22972002-03-22 15:34:49 +00009132if test -z "$with_pymalloc"
9133then with_pymalloc="yes"
9134fi
9135if test "$with_pymalloc" != "no"
9136then
Martin v. Löwis11437992002-04-12 09:54:03 +00009137
Matthias Kloseb9621712010-04-24 17:59:49 +00009138$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009139
9140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9142$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009143
Benjamin Peterson05159c42009-12-03 03:01:27 +00009144# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9146$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009147
9148# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009149if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009150 withval=$with_valgrind;
9151else
9152 with_valgrind=no
9153fi
9154
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9156$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009157if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009158 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9159if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009160
Matthias Kloseb9621712010-04-24 17:59:49 +00009161$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009162
9163else
Matthias Kloseb9621712010-04-24 17:59:49 +00009164 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009165
9166fi
9167
9168
9169fi
9170
Barry Warsawef82cd72000-06-30 16:21:01 +00009171# Check for --with-wctype-functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9173$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009174
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009175# Check whether --with-wctype-functions was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009176if test "${with_wctype_functions+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009177 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009178if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009179then
9180
Matthias Kloseb9621712010-04-24 17:59:49 +00009181$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009182
Matthias Kloseb9621712010-04-24 17:59:49 +00009183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9184$as_echo "yes" >&6; }
9185else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9186$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009187fi
9188else
Matthias Kloseb9621712010-04-24 17:59:49 +00009189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9190$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009191fi
9192
Barry Warsawef82cd72000-06-30 16:21:01 +00009193
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009194# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009195
Guido van Rossum98935bf2001-09-05 19:13:16 +00009196DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009197
Guido van Rossume97ee181999-12-20 21:27:22 +00009198# the dlopen() function means we might want to use dynload_shlib.o. some
9199# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009200for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009201do :
9202 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9203if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009204 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009205#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009206_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009207
Guido van Rossume97ee181999-12-20 21:27:22 +00009208fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009209done
Guido van Rossume97ee181999-12-20 21:27:22 +00009210
Michael W. Hudson54241132001-12-07 15:38:26 +00009211
Guido van Rossume97ee181999-12-20 21:27:22 +00009212# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9213# loading of modules.
9214
Matthias Kloseb9621712010-04-24 17:59:49 +00009215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9216$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009217if test -z "$DYNLOADFILE"
9218then
9219 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009220 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9221 if test "$ac_cv_func_dlopen" = yes
9222 then DYNLOADFILE="dynload_shlib.o"
9223 else DYNLOADFILE="dynload_aix.o"
9224 fi
9225 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009226 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009227 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9228 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009229 *)
9230 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9231 # out any dynamic loading
9232 if test "$ac_cv_func_dlopen" = yes
9233 then DYNLOADFILE="dynload_shlib.o"
9234 else DYNLOADFILE="dynload_stub.o"
9235 fi
9236 ;;
9237 esac
9238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9240$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009241if test "$DYNLOADFILE" != "dynload_stub.o"
9242then
Martin v. Löwis11437992002-04-12 09:54:03 +00009243
Matthias Kloseb9621712010-04-24 17:59:49 +00009244$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009245
9246fi
9247
Neil Schemenauer4e425612001-06-19 15:44:15 +00009248# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9249
Michael W. Hudson54241132001-12-07 15:38:26 +00009250
Matthias Kloseb9621712010-04-24 17:59:49 +00009251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9252$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009253if test -z "$MACHDEP_OBJS"
9254then
Jack Jansene578a632001-08-15 01:27:14 +00009255 MACHDEP_OBJS=$extra_machdep_objs
9256else
9257 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9260$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009261
Guido van Rossum627b2d71993-12-24 10:39:16 +00009262# checks for library functions
Martin v. Löwis823725e2008-03-24 13:39:54 +00009263for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9264 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009265 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009266 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009267 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009268 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009269 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009270 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9271 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009272 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
9273 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009274 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009275 truncate uname unsetenv utimes waitpid wait3 wait4 \
9276 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009277do :
9278 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9279ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9280eval as_val=\$$as_ac_var
9281 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009282 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009283#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009284_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009285
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009286fi
9287done
9288
Michael W. Hudson54241132001-12-07 15:38:26 +00009289
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009290# For some functions, having a definition is not sufficient, since
9291# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9293$as_echo_n "checking for chroot... " >&6; }
9294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009295/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009296#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009297int
9298main ()
9299{
9300void *x=chroot
9301 ;
9302 return 0;
9303}
9304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009305if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009306
Matthias Kloseb9621712010-04-24 17:59:49 +00009307$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009308
Matthias Kloseb159a552010-04-25 21:00:44 +00009309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009310$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009311else
Matthias Kloseb9621712010-04-24 17:59:49 +00009312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9313$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009314
9315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9318$as_echo_n "checking for link... " >&6; }
9319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009320/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009321#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009322int
9323main ()
9324{
9325void *x=link
9326 ;
9327 return 0;
9328}
9329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009330if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009331
Matthias Kloseb9621712010-04-24 17:59:49 +00009332$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009333
Matthias Kloseb159a552010-04-25 21:00:44 +00009334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009335$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009336else
Matthias Kloseb9621712010-04-24 17:59:49 +00009337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9338$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009339
9340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9343$as_echo_n "checking for symlink... " >&6; }
9344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009345/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009346#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009347int
9348main ()
9349{
9350void *x=symlink
9351 ;
9352 return 0;
9353}
9354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009355if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009356
Matthias Kloseb9621712010-04-24 17:59:49 +00009357$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009358
Matthias Kloseb159a552010-04-25 21:00:44 +00009359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009360$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009361else
Matthias Kloseb9621712010-04-24 17:59:49 +00009362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9363$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009364
9365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9368$as_echo_n "checking for fchdir... " >&6; }
9369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009370/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009371#include <unistd.h>
9372int
9373main ()
9374{
9375void *x=fchdir
9376 ;
9377 return 0;
9378}
9379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009380if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009381
Matthias Kloseb9621712010-04-24 17:59:49 +00009382$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009383
Matthias Kloseb159a552010-04-25 21:00:44 +00009384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009385$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009386else
Matthias Kloseb9621712010-04-24 17:59:49 +00009387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9388$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009389
9390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9393$as_echo_n "checking for fsync... " >&6; }
9394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009395/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009396#include <unistd.h>
9397int
9398main ()
9399{
9400void *x=fsync
9401 ;
9402 return 0;
9403}
9404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009405if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009406
Matthias Kloseb9621712010-04-24 17:59:49 +00009407$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009408
Matthias Kloseb159a552010-04-25 21:00:44 +00009409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009410$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009411else
Matthias Kloseb9621712010-04-24 17:59:49 +00009412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9413$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009414
9415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9418$as_echo_n "checking for fdatasync... " >&6; }
9419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009420/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009421#include <unistd.h>
9422int
9423main ()
9424{
9425void *x=fdatasync
9426 ;
9427 return 0;
9428}
9429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009430if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009431
Matthias Kloseb9621712010-04-24 17:59:49 +00009432$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009433
Matthias Kloseb159a552010-04-25 21:00:44 +00009434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009435$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009436else
Matthias Kloseb9621712010-04-24 17:59:49 +00009437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9438$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009439
9440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9443$as_echo_n "checking for epoll... " >&6; }
9444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009445/* end confdefs.h. */
9446#include <sys/epoll.h>
9447int
9448main ()
9449{
9450void *x=epoll_create
9451 ;
9452 return 0;
9453}
9454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009455if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009456
Matthias Kloseb9621712010-04-24 17:59:49 +00009457$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009458
Matthias Kloseb159a552010-04-25 21:00:44 +00009459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009460$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009461else
Matthias Kloseb9621712010-04-24 17:59:49 +00009462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9463$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009464
9465fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9468$as_echo_n "checking for kqueue... " >&6; }
9469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009470/* end confdefs.h. */
9471
9472#include <sys/types.h>
9473#include <sys/event.h>
9474
9475int
9476main ()
9477{
9478int x=kqueue()
9479 ;
9480 return 0;
9481}
9482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009483if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009484
Matthias Kloseb9621712010-04-24 17:59:49 +00009485$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009486
Matthias Kloseb159a552010-04-25 21:00:44 +00009487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009488$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009489else
Matthias Kloseb9621712010-04-24 17:59:49 +00009490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9491$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009492
9493fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009495# On some systems (eg. FreeBSD 5), we would find a definition of the
9496# functions ctermid_r, setgroups in the library, but no prototype
9497# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9498# address to avoid compiler warnings and potential miscompilations
9499# because of the missing prototypes.
9500
Matthias Kloseb9621712010-04-24 17:59:49 +00009501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9502$as_echo_n "checking for ctermid_r... " >&6; }
9503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009504/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009505
9506#include "confdefs.h"
9507#include <stdio.h>
9508
Martin v. Löwisd5843682002-11-21 20:41:28 +00009509int
9510main ()
9511{
9512void* p = ctermid_r
9513 ;
9514 return 0;
9515}
9516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009517if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009518
Matthias Kloseb9621712010-04-24 17:59:49 +00009519$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009520
Matthias Kloseb159a552010-04-25 21:00:44 +00009521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009522$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009523else
Matthias Kloseb9621712010-04-24 17:59:49 +00009524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9525$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009526
9527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9529
Matthias Kloseb9621712010-04-24 17:59:49 +00009530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
9531$as_echo_n "checking for flock... " >&6; }
9532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009533/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009534
9535#include "confdefs.h"
9536#include <sys/file.h>
9537
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009538int
9539main ()
9540{
9541void* p = flock
9542 ;
9543 return 0;
9544}
9545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009546if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009547
Matthias Kloseb9621712010-04-24 17:59:49 +00009548$as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009549
Matthias Kloseb159a552010-04-25 21:00:44 +00009550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009551$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009552else
Matthias Kloseb9621712010-04-24 17:59:49 +00009553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9554$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009555
9556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9558
Matthias Kloseb9621712010-04-24 17:59:49 +00009559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9560$as_echo_n "checking for getpagesize... " >&6; }
9561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009562/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009563
9564#include "confdefs.h"
9565#include <unistd.h>
9566
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009567int
9568main ()
9569{
9570void* p = getpagesize
9571 ;
9572 return 0;
9573}
9574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009575if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009576
Matthias Kloseb9621712010-04-24 17:59:49 +00009577$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009578
Matthias Kloseb159a552010-04-25 21:00:44 +00009579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009580$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009581else
Matthias Kloseb9621712010-04-24 17:59:49 +00009582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9583$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009584
9585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009587
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009588for ac_prog in true
9589do
9590 # Extract the first word of "$ac_prog", so it can be a program name with args.
9591set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9593$as_echo_n "checking for $ac_word... " >&6; }
9594if test "${ac_cv_prog_TRUE+set}" = set; then :
9595 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009596else
9597 if test -n "$TRUE"; then
9598 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9599else
9600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9601for as_dir in $PATH
9602do
9603 IFS=$as_save_IFS
9604 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009605 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009606 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 +00009607 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009608 $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 +00009609 break 2
9610 fi
9611done
Matthias Kloseb9621712010-04-24 17:59:49 +00009612 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009613IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009614
9615fi
9616fi
9617TRUE=$ac_cv_prog_TRUE
9618if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9620$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009621else
Matthias Kloseb9621712010-04-24 17:59:49 +00009622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9623$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009624fi
9625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009626
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009627 test -n "$TRUE" && break
9628done
9629test -n "$TRUE" || TRUE="/bin/true"
9630
9631
Matthias Kloseb9621712010-04-24 17:59:49 +00009632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9633$as_echo_n "checking for inet_aton in -lc... " >&6; }
9634if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9635 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009636else
9637 ac_check_lib_save_LIBS=$LIBS
9638LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009640/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009642/* Override any GCC internal prototype to avoid an error.
9643 Use char because int might match the return type of a GCC
9644 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009645#ifdef __cplusplus
9646extern "C"
9647#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009648char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009649int
9650main ()
9651{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009652return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009653 ;
9654 return 0;
9655}
9656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009657if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009658 ac_cv_lib_c_inet_aton=yes
9659else
Matthias Kloseb9621712010-04-24 17:59:49 +00009660 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009662rm -f core conftest.err conftest.$ac_objext \
9663 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009664LIBS=$ac_check_lib_save_LIBS
9665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9667$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9668if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009669 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009670else
Matthias Kloseb9621712010-04-24 17:59:49 +00009671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9672$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9673if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9674 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009675else
9676 ac_check_lib_save_LIBS=$LIBS
9677LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009679/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009681/* Override any GCC internal prototype to avoid an error.
9682 Use char because int might match the return type of a GCC
9683 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009684#ifdef __cplusplus
9685extern "C"
9686#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009687char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009688int
9689main ()
9690{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009691return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009692 ;
9693 return 0;
9694}
9695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009696if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009697 ac_cv_lib_resolv_inet_aton=yes
9698else
Matthias Kloseb9621712010-04-24 17:59:49 +00009699 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009701rm -f core conftest.err conftest.$ac_objext \
9702 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009703LIBS=$ac_check_lib_save_LIBS
9704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9706$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9707if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009708 cat >>confdefs.h <<_ACEOF
9709#define HAVE_LIBRESOLV 1
9710_ACEOF
9711
9712 LIBS="-lresolv $LIBS"
9713
9714fi
9715
9716
9717fi
9718
9719
Christian Heimesd0764e22007-12-04 15:00:33 +00009720# On Tru64, chflags seems to be present, but calling it will
9721# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9723$as_echo_n "checking for chflags... " >&6; }
9724if test "${ac_cv_have_chflags+set}" = set; then :
9725 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009726else
Matthias Kloseb9621712010-04-24 17:59:49 +00009727 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009728 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009729else
Matthias Kloseb9621712010-04-24 17:59:49 +00009730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009731/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009732[
Christian Heimesd0764e22007-12-04 15:00:33 +00009733#include <sys/stat.h>
9734#include <unistd.h>
9735int main(int argc, char*argv[])
9736{
9737 if(chflags(argv[0], 0) != 0)
9738 return 1;
9739 return 0;
9740}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009741]
Christian Heimesd0764e22007-12-04 15:00:33 +00009742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009743if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009744 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009745else
Matthias Kloseb9621712010-04-24 17:59:49 +00009746 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9749 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009750fi
9751
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009752
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9755$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009756if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009757 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9758if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009759 ac_cv_have_chflags="yes"
9760else
9761 ac_cv_have_chflags="no"
9762fi
9763
9764fi
9765if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009766
Matthias Kloseb9621712010-04-24 17:59:49 +00009767$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009768
9769fi
9770
Matthias Kloseb9621712010-04-24 17:59:49 +00009771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9772$as_echo_n "checking for lchflags... " >&6; }
9773if test "${ac_cv_have_lchflags+set}" = set; then :
9774 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009775else
Matthias Kloseb9621712010-04-24 17:59:49 +00009776 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009777 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009778else
Matthias Kloseb9621712010-04-24 17:59:49 +00009779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009780/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009781[
Christian Heimesd0764e22007-12-04 15:00:33 +00009782#include <sys/stat.h>
9783#include <unistd.h>
9784int main(int argc, char*argv[])
9785{
9786 if(lchflags(argv[0], 0) != 0)
9787 return 1;
9788 return 0;
9789}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009790]
Christian Heimesd0764e22007-12-04 15:00:33 +00009791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009792if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009793 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009794else
Matthias Kloseb9621712010-04-24 17:59:49 +00009795 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009797rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9798 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009799fi
9800
9801
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9804$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009805if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009806 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9807if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009808 ac_cv_have_lchflags="yes"
9809else
9810 ac_cv_have_lchflags="no"
9811fi
9812
9813fi
9814if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009815
Matthias Kloseb9621712010-04-24 17:59:49 +00009816$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009817
9818fi
9819
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009820case $ac_sys_system/$ac_sys_release in
9821Darwin/*)
9822 _CUR_CFLAGS="${CFLAGS}"
9823 _CUR_LDFLAGS="${LDFLAGS}"
9824 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9825 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9826 ;;
9827esac
9828
Matthias Kloseb9621712010-04-24 17:59:49 +00009829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9830$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9831if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9832 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009833else
9834 ac_check_lib_save_LIBS=$LIBS
9835LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009837/* end confdefs.h. */
9838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009839/* Override any GCC internal prototype to avoid an error.
9840 Use char because int might match the return type of a GCC
9841 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009842#ifdef __cplusplus
9843extern "C"
9844#endif
9845char inflateCopy ();
9846int
9847main ()
9848{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009849return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009850 ;
9851 return 0;
9852}
9853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009854if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009855 ac_cv_lib_z_inflateCopy=yes
9856else
Matthias Kloseb9621712010-04-24 17:59:49 +00009857 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009859rm -f core conftest.err conftest.$ac_objext \
9860 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009861LIBS=$ac_check_lib_save_LIBS
9862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9864$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9865if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009866
Matthias Kloseb9621712010-04-24 17:59:49 +00009867$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009868
9869fi
9870
9871
9872case $ac_sys_system/$ac_sys_release in
9873Darwin/*)
9874 CFLAGS="${_CUR_CFLAGS}"
9875 LDFLAGS="${_CUR_LDFLAGS}"
9876 ;;
9877esac
9878
Matthias Kloseb9621712010-04-24 17:59:49 +00009879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9880$as_echo_n "checking for hstrerror... " >&6; }
9881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009882/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009883
9884#include "confdefs.h"
9885#include <netdb.h>
9886
Martin v. Löwise9416172003-05-03 10:12:45 +00009887int
9888main ()
9889{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009890void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009891 ;
9892 return 0;
9893}
9894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009895if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009896
Matthias Kloseb9621712010-04-24 17:59:49 +00009897$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009898
Matthias Kloseb159a552010-04-25 21:00:44 +00009899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009900$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009901else
Matthias Kloseb9621712010-04-24 17:59:49 +00009902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9903$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009904
9905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009906rm -f core conftest.err conftest.$ac_objext \
9907 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009908
Matthias Kloseb9621712010-04-24 17:59:49 +00009909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9910$as_echo_n "checking for inet_aton... " >&6; }
9911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009912/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009913
9914#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +00009915#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009916#include <sys/socket.h>
9917#include <netinet/in.h>
9918#include <arpa/inet.h>
9919
Martin v. Löwise9416172003-05-03 10:12:45 +00009920int
9921main ()
9922{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009923void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009924 ;
9925 return 0;
9926}
9927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009928if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009929
Matthias Kloseb9621712010-04-24 17:59:49 +00009930$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009931
Matthias Kloseb159a552010-04-25 21:00:44 +00009932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009933$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009934else
Matthias Kloseb9621712010-04-24 17:59:49 +00009935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9936$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009937
9938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009939rm -f core conftest.err conftest.$ac_objext \
9940 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009941
Matthias Kloseb9621712010-04-24 17:59:49 +00009942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9943$as_echo_n "checking for inet_pton... " >&6; }
9944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009945/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009946
9947#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009948#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009949#include <sys/socket.h>
9950#include <netinet/in.h>
9951#include <arpa/inet.h>
9952
Martin v. Löwise9416172003-05-03 10:12:45 +00009953int
9954main ()
9955{
9956void* p = inet_pton
9957 ;
9958 return 0;
9959}
9960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009961if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009962
Matthias Kloseb9621712010-04-24 17:59:49 +00009963$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009964
Matthias Kloseb159a552010-04-25 21:00:44 +00009965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009966$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009967else
Matthias Kloseb9621712010-04-24 17:59:49 +00009968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9969$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009970
9971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +00009973
Martin v. Löwisd6640d42003-07-06 09:29:52 +00009974# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +00009975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
9976$as_echo_n "checking for setgroups... " >&6; }
9977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009978/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009979
9980#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009981#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +00009982#ifdef HAVE_GRP_H
9983#include <grp.h>
9984#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +00009985
Martin v. Löwisd5843682002-11-21 20:41:28 +00009986int
9987main ()
9988{
9989void* p = setgroups
9990 ;
9991 return 0;
9992}
9993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009994if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009995
Matthias Kloseb9621712010-04-24 17:59:49 +00009996$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009997
Matthias Kloseb159a552010-04-25 21:00:44 +00009998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009999$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010000else
Matthias Kloseb9621712010-04-24 17:59:49 +000010001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10002$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010003
10004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010006
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010007# check for openpty and forkpty
10008
10009for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010010do :
10011 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10012if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010013 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010014#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010015_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010016
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010017else
Matthias Kloseb9621712010-04-24 17:59:49 +000010018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10019$as_echo_n "checking for openpty in -lutil... " >&6; }
10020if test "${ac_cv_lib_util_openpty+set}" = set; then :
10021 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010022else
Martin v. Löwis11437992002-04-12 09:54:03 +000010023 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010024LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010028/* Override any GCC internal prototype to avoid an error.
10029 Use char because int might match the return type of a GCC
10030 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010031#ifdef __cplusplus
10032extern "C"
10033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010034char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010035int
10036main ()
10037{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010038return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010039 ;
10040 return 0;
10041}
10042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010043if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010044 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010045else
Matthias Kloseb9621712010-04-24 17:59:49 +000010046 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010047fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010048rm -f core conftest.err conftest.$ac_objext \
10049 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010050LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10053$as_echo "$ac_cv_lib_util_openpty" >&6; }
10054if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10055 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010056 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010057else
Matthias Kloseb9621712010-04-24 17:59:49 +000010058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10059$as_echo_n "checking for openpty in -lbsd... " >&6; }
10060if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10061 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010062else
10063 ac_check_lib_save_LIBS=$LIBS
10064LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010066/* end confdefs.h. */
10067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010068/* Override any GCC internal prototype to avoid an error.
10069 Use char because int might match the return type of a GCC
10070 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010071#ifdef __cplusplus
10072extern "C"
10073#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010074char openpty ();
10075int
10076main ()
10077{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010078return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010079 ;
10080 return 0;
10081}
10082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010083if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010084 ac_cv_lib_bsd_openpty=yes
10085else
Matthias Kloseb9621712010-04-24 17:59:49 +000010086 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010088rm -f core conftest.err conftest.$ac_objext \
10089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010090LIBS=$ac_check_lib_save_LIBS
10091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10093$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10094if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10095 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010096 LIBS="$LIBS -lbsd"
10097fi
10098
10099
10100fi
10101
Fred Drake8cef4cf2000-06-28 16:40:38 +000010102
10103fi
10104done
10105
10106for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010107do :
10108 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10109if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010110 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010111#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010112_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010113
Fred Drake8cef4cf2000-06-28 16:40:38 +000010114else
Matthias Kloseb9621712010-04-24 17:59:49 +000010115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10116$as_echo_n "checking for forkpty in -lutil... " >&6; }
10117if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10118 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010119else
Martin v. Löwis11437992002-04-12 09:54:03 +000010120 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010121LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010125/* Override any GCC internal prototype to avoid an error.
10126 Use char because int might match the return type of a GCC
10127 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010128#ifdef __cplusplus
10129extern "C"
10130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010131char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010132int
10133main ()
10134{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 ;
10137 return 0;
10138}
10139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010140if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010142else
Matthias Kloseb9621712010-04-24 17:59:49 +000010143 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010145rm -f core conftest.err conftest.$ac_objext \
10146 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010147LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10150$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10151if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10152 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010153 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010154else
Matthias Kloseb9621712010-04-24 17:59:49 +000010155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10156$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10157if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10158 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010159else
10160 ac_check_lib_save_LIBS=$LIBS
10161LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010163/* end confdefs.h. */
10164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165/* Override any GCC internal prototype to avoid an error.
10166 Use char because int might match the return type of a GCC
10167 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010168#ifdef __cplusplus
10169extern "C"
10170#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010171char forkpty ();
10172int
10173main ()
10174{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010175return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010176 ;
10177 return 0;
10178}
10179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010180if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010181 ac_cv_lib_bsd_forkpty=yes
10182else
Matthias Kloseb9621712010-04-24 17:59:49 +000010183 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010185rm -f core conftest.err conftest.$ac_objext \
10186 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010187LIBS=$ac_check_lib_save_LIBS
10188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10190$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10191if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10192 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010193 LIBS="$LIBS -lbsd"
10194fi
10195
10196
10197fi
10198
Fred Drake8cef4cf2000-06-28 16:40:38 +000010199
10200fi
10201done
10202
Jack Jansendd19cf82001-12-06 22:36:17 +000010203
Christian Heimesb186d002008-03-18 15:15:01 +000010204# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010205for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010206do :
10207 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10208if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010209 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010210#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010211_ACEOF
10212
10213fi
10214done
10215
10216
Michael W. Hudson54241132001-12-07 15:38:26 +000010217# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010218for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010219do :
10220 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10221ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10222eval as_val=\$$as_ac_var
10223 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010224 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010225#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010226_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010227
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010228fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010229done
10230
Michael W. Hudson54241132001-12-07 15:38:26 +000010231
Christian Heimesb186d002008-03-18 15:15:01 +000010232for ac_func in dup2 getcwd strdup
Matthias Kloseb9621712010-04-24 17:59:49 +000010233do :
10234 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10235ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10236eval as_val=\$$as_ac_var
10237 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010238 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010239#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010240_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010241
Martin v. Löwis1142de32002-03-29 16:28:31 +000010242else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010243 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010244 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010245 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
10246 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010247esac
10248
Martin v. Löwis1142de32002-03-29 16:28:31 +000010249fi
10250done
10251
10252
10253for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010254do :
10255 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10256if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010257 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010258#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010261/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010262#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010263int
10264main ()
10265{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010266getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 ;
10268 return 0;
10269}
10270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010271if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010272
Matthias Kloseb9621712010-04-24 17:59:49 +000010273$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010274
Guido van Rossum627b2d71993-12-24 10:39:16 +000010275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010277
Guido van Rossum627b2d71993-12-24 10:39:16 +000010278fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010279done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010280
Jack Jansen150753c2003-03-29 22:07:47 +000010281for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010282do :
10283 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10284if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010285 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010286#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010289/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010290#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010291int
10292main ()
10293{
10294setpgrp(0,0);
10295 ;
10296 return 0;
10297}
10298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010299if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010300
Matthias Kloseb9621712010-04-24 17:59:49 +000010301$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010302
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010305
10306fi
10307done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010308
Thomas Wouters3a584202000-08-05 23:28:51 +000010309for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010310do :
10311 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10312if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010313 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010314#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010317/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010318#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010319int
10320main ()
10321{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010322gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 ;
10324 return 0;
10325}
10326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010327if ac_fn_c_try_compile "$LINENO"; then :
10328
Guido van Rossum627b2d71993-12-24 10:39:16 +000010329else
Skip Montanaro6dead952003-09-25 14:50:04 +000010330
Matthias Kloseb9621712010-04-24 17:59:49 +000010331$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010332
Martin v. Löwis11437992002-04-12 09:54:03 +000010333
Guido van Rossum627b2d71993-12-24 10:39:16 +000010334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010336
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010337fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010338done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010339
Michael W. Hudson54241132001-12-07 15:38:26 +000010340
Matthias Kloseb9621712010-04-24 17:59:49 +000010341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10342$as_echo_n "checking for major... " >&6; }
10343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010344/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010345
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010346#if defined(MAJOR_IN_MKDEV)
10347#include <sys/mkdev.h>
10348#elif defined(MAJOR_IN_SYSMACROS)
10349#include <sys/sysmacros.h>
10350#else
10351#include <sys/types.h>
10352#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010353
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010354int
10355main ()
10356{
10357
10358 makedev(major(0),minor(0));
10359
10360 ;
10361 return 0;
10362}
10363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010364if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010365
10366
Matthias Kloseb9621712010-04-24 17:59:49 +000010367$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010368
Matthias Kloseb9621712010-04-24 17:59:49 +000010369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10370$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010371
10372else
Skip Montanaro6dead952003-09-25 14:50:04 +000010373
Matthias Kloseb9621712010-04-24 17:59:49 +000010374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10375$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010376
10377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010378rm -f core conftest.err conftest.$ac_objext \
10379 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010380
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010381# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010382# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10384$as_echo_n "checking for getaddrinfo... " >&6; }
10385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010386/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010387
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010388#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010389#include <sys/socket.h>
10390#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010391#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010392
Martin v. Löwis11437992002-04-12 09:54:03 +000010393int
10394main ()
10395{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010396getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 ;
10398 return 0;
10399}
10400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010401if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010402 have_getaddrinfo=yes
10403else
Matthias Kloseb9621712010-04-24 17:59:49 +000010404 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010406rm -f core conftest.err conftest.$ac_objext \
10407 conftest$ac_exeext conftest.$ac_ext
10408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10409$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010410if test $have_getaddrinfo = yes
10411then
Matthias Kloseb9621712010-04-24 17:59:49 +000010412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10413$as_echo_n "checking getaddrinfo bug... " >&6; }
10414 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10415 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010416else
Matthias Kloseb9621712010-04-24 17:59:49 +000010417 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010418 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010419else
Matthias Kloseb9621712010-04-24 17:59:49 +000010420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010421/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010422
10423#include <sys/types.h>
10424#include <netdb.h>
10425#include <string.h>
10426#include <sys/socket.h>
10427#include <netinet/in.h>
10428
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010429int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010430{
10431 int passive, gaierr, inet4 = 0, inet6 = 0;
10432 struct addrinfo hints, *ai, *aitop;
10433 char straddr[INET6_ADDRSTRLEN], strport[16];
10434
10435 for (passive = 0; passive <= 1; passive++) {
10436 memset(&hints, 0, sizeof(hints));
10437 hints.ai_family = AF_UNSPEC;
10438 hints.ai_flags = passive ? AI_PASSIVE : 0;
10439 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010440 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010441 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10442 (void)gai_strerror(gaierr);
10443 goto bad;
10444 }
10445 for (ai = aitop; ai; ai = ai->ai_next) {
10446 if (ai->ai_addr == NULL ||
10447 ai->ai_addrlen == 0 ||
10448 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10449 straddr, sizeof(straddr), strport, sizeof(strport),
10450 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10451 goto bad;
10452 }
10453 switch (ai->ai_family) {
10454 case AF_INET:
10455 if (strcmp(strport, "54321") != 0) {
10456 goto bad;
10457 }
10458 if (passive) {
10459 if (strcmp(straddr, "0.0.0.0") != 0) {
10460 goto bad;
10461 }
10462 } else {
10463 if (strcmp(straddr, "127.0.0.1") != 0) {
10464 goto bad;
10465 }
10466 }
10467 inet4++;
10468 break;
10469 case AF_INET6:
10470 if (strcmp(strport, "54321") != 0) {
10471 goto bad;
10472 }
10473 if (passive) {
10474 if (strcmp(straddr, "::") != 0) {
10475 goto bad;
10476 }
10477 } else {
10478 if (strcmp(straddr, "::1") != 0) {
10479 goto bad;
10480 }
10481 }
10482 inet6++;
10483 break;
10484 case AF_UNSPEC:
10485 goto bad;
10486 break;
10487 default:
10488 /* another family support? */
10489 break;
10490 }
10491 }
10492 }
10493
10494 if (!(inet4 == 0 || inet4 == 2))
10495 goto bad;
10496 if (!(inet6 == 0 || inet6 == 2))
10497 goto bad;
10498
10499 if (aitop)
10500 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010501 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010502
10503 bad:
10504 if (aitop)
10505 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010506 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010507}
10508
Martin v. Löwis11437992002-04-12 09:54:03 +000010509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010510if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010511 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010512else
Matthias Kloseb9621712010-04-24 17:59:49 +000010513 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10516 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010518
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010519fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010520
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010522
Mark Dickinson2df5d282009-12-31 21:22:50 +000010523if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010524then
10525 if test $ipv6 = yes
10526 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010527 echo 'Fatal: You must get working getaddrinfo() function.'
10528 echo ' or you can specify "--disable-ipv6"'.
10529 exit 1
10530 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010531else
Martin v. Löwis11437992002-04-12 09:54:03 +000010532
Matthias Kloseb9621712010-04-24 17:59:49 +000010533$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010534
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010535fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010536for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010537do :
10538 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10539if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010540 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010541#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010542_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010543
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010544fi
10545done
10546
Michael W. Hudson54241132001-12-07 15:38:26 +000010547
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010548# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10550$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10551if test "${ac_cv_header_time+set}" = set; then :
10552 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010553else
Matthias Kloseb9621712010-04-24 17:59:49 +000010554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010555/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010556#include <sys/types.h>
10557#include <sys/time.h>
10558#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010559
Martin v. Löwis11437992002-04-12 09:54:03 +000010560int
10561main ()
10562{
10563if ((struct tm *) 0)
10564return 0;
10565 ;
10566 return 0;
10567}
10568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010569if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010570 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010571else
Matthias Kloseb9621712010-04-24 17:59:49 +000010572 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10577$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010578if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010579
Matthias Kloseb9621712010-04-24 17:59:49 +000010580$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010581
10582fi
10583
Matthias Kloseb9621712010-04-24 17:59:49 +000010584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10585$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10586if test "${ac_cv_struct_tm+set}" = set; then :
10587 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010588else
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010590/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010591#include <sys/types.h>
10592#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010593
Martin v. Löwis11437992002-04-12 09:54:03 +000010594int
10595main ()
10596{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010597struct tm tm;
10598 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010599 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010600 ;
10601 return 0;
10602}
10603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010604if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010605 ac_cv_struct_tm=time.h
10606else
Matthias Kloseb9621712010-04-24 17:59:49 +000010607 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010610fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10612$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010613if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010614
Matthias Kloseb9621712010-04-24 17:59:49 +000010615$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010616
10617fi
10618
Matthias Kloseb9621712010-04-24 17:59:49 +000010619ac_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 +000010620#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010621
Matthias Kloseb9621712010-04-24 17:59:49 +000010622"
10623if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010624
10625cat >>confdefs.h <<_ACEOF
10626#define HAVE_STRUCT_TM_TM_ZONE 1
10627_ACEOF
10628
10629
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010630fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010631
Martin v. Löwis11437992002-04-12 09:54:03 +000010632if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10633
Matthias Kloseb9621712010-04-24 17:59:49 +000010634$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010635
10636else
Matthias Kloseb9621712010-04-24 17:59:49 +000010637 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10638"
10639if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10640 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010641else
Matthias Kloseb9621712010-04-24 17:59:49 +000010642 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010643fi
10644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010645cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010646#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010647_ACEOF
10648
Matthias Kloseb9621712010-04-24 17:59:49 +000010649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10650$as_echo_n "checking for tzname... " >&6; }
10651if test "${ac_cv_var_tzname+set}" = set; then :
10652 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010653else
Matthias Kloseb9621712010-04-24 17:59:49 +000010654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010655/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010656#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010657#if !HAVE_DECL_TZNAME
10658extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010659#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010660
Martin v. Löwis11437992002-04-12 09:54:03 +000010661int
10662main ()
10663{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010664return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010665 ;
10666 return 0;
10667}
10668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010669if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010670 ac_cv_var_tzname=yes
10671else
Matthias Kloseb9621712010-04-24 17:59:49 +000010672 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010673fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010674rm -f core conftest.err conftest.$ac_objext \
10675 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010676fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10678$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010679 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010680
Matthias Kloseb9621712010-04-24 17:59:49 +000010681$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010682
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010683 fi
10684fi
10685
Matthias Kloseb9621712010-04-24 17:59:49 +000010686ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10687if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010688
10689cat >>confdefs.h <<_ACEOF
10690#define HAVE_STRUCT_STAT_ST_RDEV 1
10691_ACEOF
10692
10693
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010694fi
10695
Matthias Kloseb9621712010-04-24 17:59:49 +000010696ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10697if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010698
Martin v. Löwis11437992002-04-12 09:54:03 +000010699cat >>confdefs.h <<_ACEOF
10700#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10701_ACEOF
10702
10703
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010704fi
10705
Matthias Kloseb9621712010-04-24 17:59:49 +000010706ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10707if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010708
10709cat >>confdefs.h <<_ACEOF
10710#define HAVE_STRUCT_STAT_ST_FLAGS 1
10711_ACEOF
10712
10713
10714fi
10715
Matthias Kloseb9621712010-04-24 17:59:49 +000010716ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10717if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010718
10719cat >>confdefs.h <<_ACEOF
10720#define HAVE_STRUCT_STAT_ST_GEN 1
10721_ACEOF
10722
10723
10724fi
10725
Matthias Kloseb9621712010-04-24 17:59:49 +000010726ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10727if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010728
10729cat >>confdefs.h <<_ACEOF
10730#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10731_ACEOF
10732
10733
10734fi
10735
Matthias Kloseb9621712010-04-24 17:59:49 +000010736ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10737if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010738
Martin v. Löwis11437992002-04-12 09:54:03 +000010739cat >>confdefs.h <<_ACEOF
10740#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10741_ACEOF
10742
10743
Matthias Kloseb9621712010-04-24 17:59:49 +000010744$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010745
10746else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010747 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010748 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010749 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10750 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010751esac
10752
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010753fi
10754
Michael W. Hudson54241132001-12-07 15:38:26 +000010755
Martin v. Löwis11437992002-04-12 09:54:03 +000010756
Matthias Kloseb9621712010-04-24 17:59:49 +000010757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10758$as_echo_n "checking for time.h that defines altzone... " >&6; }
10759if test "${ac_cv_header_time_altzone+set}" = set; then :
10760 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010761else
Matthias Kloseb159a552010-04-25 21:00:44 +000010762
Matthias Kloseb9621712010-04-24 17:59:49 +000010763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010764/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010765#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010766int
10767main ()
10768{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010769return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010770 ;
10771 return 0;
10772}
10773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010774if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010775 ac_cv_header_time_altzone=yes
10776else
Matthias Kloseb9621712010-04-24 17:59:49 +000010777 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010781fi
10782
Matthias Kloseb9621712010-04-24 17:59:49 +000010783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10784$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010785if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010786
Matthias Kloseb9621712010-04-24 17:59:49 +000010787$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010788
10789fi
10790
Guido van Rossumda88dad1995-01-26 00:46:29 +000010791was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10793$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010795/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010796
10797#include <sys/types.h>
10798#include <sys/select.h>
10799#include <sys/time.h>
10800
Martin v. Löwis11437992002-04-12 09:54:03 +000010801int
10802main ()
10803{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010804;
Martin v. Löwis11437992002-04-12 09:54:03 +000010805 ;
10806 return 0;
10807}
10808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010809if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010810
10811
Matthias Kloseb9621712010-04-24 17:59:49 +000010812$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010813
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010814 was_it_defined=yes
10815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10819$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010820
Matthias Kloseb9621712010-04-24 17:59:49 +000010821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10822$as_echo_n "checking for addrinfo... " >&6; }
10823if test "${ac_cv_struct_addrinfo+set}" = set; then :
10824 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010825else
Matthias Kloseb9621712010-04-24 17:59:49 +000010826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010827/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010828#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010829int
10830main ()
10831{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010832struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010833 ;
10834 return 0;
10835}
10836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010837if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010838 ac_cv_struct_addrinfo=yes
10839else
Matthias Kloseb9621712010-04-24 17:59:49 +000010840 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10843fi
10844
Matthias Kloseb9621712010-04-24 17:59:49 +000010845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10846$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010847if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010848
Matthias Kloseb9621712010-04-24 17:59:49 +000010849$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010850
10851fi
10852
Matthias Kloseb9621712010-04-24 17:59:49 +000010853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10854$as_echo_n "checking for sockaddr_storage... " >&6; }
10855if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10856 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010857else
Matthias Kloseb9621712010-04-24 17:59:49 +000010858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010859/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010860
10861# include <sys/types.h>
10862# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010863int
10864main ()
10865{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010866struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010867 ;
10868 return 0;
10869}
10870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010871if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010872 ac_cv_struct_sockaddr_storage=yes
10873else
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10877fi
10878
Matthias Kloseb9621712010-04-24 17:59:49 +000010879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10880$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010881if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010882
Matthias Kloseb9621712010-04-24 17:59:49 +000010883$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010884
10885fi
10886
Guido van Rossum627b2d71993-12-24 10:39:16 +000010887# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010888
Matthias Kloseb9621712010-04-24 17:59:49 +000010889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10890$as_echo_n "checking whether char is unsigned... " >&6; }
10891if test "${ac_cv_c_char_unsigned+set}" = set; then :
10892 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010893else
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010895/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010896$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010897int
10898main ()
10899{
10900static int test_array [1 - 2 * !(((char) -1) < 0)];
10901test_array [0] = 0
10902
10903 ;
10904 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010905}
Martin v. Löwis11437992002-04-12 09:54:03 +000010906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010907if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010908 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010909else
Matthias Kloseb9621712010-04-24 17:59:49 +000010910 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010913fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10915$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010916if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010917 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010918
10919fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010920
Matthias Kloseb9621712010-04-24 17:59:49 +000010921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10922$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10923if test "${ac_cv_c_const+set}" = set; then :
10924 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010925else
Matthias Kloseb9621712010-04-24 17:59:49 +000010926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010927/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010928
Martin v. Löwis11437992002-04-12 09:54:03 +000010929int
10930main ()
10931{
10932/* FIXME: Include the comments suggested by Paul. */
10933#ifndef __cplusplus
10934 /* Ultrix mips cc rejects this. */
10935 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010936 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000010937 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010938 char const *const *pcpcc;
10939 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010940 /* NEC SVR4.0.2 mips cc rejects this. */
10941 struct point {int x, y;};
10942 static struct point const zero = {0,0};
10943 /* AIX XL C 1.02.0.0 rejects this.
10944 It does not let you subtract one const X* pointer from another in
10945 an arm of an if-expression whose if-part is not a constant
10946 expression */
10947 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010948 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010949 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010950 ++pcpcc;
10951 ppc = (char**) pcpcc;
10952 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010953 { /* SCO 3.2v4 cc rejects this. */
10954 char *t;
10955 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010956
Martin v. Löwis11437992002-04-12 09:54:03 +000010957 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010958 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010959 }
10960 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
10961 int x[] = {25, 17};
10962 const int *foo = &x[0];
10963 ++foo;
10964 }
10965 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10966 typedef const int *iptr;
10967 iptr p = 0;
10968 ++p;
10969 }
10970 { /* AIX XL C 1.02.0.0 rejects this saying
10971 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10972 struct s { int j; const int *ap[3]; };
10973 struct s *b; b->j = 5;
10974 }
10975 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10976 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010977 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010978 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010979 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000010980#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000010981
Martin v. Löwis11437992002-04-12 09:54:03 +000010982 ;
10983 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000010984}
Martin v. Löwis11437992002-04-12 09:54:03 +000010985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010986if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010987 ac_cv_c_const=yes
10988else
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
10994$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010995if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010996
Matthias Kloseb9621712010-04-24 17:59:49 +000010997$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010998
10999fi
11000
Michael W. Hudson54241132001-12-07 15:38:26 +000011001
Guido van Rossumda88dad1995-01-26 00:46:29 +000011002works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11004$as_echo_n "checking for working volatile... " >&6; }
11005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011006/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011007
Martin v. Löwis11437992002-04-12 09:54:03 +000011008int
11009main ()
11010{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011011volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011012 ;
11013 return 0;
11014}
11015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011016if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011017 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011018else
Skip Montanaro6dead952003-09-25 14:50:04 +000011019
Matthias Kloseb9621712010-04-24 17:59:49 +000011020$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011021
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011022
Guido van Rossum627b2d71993-12-24 10:39:16 +000011023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11026$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011027
Guido van Rossumda88dad1995-01-26 00:46:29 +000011028works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11030$as_echo_n "checking for working signed char... " >&6; }
11031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011032/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011033
Martin v. Löwis11437992002-04-12 09:54:03 +000011034int
11035main ()
11036{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011037signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 ;
11039 return 0;
11040}
11041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011042if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011043 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011044else
Skip Montanaro6dead952003-09-25 14:50:04 +000011045
Matthias Kloseb9621712010-04-24 17:59:49 +000011046$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011047
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011048
Guido van Rossum7f43da71994-08-01 12:15:30 +000011049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11052$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011053
Guido van Rossumda88dad1995-01-26 00:46:29 +000011054have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11056$as_echo_n "checking for prototypes... " >&6; }
11057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011058/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011059int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011060int
11061main ()
11062{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011063return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011064 ;
11065 return 0;
11066}
11067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011068if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011069
Matthias Kloseb9621712010-04-24 17:59:49 +000011070$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011071
Matthias Kloseb159a552010-04-25 21:00:44 +000011072 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11076$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011077
Guido van Rossumda88dad1995-01-26 00:46:29 +000011078works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11080$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011082/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011083
11084#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011085int foo(int x, ...) {
11086 va_list va;
11087 va_start(va, x);
11088 va_arg(va, int);
11089 va_arg(va, char *);
11090 va_arg(va, double);
11091 return 0;
11092}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011093
Martin v. Löwis11437992002-04-12 09:54:03 +000011094int
11095main ()
11096{
Guido van Rossum90eea071996-08-30 20:58:57 +000011097return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011098 ;
11099 return 0;
11100}
11101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011102if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011103
11104
Matthias Kloseb9621712010-04-24 17:59:49 +000011105$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011106
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011107 works=yes
11108
Guido van Rossum627b2d71993-12-24 10:39:16 +000011109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11112$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011113
Martin v. Löwisd6320502004-08-12 13:45:08 +000011114# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11116$as_echo_n "checking for socketpair... " >&6; }
11117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011118/* end confdefs.h. */
11119
11120#include <sys/types.h>
11121#include <sys/socket.h>
11122
11123int
11124main ()
11125{
11126void *x=socketpair
11127 ;
11128 return 0;
11129}
11130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011131if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011132
Matthias Kloseb9621712010-04-24 17:59:49 +000011133$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011134
Matthias Kloseb159a552010-04-25 21:00:44 +000011135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011136$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011137else
Matthias Kloseb9621712010-04-24 17:59:49 +000011138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11139$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011140
11141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011143
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011144# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11146$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011148/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011149#include <sys/types.h>
11150#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011151int
11152main ()
11153{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011154struct sockaddr x;
11155x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011156 ;
11157 return 0;
11158}
11159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011160if ac_fn_c_try_compile "$LINENO"; then :
11161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11162$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011163
Matthias Kloseb9621712010-04-24 17:59:49 +000011164$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011165
11166else
Matthias Kloseb9621712010-04-24 17:59:49 +000011167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11168$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011169
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011172
Guido van Rossumda88dad1995-01-26 00:46:29 +000011173va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11175$as_echo_n "checking whether va_list is an array... " >&6; }
11176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011177/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011178
11179#ifdef HAVE_STDARG_PROTOTYPES
11180#include <stdarg.h>
11181#else
11182#include <varargs.h>
11183#endif
11184
Martin v. Löwis11437992002-04-12 09:54:03 +000011185int
11186main ()
11187{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011188va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011189 ;
11190 return 0;
11191}
11192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011193if ac_fn_c_try_compile "$LINENO"; then :
11194
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011195else
Skip Montanaro6dead952003-09-25 14:50:04 +000011196
Martin v. Löwis11437992002-04-12 09:54:03 +000011197
Matthias Kloseb9621712010-04-24 17:59:49 +000011198$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011199
Guido van Rossumda88dad1995-01-26 00:46:29 +000011200 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011201
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11205$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011206
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011207# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011208
11209
Matthias Kloseb9621712010-04-24 17:59:49 +000011210ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11211if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011212
Matthias Kloseb9621712010-04-24 17:59:49 +000011213 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011214
Matthias Kloseb9621712010-04-24 17:59:49 +000011215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11216$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011217 OLD_CFLAGS=$CFLAGS
11218 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011220/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011221
11222# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011223
Martin v. Löwis11437992002-04-12 09:54:03 +000011224int
11225main ()
11226{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011227
11228 char *name;
11229 struct hostent *he, *res;
11230 char buffer[2048];
11231 int buflen = 2048;
11232 int h_errnop;
11233
11234 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011235
11236 ;
11237 return 0;
11238}
11239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011240if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011241
Matthias Kloseb9621712010-04-24 17:59:49 +000011242 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011243
Martin v. Löwis11437992002-04-12 09:54:03 +000011244
Matthias Kloseb9621712010-04-24 17:59:49 +000011245$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011246
Matthias Kloseb9621712010-04-24 17:59:49 +000011247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11248$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011249
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011250else
Skip Montanaro6dead952003-09-25 14:50:04 +000011251
Matthias Kloseb9621712010-04-24 17:59:49 +000011252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11253$as_echo "no" >&6; }
11254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11255$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011257/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011258
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011259# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011260
Martin v. Löwis11437992002-04-12 09:54:03 +000011261int
11262main ()
11263{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011264
11265 char *name;
11266 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011267 char buffer[2048];
11268 int buflen = 2048;
11269 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011270
Matthias Kloseb159a552010-04-25 21:00:44 +000011271 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011272
11273 ;
11274 return 0;
11275}
11276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011277if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011278
Matthias Kloseb9621712010-04-24 17:59:49 +000011279 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011280
Martin v. Löwis11437992002-04-12 09:54:03 +000011281
Matthias Kloseb159a552010-04-25 21:00:44 +000011282$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011283
Matthias Kloseb9621712010-04-24 17:59:49 +000011284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11285$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011286
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011287else
Skip Montanaro6dead952003-09-25 14:50:04 +000011288
Matthias Kloseb9621712010-04-24 17:59:49 +000011289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11290$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11292$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11294/* end confdefs.h. */
11295
11296# include <netdb.h>
11297
11298int
11299main ()
11300{
11301
11302 char *name;
11303 struct hostent *he;
11304 struct hostent_data data;
11305
11306 (void) gethostbyname_r(name, he, &data);
11307
11308 ;
11309 return 0;
11310}
11311_ACEOF
11312if ac_fn_c_try_compile "$LINENO"; then :
11313
11314 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11315
11316
11317$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11318
11319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11320$as_echo "yes" >&6; }
11321
11322else
11323
11324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11325$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011326
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011329
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011332
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011335 CFLAGS=$OLD_CFLAGS
11336
11337else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011338
Matthias Kloseb9621712010-04-24 17:59:49 +000011339 for ac_func in gethostbyname
11340do :
11341 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11342if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011343 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011344#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011345_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011346
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011347fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011348done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011349
Michael W. Hudson54241132001-12-07 15:38:26 +000011350
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011351fi
11352
Michael W. Hudson54241132001-12-07 15:38:26 +000011353
11354
11355
11356
11357
11358
Guido van Rossum627b2d71993-12-24 10:39:16 +000011359# checks for system services
11360# (none yet)
11361
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011362# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011363ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11364if test "x$ac_cv_func___fpu_control" = x""yes; then :
11365
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011366else
Matthias Kloseb9621712010-04-24 17:59:49 +000011367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11368$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11369if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11370 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011371else
Martin v. Löwis11437992002-04-12 09:54:03 +000011372 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011373LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011375/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011377/* Override any GCC internal prototype to avoid an error.
11378 Use char because int might match the return type of a GCC
11379 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011380#ifdef __cplusplus
11381extern "C"
11382#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011383char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011384int
11385main ()
11386{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011387return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011388 ;
11389 return 0;
11390}
11391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011392if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011393 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011394else
Matthias Kloseb9621712010-04-24 17:59:49 +000011395 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011396fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011397rm -f core conftest.err conftest.$ac_objext \
11398 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011399LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11402$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11403if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 cat >>confdefs.h <<_ACEOF
11405#define HAVE_LIBIEEE 1
11406_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011407
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011408 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011409
Guido van Rossum627b2d71993-12-24 10:39:16 +000011410fi
11411
Michael W. Hudson54241132001-12-07 15:38:26 +000011412
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011413fi
11414
Michael W. Hudson54241132001-12-07 15:38:26 +000011415
Guido van Rossum7f253911997-05-09 02:42:48 +000011416# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11418$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011419
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011420# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011421if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011422 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011423if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011424then
11425
Matthias Kloseb9621712010-04-24 17:59:49 +000011426$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011427
Matthias Kloseb9621712010-04-24 17:59:49 +000011428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11429$as_echo "yes" >&6; }
11430else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11431$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011432fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011433else
Matthias Kloseb9621712010-04-24 17:59:49 +000011434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11435$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011436fi
11437
Guido van Rossum7f253911997-05-09 02:42:48 +000011438
Guido van Rossum7f43da71994-08-01 12:15:30 +000011439# check for --with-libm=...
11440
Guido van Rossum563e7081996-09-10 18:20:48 +000011441case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011442Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011443*) LIBM=-lm
11444esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11446$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011448# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011449if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011450 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011451if test "$withval" = no
11452then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11454$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011455elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011456then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11458$as_echo "set LIBM=\"$withval\"" >&6; }
11459else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011460fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011461else
Matthias Kloseb9621712010-04-24 17:59:49 +000011462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11463$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011464fi
11465
Guido van Rossum7f43da71994-08-01 12:15:30 +000011466
11467# check for --with-libc=...
11468
Matthias Kloseb9621712010-04-24 17:59:49 +000011469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11470$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011471
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011472# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011473if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011474 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011475if test "$withval" = no
11476then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11478$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011479elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011480then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11482$as_echo "set LIBC=\"$withval\"" >&6; }
11483else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011484fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011485else
Matthias Kloseb9621712010-04-24 17:59:49 +000011486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11487$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011488fi
11489
Guido van Rossum7f43da71994-08-01 12:15:30 +000011490
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011491# **************************************************
11492# * Check for various properties of floating point *
11493# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011494
Matthias Kloseb9621712010-04-24 17:59:49 +000011495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11496$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11497if test "${ac_cv_little_endian_double+set}" = set; then :
11498 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011499else
11500
Matthias Kloseb9621712010-04-24 17:59:49 +000011501if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011502 ac_cv_little_endian_double=no
11503else
Matthias Kloseb9621712010-04-24 17:59:49 +000011504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011505/* end confdefs.h. */
11506
11507#include <string.h>
11508int main() {
11509 double x = 9006104071832581.0;
11510 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11511 return 0;
11512 else
11513 return 1;
11514}
11515
11516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011517if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011518 ac_cv_little_endian_double=yes
11519else
Matthias Kloseb9621712010-04-24 17:59:49 +000011520 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011521fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011522rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11523 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011524fi
11525
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011526fi
11527
Matthias Kloseb9621712010-04-24 17:59:49 +000011528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11529$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011530if test "$ac_cv_little_endian_double" = yes
11531then
11532
Matthias Kloseb9621712010-04-24 17:59:49 +000011533$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011534
11535fi
11536
Matthias Kloseb9621712010-04-24 17:59:49 +000011537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11538$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11539if test "${ac_cv_big_endian_double+set}" = set; then :
11540 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011541else
11542
Matthias Kloseb9621712010-04-24 17:59:49 +000011543if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011544 ac_cv_big_endian_double=no
11545else
Matthias Kloseb9621712010-04-24 17:59:49 +000011546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011547/* end confdefs.h. */
11548
11549#include <string.h>
11550int main() {
11551 double x = 9006104071832581.0;
11552 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11553 return 0;
11554 else
11555 return 1;
11556}
11557
11558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011559if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011560 ac_cv_big_endian_double=yes
11561else
Matthias Kloseb9621712010-04-24 17:59:49 +000011562 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011564rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11565 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011566fi
11567
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011568fi
11569
Matthias Kloseb9621712010-04-24 17:59:49 +000011570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11571$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011572if test "$ac_cv_big_endian_double" = yes
11573then
11574
Matthias Kloseb9621712010-04-24 17:59:49 +000011575$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011576
11577fi
11578
11579# Some ARM platforms use a mixed-endian representation for doubles.
11580# While Python doesn't currently have full support for these platforms
11581# (see e.g., issue 1762561), we can at least make sure that float <-> string
11582# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11584$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11585if test "${ac_cv_mixed_endian_double+set}" = set; then :
11586 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011587else
11588
Matthias Kloseb9621712010-04-24 17:59:49 +000011589if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011590 ac_cv_mixed_endian_double=no
11591else
Matthias Kloseb9621712010-04-24 17:59:49 +000011592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011593/* end confdefs.h. */
11594
11595#include <string.h>
11596int main() {
11597 double x = 9006104071832581.0;
11598 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11599 return 0;
11600 else
11601 return 1;
11602}
11603
11604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011605if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011606 ac_cv_mixed_endian_double=yes
11607else
Matthias Kloseb9621712010-04-24 17:59:49 +000011608 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011609fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011610rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11611 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011612fi
11613
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011614fi
11615
Matthias Kloseb9621712010-04-24 17:59:49 +000011616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11617$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011618if test "$ac_cv_mixed_endian_double" = yes
11619then
11620
Matthias Kloseb9621712010-04-24 17:59:49 +000011621$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011622
11623fi
11624
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011625# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011626# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011627# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011628# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011629# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011630# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011631
11632# This inline assembler syntax may also work for suncc and icc,
11633# so we try it on all platforms.
11634
Matthias Kloseb9621712010-04-24 17:59:49 +000011635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11636$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011638/* end confdefs.h. */
11639
11640int
11641main ()
11642{
11643
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011644 unsigned short cw;
11645 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11646 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011647
11648 ;
11649 return 0;
11650}
11651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011652if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011653 have_gcc_asm_for_x87=yes
11654else
Matthias Kloseb9621712010-04-24 17:59:49 +000011655 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011656fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11659$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011660if test "$have_gcc_asm_for_x87" = yes
11661then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011662
Matthias Kloseb9621712010-04-24 17:59:49 +000011663$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011664
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011665fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011666
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011667# Detect whether system arithmetic is subject to x87-style double
11668# rounding issues. The result of this test has little meaning on non
11669# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11670# mode is round-to-nearest and double rounding issues are present, and
11671# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11673$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011674# $BASECFLAGS may affect the result
11675ac_save_cc="$CC"
11676CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011677if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011678 ac_cv_x87_double_rounding=no
11679else
Matthias Kloseb9621712010-04-24 17:59:49 +000011680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011681/* end confdefs.h. */
11682
11683#include <stdlib.h>
11684#include <math.h>
11685int main() {
11686 volatile double x, y, z;
11687 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11688 x = 0.99999999999999989; /* 1-2**-53 */
11689 y = 1./x;
11690 if (y != 1.)
11691 exit(0);
11692 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11693 x = 1e16;
11694 y = 2.99999;
11695 z = x + y;
11696 if (z != 1e16+4.)
11697 exit(0);
11698 /* both tests show evidence of double rounding */
11699 exit(1);
11700}
11701
11702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011703if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011704 ac_cv_x87_double_rounding=no
11705else
Matthias Kloseb9621712010-04-24 17:59:49 +000011706 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011707fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011708rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11709 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011710fi
11711
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011712CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11714$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011715if test "$ac_cv_x87_double_rounding" = yes
11716then
11717
Matthias Kloseb9621712010-04-24 17:59:49 +000011718$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011719
11720fi
11721
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011722# ************************************
11723# * Check for mathematical functions *
11724# ************************************
11725
11726LIBS_SAVE=$LIBS
11727LIBS="$LIBS $LIBM"
11728
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011729# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11730# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11732$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11733if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11734 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011735else
11736
Matthias Kloseb9621712010-04-24 17:59:49 +000011737if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011738 ac_cv_tanh_preserves_zero_sign=no
11739else
Matthias Kloseb9621712010-04-24 17:59:49 +000011740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011741/* end confdefs.h. */
11742
11743#include <math.h>
11744#include <stdlib.h>
11745int main() {
11746 /* return 0 if either negative zeros don't exist
11747 on this platform or if negative zeros exist
11748 and tanh(-0.) == -0. */
11749 if (atan2(0., -1.) == atan2(-0., -1.) ||
11750 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11751 else exit(1);
11752}
11753
11754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011755if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011756 ac_cv_tanh_preserves_zero_sign=yes
11757else
Matthias Kloseb9621712010-04-24 17:59:49 +000011758 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011759fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11761 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011762fi
11763
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011764fi
11765
Matthias Kloseb9621712010-04-24 17:59:49 +000011766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11767$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011768if test "$ac_cv_tanh_preserves_zero_sign" = yes
11769then
11770
Matthias Kloseb9621712010-04-24 17:59:49 +000011771$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011772
11773fi
11774
Mark Dickinson9c113362009-09-05 10:36:23 +000011775for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011776do :
11777 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11778ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11779eval as_val=\$$as_ac_var
11780 if test "x$as_val" = x""yes; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011781 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011782#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011783_ACEOF
11784
11785fi
11786done
11787
Mark Dickinson9c113362009-09-05 10:36:23 +000011788for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011789do :
11790 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11791ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11792eval as_val=\$$as_ac_var
11793 if test "x$as_val" = x""yes; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011794 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011795#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011796_ACEOF
11797
11798fi
11799done
11800
Matthias Kloseb9621712010-04-24 17:59:49 +000011801ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11802"
11803if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11804 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011805else
Matthias Kloseb9621712010-04-24 17:59:49 +000011806 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011807fi
11808
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011809cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011810#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011812ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11813"
11814if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11815 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011816else
Matthias Kloseb9621712010-04-24 17:59:49 +000011817 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011818fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011819
11820cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011821#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011823ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11824"
11825if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11826 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011827else
Matthias Kloseb9621712010-04-24 17:59:49 +000011828 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011829fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011830
11831cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011832#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011833_ACEOF
11834
11835
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011836LIBS=$LIBS_SAVE
11837
Mark Dickinsona614f042009-11-28 12:48:43 +000011838# For multiprocessing module, check that sem_open
11839# actually works. For FreeBSD versions <= 7.2,
11840# the kernel module that provides POSIX semaphores
11841# isn't loaded by default, so an attempt to call
11842# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11844$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11845if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11846 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011847else
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011849 ac_cv_posix_semaphores_enabled=yes
11850else
Matthias Kloseb9621712010-04-24 17:59:49 +000011851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011852/* end confdefs.h. */
11853
11854#include <unistd.h>
11855#include <fcntl.h>
11856#include <stdio.h>
11857#include <semaphore.h>
11858#include <sys/stat.h>
11859
11860int main(void) {
11861 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11862 if (a == SEM_FAILED) {
11863 perror("sem_open");
11864 return 1;
11865 }
11866 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011867 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011868 return 0;
11869}
11870
11871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011872if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011873 ac_cv_posix_semaphores_enabled=yes
11874else
Matthias Kloseb9621712010-04-24 17:59:49 +000011875 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011876fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11878 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011879fi
11880
11881
Mark Dickinsona614f042009-11-28 12:48:43 +000011882fi
11883
Matthias Kloseb9621712010-04-24 17:59:49 +000011884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11885$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011886if test $ac_cv_posix_semaphores_enabled = no
11887then
11888
Matthias Kloseb9621712010-04-24 17:59:49 +000011889$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011890
11891fi
11892
Mark Dickinson10683072009-04-18 21:18:19 +000011893# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11895$as_echo_n "checking for broken sem_getvalue... " >&6; }
11896if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11897 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011898else
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011900 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000011901else
Matthias Kloseb9621712010-04-24 17:59:49 +000011902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011903/* end confdefs.h. */
11904
11905#include <unistd.h>
11906#include <fcntl.h>
11907#include <stdio.h>
11908#include <semaphore.h>
11909#include <sys/stat.h>
11910
11911int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000011912 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000011913 int count;
11914 int res;
11915 if(a==SEM_FAILED){
11916 perror("sem_open");
11917 return 1;
11918
11919 }
11920 res = sem_getvalue(a, &count);
11921 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011922 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000011923 return res==-1 ? 1 : 0;
11924}
11925
Mark Dickinson10683072009-04-18 21:18:19 +000011926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011927if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011928 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000011929else
Matthias Kloseb9621712010-04-24 17:59:49 +000011930 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011931fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11933 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011934fi
11935
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011936
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011937fi
11938
Matthias Kloseb9621712010-04-24 17:59:49 +000011939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
11940$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011941if test $ac_cv_broken_sem_getvalue = yes
11942then
11943
Matthias Kloseb9621712010-04-24 17:59:49 +000011944$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011945
11946fi
11947
Mark Dickinsonbd792642009-03-18 20:06:12 +000011948# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000011949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
11950$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011951# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011952if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000011953 enableval=$enable_big_digits; case $enable_big_digits in
11954yes)
11955 enable_big_digits=30 ;;
11956no)
11957 enable_big_digits=15 ;;
1195815|30)
11959 ;;
11960*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011961 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 +000011962esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
11964$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011965
11966cat >>confdefs.h <<_ACEOF
11967#define PYLONG_BITS_IN_DIGIT $enable_big_digits
11968_ACEOF
11969
11970
11971else
Matthias Kloseb9621712010-04-24 17:59:49 +000011972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
11973$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011974fi
11975
11976
Guido van Rossumef2255b2000-03-10 22:30:29 +000011977# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011978ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
11979if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011980
11981
Matthias Kloseb9621712010-04-24 17:59:49 +000011982$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011983
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011984 wchar_h="yes"
11985
Guido van Rossumef2255b2000-03-10 22:30:29 +000011986else
Martin v. Löwis11437992002-04-12 09:54:03 +000011987 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000011988
11989fi
11990
Michael W. Hudson54241132001-12-07 15:38:26 +000011991
Martin v. Löwis11437992002-04-12 09:54:03 +000011992
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000011993# determine wchar_t size
11994if test "$wchar_h" = yes
11995then
Matthias Kloseb9621712010-04-24 17:59:49 +000011996 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011997# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11998# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11999# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12001$as_echo_n "checking size of wchar_t... " >&6; }
12002if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12003 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012004else
Matthias Kloseb9621712010-04-24 17:59:49 +000012005 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12006"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012007
Martin v. Löwis11437992002-04-12 09:54:03 +000012008else
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 if test "$ac_cv_type_wchar_t" = yes; then
12010 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12011$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12012{ as_fn_set_status 77
12013as_fn_error "cannot compute sizeof (wchar_t)
12014See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012015 else
12016 ac_cv_sizeof_wchar_t=0
12017 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012019
Martin v. Löwis11437992002-04-12 09:54:03 +000012020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12022$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012023
12024
12025
Martin v. Löwis11437992002-04-12 09:54:03 +000012026cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012027#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012028_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012029
Michael W. Hudson54241132001-12-07 15:38:26 +000012030
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012031fi
12032
Matthias Kloseb9621712010-04-24 17:59:49 +000012033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12034$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012035have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012037/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012038
12039#include <tcl.h>
12040#if TCL_UTF_MAX != 6
12041# error "NOT UCS4_TCL"
12042#endif
12043int
12044main ()
12045{
12046
12047 ;
12048 return 0;
12049}
12050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012051if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012052
12053
Matthias Kloseb9621712010-04-24 17:59:49 +000012054$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012055
12056 have_ucs4_tcl=yes
12057
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12061$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012062
Skip Montanaro6dead952003-09-25 14:50:04 +000012063# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012064if test "$wchar_h" = yes
12065then
12066 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12068$as_echo_n "checking whether wchar_t is signed... " >&6; }
12069 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12070 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012071else
12072
Matthias Kloseb9621712010-04-24 17:59:49 +000012073 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012074 ac_cv_wchar_t_signed=yes
12075else
Matthias Kloseb9621712010-04-24 17:59:49 +000012076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012077/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012078
12079 #include <wchar.h>
12080 int main()
12081 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012082 /* Success: exit code 0 */
12083 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012084 }
12085
12086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012087if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012088 ac_cv_wchar_t_signed=yes
12089else
Matthias Kloseb9621712010-04-24 17:59:49 +000012090 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12093 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012094fi
12095
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012096fi
12097
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12099$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012100fi
12101
Matthias Kloseb9621712010-04-24 17:59:49 +000012102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12103$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012104
12105# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012106if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012107 withval=$with_wide_unicode;
12108if test "$withval" != no
12109then unicode_size="4"
12110else unicode_size="2"
12111fi
12112
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012113else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012114
Georg Brandl52d168a2008-01-07 18:10:24 +000012115case "$have_ucs4_tcl" in
12116 yes) unicode_size="4" ;;
12117 *) unicode_size="2" ;;
12118esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012119
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012120fi
12121
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012122
12123
Georg Brandl52d168a2008-01-07 18:10:24 +000012124case "$unicode_size" in
Matthias Kloseb9621712010-04-24 17:59:49 +000012125 4) $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012126 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012127 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012128 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012129esac
12130
Michael W. Hudson54241132001-12-07 15:38:26 +000012131
Martin v. Löwis11437992002-04-12 09:54:03 +000012132
Georg Brandl52d168a2008-01-07 18:10:24 +000012133# wchar_t is only usable if it maps to an unsigned type
12134if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012135 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012136then
12137 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012138
Matthias Kloseb9621712010-04-24 17:59:49 +000012139$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012140
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012142
Georg Brandl52d168a2008-01-07 18:10:24 +000012143elif test "$ac_cv_sizeof_short" = "$unicode_size"
12144then
12145 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012147
Georg Brandl52d168a2008-01-07 18:10:24 +000012148elif test "$ac_cv_sizeof_long" = "$unicode_size"
12149then
12150 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012151 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012152
Georg Brandl52d168a2008-01-07 18:10:24 +000012153else
12154 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12157$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012158
12159# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12161$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12162if test "${ac_cv_c_bigendian+set}" = set; then :
12163 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012164else
Matthias Kloseb9621712010-04-24 17:59:49 +000012165 ac_cv_c_bigendian=unknown
12166 # See if we're dealing with a universal compiler.
12167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12168/* end confdefs.h. */
12169#ifndef __APPLE_CC__
12170 not a universal capable compiler
12171 #endif
12172 typedef int dummy;
12173
Skip Montanaro6dead952003-09-25 14:50:04 +000012174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012175if ac_fn_c_try_compile "$LINENO"; then :
12176
12177 # Check for potential -arch flags. It is not universal unless
12178 # there are at least two -arch flags with different values.
12179 ac_arch=
12180 ac_prev=
12181 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12182 if test -n "$ac_prev"; then
12183 case $ac_word in
12184 i?86 | x86_64 | ppc | ppc64)
12185 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12186 ac_arch=$ac_word
12187 else
12188 ac_cv_c_bigendian=universal
12189 break
12190 fi
12191 ;;
12192 esac
12193 ac_prev=
12194 elif test "x$ac_word" = "x-arch"; then
12195 ac_prev=arch
12196 fi
12197 done
12198fi
12199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12200 if test $ac_cv_c_bigendian = unknown; then
12201 # See if sys/param.h defines the BYTE_ORDER macro.
12202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012203/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012204#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012205 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012206
Martin v. Löwis11437992002-04-12 09:54:03 +000012207int
12208main ()
12209{
Matthias Kloseb9621712010-04-24 17:59:49 +000012210#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12211 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12212 && LITTLE_ENDIAN)
12213 bogus endian macros
12214 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012215
12216 ;
12217 return 0;
12218}
12219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012220if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012221 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012222 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{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012230#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012231 not big endian
12232 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012233
12234 ;
12235 return 0;
12236}
12237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012238if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012239 ac_cv_c_bigendian=yes
12240else
Matthias Kloseb9621712010-04-24 17:59:49 +000012241 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012244fi
12245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12246 fi
12247 if test $ac_cv_c_bigendian = unknown; then
12248 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012250/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012251#include <limits.h>
12252
Martin v. Löwis11437992002-04-12 09:54:03 +000012253int
12254main ()
12255{
Matthias Kloseb9621712010-04-24 17:59:49 +000012256#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12257 bogus endian macros
12258 #endif
12259
Martin v. Löwis11437992002-04-12 09:54:03 +000012260 ;
12261 return 0;
12262}
12263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012264if ac_fn_c_try_compile "$LINENO"; then :
12265 # It does; now see whether it defined to _BIG_ENDIAN or not.
12266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12267/* end confdefs.h. */
12268#include <limits.h>
12269
12270int
12271main ()
12272{
12273#ifndef _BIG_ENDIAN
12274 not big endian
12275 #endif
12276
12277 ;
12278 return 0;
12279}
12280_ACEOF
12281if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012282 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012283else
Matthias Kloseb9621712010-04-24 17:59:49 +000012284 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012285fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12287fi
12288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12289 fi
12290 if test $ac_cv_c_bigendian = unknown; then
12291 # Compile a test program.
12292 if test "$cross_compiling" = yes; then :
12293 # Try to guess by grepping values from an object file.
12294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12295/* end confdefs.h. */
12296short int ascii_mm[] =
12297 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12298 short int ascii_ii[] =
12299 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12300 int use_ascii (int i) {
12301 return ascii_mm[i] + ascii_ii[i];
12302 }
12303 short int ebcdic_ii[] =
12304 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12305 short int ebcdic_mm[] =
12306 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12307 int use_ebcdic (int i) {
12308 return ebcdic_mm[i] + ebcdic_ii[i];
12309 }
12310 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012311
Matthias Kloseb9621712010-04-24 17:59:49 +000012312int
12313main ()
12314{
12315return use_ascii (foo) == use_ebcdic (foo);
12316 ;
12317 return 0;
12318}
12319_ACEOF
12320if ac_fn_c_try_compile "$LINENO"; then :
12321 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12322 ac_cv_c_bigendian=yes
12323 fi
12324 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12325 if test "$ac_cv_c_bigendian" = unknown; then
12326 ac_cv_c_bigendian=no
12327 else
12328 # finding both strings is unlikely to happen, but who knows?
12329 ac_cv_c_bigendian=unknown
12330 fi
12331 fi
12332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012334else
Matthias Kloseb9621712010-04-24 17:59:49 +000012335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012336/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012337$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012338int
12339main ()
12340{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012341
Matthias Kloseb9621712010-04-24 17:59:49 +000012342 /* Are we little or big endian? From Harbison&Steele. */
12343 union
12344 {
12345 long int l;
12346 char c[sizeof (long int)];
12347 } u;
12348 u.l = 1;
12349 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012350
12351 ;
12352 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012353}
Martin v. Löwis11437992002-04-12 09:54:03 +000012354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012355if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012356 ac_cv_c_bigendian=no
12357else
Matthias Kloseb9621712010-04-24 17:59:49 +000012358 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012359fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012360rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12361 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012363
Matthias Kloseb9621712010-04-24 17:59:49 +000012364 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012365fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12367$as_echo "$ac_cv_c_bigendian" >&6; }
12368 case $ac_cv_c_bigendian in #(
12369 yes)
12370 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12371;; #(
12372 no)
12373 ;; #(
12374 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012375
Matthias Kloseb9621712010-04-24 17:59:49 +000012376$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012377
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 ;; #(
12379 *)
12380 as_fn_error "unknown endianness
12381 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12382 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012383
Michael W. Hudson54241132001-12-07 15:38:26 +000012384
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012385# Check whether right shifting a negative integer extends the sign bit
12386# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12388$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12389if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12390 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012391else
Martin v. Löwis11437992002-04-12 09:54:03 +000012392
Matthias Kloseb9621712010-04-24 17:59:49 +000012393if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012394 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012395else
Matthias Kloseb9621712010-04-24 17:59:49 +000012396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012397/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012398
12399int main()
12400{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012401 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012402}
12403
Martin v. Löwis11437992002-04-12 09:54:03 +000012404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012405if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012406 ac_cv_rshift_extends_sign=yes
12407else
Matthias Kloseb9621712010-04-24 17:59:49 +000012408 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012410rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12411 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012412fi
12413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012414fi
12415
Matthias Kloseb9621712010-04-24 17:59:49 +000012416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12417$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012418if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012419then
Martin v. Löwis11437992002-04-12 09:54:03 +000012420
Matthias Kloseb9621712010-04-24 17:59:49 +000012421$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012422
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012423fi
12424
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012425# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12427$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12428if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12429 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012430else
Martin v. Löwis11437992002-04-12 09:54:03 +000012431
Matthias Kloseb9621712010-04-24 17:59:49 +000012432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012433/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012434#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012435int
12436main ()
12437{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012438
12439 FILE *f = fopen("/dev/null", "r");
12440 flockfile(f);
12441 getc_unlocked(f);
12442 funlockfile(f);
12443
Martin v. Löwis11437992002-04-12 09:54:03 +000012444 ;
12445 return 0;
12446}
12447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012448if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012449 ac_cv_have_getc_unlocked=yes
12450else
Matthias Kloseb9621712010-04-24 17:59:49 +000012451 ac_cv_have_getc_unlocked=no
12452fi
12453rm -f core conftest.err conftest.$ac_objext \
12454 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012456
Matthias Kloseb9621712010-04-24 17:59:49 +000012457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12458$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012459if test "$ac_cv_have_getc_unlocked" = yes
12460then
Martin v. Löwis11437992002-04-12 09:54:03 +000012461
Matthias Kloseb9621712010-04-24 17:59:49 +000012462$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012463
12464fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012465
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012466# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012467# save the value of LIBS so we don't actually link Python with readline
12468LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012469
Gregory P. Smith18820942008-09-07 06:24:49 +000012470# On some systems we need to link readline to a termcap compatible
12471# library. NOTE: Keep the precedence of listed libraries synchronised
12472# with setup.py.
12473py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12475$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012476for py_libtermcap in "" ncursesw ncurses curses termcap; do
12477 if test -z "$py_libtermcap"; then
12478 READLINE_LIBS="-lreadline"
12479 else
12480 READLINE_LIBS="-lreadline -l$py_libtermcap"
12481 fi
12482 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012484/* end confdefs.h. */
12485
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012486/* Override any GCC internal prototype to avoid an error.
12487 Use char because int might match the return type of a GCC
12488 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012489#ifdef __cplusplus
12490extern "C"
12491#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012492char readline ();
12493int
12494main ()
12495{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012496return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012497 ;
12498 return 0;
12499}
12500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012501if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012502 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012503fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012504rm -f core conftest.err conftest.$ac_objext \
12505 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012506 if test $py_cv_lib_readline = yes; then
12507 break
12508 fi
12509done
12510# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12511#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012512if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12514$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012515else
Matthias Kloseb9621712010-04-24 17:59:49 +000012516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12517$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012518
Matthias Kloseb9621712010-04-24 17:59:49 +000012519$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012520
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012521fi
12522
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012523# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12525$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12526if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12527 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012528else
12529 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012530LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012532/* end confdefs.h. */
12533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534/* Override any GCC internal prototype to avoid an error.
12535 Use char because int might match the return type of a GCC
12536 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012537#ifdef __cplusplus
12538extern "C"
12539#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012540char rl_callback_handler_install ();
12541int
12542main ()
12543{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012544return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012545 ;
12546 return 0;
12547}
12548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012549if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012550 ac_cv_lib_readline_rl_callback_handler_install=yes
12551else
Matthias Kloseb9621712010-04-24 17:59:49 +000012552 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012554rm -f core conftest.err conftest.$ac_objext \
12555 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012556LIBS=$ac_check_lib_save_LIBS
12557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12559$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12560if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012561
Matthias Kloseb9621712010-04-24 17:59:49 +000012562$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012563
12564fi
12565
12566
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012567# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012569/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012570#include <readline/readline.h>
12571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012572if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012573 have_readline=yes
12574else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012575 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012576
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012577fi
12578rm -f conftest.err conftest.$ac_ext
12579if test $have_readline = yes
12580then
Matthias Kloseb9621712010-04-24 17:59:49 +000012581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012582/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012583#include <readline/readline.h>
12584
12585_ACEOF
12586if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012587 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012588
Matthias Kloseb9621712010-04-24 17:59:49 +000012589$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012590
12591fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012592rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012593
Matthias Kloseb9621712010-04-24 17:59:49 +000012594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012595/* end confdefs.h. */
12596#include <readline/readline.h>
12597
12598_ACEOF
12599if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012601
Matthias Kloseb9621712010-04-24 17:59:49 +000012602$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012603
12604fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012605rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012606
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012607fi
12608
Martin v. Löwis0daad592001-09-30 21:09:59 +000012609# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12611$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12612if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12613 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012614else
Martin v. Löwis11437992002-04-12 09:54:03 +000012615 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012616LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012618/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012619
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012620/* Override any GCC internal prototype to avoid an error.
12621 Use char because int might match the return type of a GCC
12622 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012623#ifdef __cplusplus
12624extern "C"
12625#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012626char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012627int
12628main ()
12629{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012630return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012631 ;
12632 return 0;
12633}
12634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012635if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012636 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012637else
Matthias Kloseb9621712010-04-24 17:59:49 +000012638 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012640rm -f core conftest.err conftest.$ac_objext \
12641 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012642LIBS=$ac_check_lib_save_LIBS
12643fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12645$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12646if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012647
Matthias Kloseb9621712010-04-24 17:59:49 +000012648$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012649
Martin v. Löwis0daad592001-09-30 21:09:59 +000012650fi
12651
Michael W. Hudson54241132001-12-07 15:38:26 +000012652
Thomas Wouters89d996e2007-09-08 17:39:28 +000012653# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12655$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12656if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12657 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012658else
12659 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012660LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012662/* end confdefs.h. */
12663
12664/* Override any GCC internal prototype to avoid an error.
12665 Use char because int might match the return type of a GCC
12666 builtin and then its argument prototype would still apply. */
12667#ifdef __cplusplus
12668extern "C"
12669#endif
12670char rl_completion_display_matches_hook ();
12671int
12672main ()
12673{
12674return rl_completion_display_matches_hook ();
12675 ;
12676 return 0;
12677}
12678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012679if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012680 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12681else
Matthias Kloseb9621712010-04-24 17:59:49 +000012682 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012683fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012684rm -f core conftest.err conftest.$ac_objext \
12685 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012686LIBS=$ac_check_lib_save_LIBS
12687fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12689$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12690if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012691
Matthias Kloseb9621712010-04-24 17:59:49 +000012692$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012693
12694fi
12695
12696
Martin v. Löwis0daad592001-09-30 21:09:59 +000012697# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12699$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12700if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12701 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012702else
Martin v. Löwis11437992002-04-12 09:54:03 +000012703 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012704LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012708/* Override any GCC internal prototype to avoid an error.
12709 Use char because int might match the return type of a GCC
12710 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012711#ifdef __cplusplus
12712extern "C"
12713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012714char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012715int
12716main ()
12717{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012718return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012719 ;
12720 return 0;
12721}
12722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012723if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012724 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012725else
Matthias Kloseb9621712010-04-24 17:59:49 +000012726 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012728rm -f core conftest.err conftest.$ac_objext \
12729 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012730LIBS=$ac_check_lib_save_LIBS
12731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12733$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12734if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012735
Matthias Kloseb9621712010-04-24 17:59:49 +000012736$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012737
Guido van Rossum353ae582001-07-10 16:45:32 +000012738fi
12739
Jack Jansendd19cf82001-12-06 22:36:17 +000012740
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012741# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012743/* end confdefs.h. */
12744#include <readline/readline.h>
12745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012746if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012747 have_readline=yes
12748else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012749 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012750
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012751fi
12752rm -f conftest.err conftest.$ac_ext
12753if test $have_readline = yes
12754then
Matthias Kloseb9621712010-04-24 17:59:49 +000012755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012756/* end confdefs.h. */
12757#include <readline/readline.h>
12758
12759_ACEOF
12760if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012762
Matthias Kloseb9621712010-04-24 17:59:49 +000012763$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012764
12765fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012766rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012767
12768fi
12769
Martin v. Löwis82bca632006-02-10 20:49:30 +000012770# End of readline checks: restore LIBS
12771LIBS=$LIBS_no_readline
12772
Matthias Kloseb9621712010-04-24 17:59:49 +000012773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12774$as_echo_n "checking for broken nice()... " >&6; }
12775if test "${ac_cv_broken_nice+set}" = set; then :
12776 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012777else
Martin v. Löwis11437992002-04-12 09:54:03 +000012778
Matthias Kloseb9621712010-04-24 17:59:49 +000012779if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012780 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012781else
Matthias Kloseb9621712010-04-24 17:59:49 +000012782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012783/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012784
12785int main()
12786{
12787 int val1 = nice(1);
12788 if (val1 != -1 && val1 == nice(2))
12789 exit(0);
12790 exit(1);
12791}
12792
Martin v. Löwis11437992002-04-12 09:54:03 +000012793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012794if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012795 ac_cv_broken_nice=yes
12796else
Matthias Kloseb9621712010-04-24 17:59:49 +000012797 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12800 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012801fi
12802
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012803fi
12804
Matthias Kloseb9621712010-04-24 17:59:49 +000012805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12806$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012807if test "$ac_cv_broken_nice" = yes
12808then
Martin v. Löwis11437992002-04-12 09:54:03 +000012809
Matthias Kloseb9621712010-04-24 17:59:49 +000012810$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012811
12812fi
12813
Matthias Kloseb9621712010-04-24 17:59:49 +000012814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12815$as_echo_n "checking for broken poll()... " >&6; }
12816if test "${ac_cv_broken_poll+set}" = set; then :
12817 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012818else
Matthias Kloseb9621712010-04-24 17:59:49 +000012819 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012820 ac_cv_broken_poll=no
12821else
Matthias Kloseb9621712010-04-24 17:59:49 +000012822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012823/* end confdefs.h. */
12824
12825#include <poll.h>
12826
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012827int main()
12828{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012829 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012830 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012831
12832 close (42);
12833
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012834 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012835 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012836 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012837 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012838 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012839 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012840 return 1;
12841}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012842
12843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012844if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012845 ac_cv_broken_poll=yes
12846else
Matthias Kloseb9621712010-04-24 17:59:49 +000012847 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12850 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012852
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012853fi
12854
Matthias Kloseb9621712010-04-24 17:59:49 +000012855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
12856$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012857if test "$ac_cv_broken_poll" = yes
12858then
12859
Matthias Kloseb9621712010-04-24 17:59:49 +000012860$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012861
12862fi
12863
Brett Cannon43802422005-02-10 20:48:03 +000012864# 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 +000012865# (which is not required by ISO C or UNIX spec) and/or if we support
12866# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000012867ac_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 +000012868#include <$ac_cv_struct_tm>
12869
Matthias Kloseb9621712010-04-24 17:59:49 +000012870"
12871if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000012872
12873cat >>confdefs.h <<_ACEOF
12874#define HAVE_STRUCT_TM_TM_ZONE 1
12875_ACEOF
12876
12877
12878fi
12879
12880if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12881
Matthias Kloseb9621712010-04-24 17:59:49 +000012882$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012883
12884else
Matthias Kloseb9621712010-04-24 17:59:49 +000012885 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12886"
12887if test "x$ac_cv_have_decl_tzname" = x""yes; then :
12888 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012889else
Matthias Kloseb9621712010-04-24 17:59:49 +000012890 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012891fi
12892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012893cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012894#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012895_ACEOF
12896
Matthias Kloseb9621712010-04-24 17:59:49 +000012897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12898$as_echo_n "checking for tzname... " >&6; }
12899if test "${ac_cv_var_tzname+set}" = set; then :
12900 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012901else
Matthias Kloseb9621712010-04-24 17:59:49 +000012902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012903/* end confdefs.h. */
12904#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012905#if !HAVE_DECL_TZNAME
12906extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000012907#endif
12908
12909int
12910main ()
12911{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012912return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000012913 ;
12914 return 0;
12915}
12916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012917if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000012918 ac_cv_var_tzname=yes
12919else
Matthias Kloseb9621712010-04-24 17:59:49 +000012920 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000012921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012922rm -f core conftest.err conftest.$ac_objext \
12923 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12926$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000012927 if test $ac_cv_var_tzname = yes; then
12928
Matthias Kloseb9621712010-04-24 17:59:49 +000012929$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012930
12931 fi
12932fi
12933
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012934
Martin v. Löwis1d459062005-03-14 21:23:33 +000012935# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000012936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
12937$as_echo_n "checking for working tzset()... " >&6; }
12938if test "${ac_cv_working_tzset+set}" = set; then :
12939 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012940else
12941
Matthias Kloseb9621712010-04-24 17:59:49 +000012942if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012943 ac_cv_working_tzset=no
12944else
Matthias Kloseb9621712010-04-24 17:59:49 +000012945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012946/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012947
12948#include <stdlib.h>
12949#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000012950#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000012951
12952#if HAVE_TZNAME
12953extern char *tzname[];
12954#endif
12955
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012956int main()
12957{
Brett Cannon18367812003-09-19 00:59:16 +000012958 /* Note that we need to ensure that not only does tzset(3)
12959 do 'something' with localtime, but it works as documented
12960 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000012961 This includes making sure that tzname is set properly if
12962 tm->tm_zone does not exist since it is the alternative way
12963 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000012964
12965 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000012966 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000012967 */
12968
Martin v. Löwis1d459062005-03-14 21:23:33 +000012969 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000012970 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
12971
Neal Norwitz7f2588c2003-04-11 15:35:53 +000012972 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012973 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000012974 if (localtime(&groundhogday)->tm_hour != 0)
12975 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012976#if HAVE_TZNAME
12977 /* For UTC, tzname[1] is sometimes "", sometimes " " */
12978 if (strcmp(tzname[0], "UTC") ||
12979 (tzname[1][0] != 0 && tzname[1][0] != ' '))
12980 exit(1);
12981#endif
Brett Cannon18367812003-09-19 00:59:16 +000012982
Neal Norwitz7f2588c2003-04-11 15:35:53 +000012983 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012984 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000012985 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012986 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012987#if HAVE_TZNAME
12988 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
12989 exit(1);
12990#endif
Brett Cannon18367812003-09-19 00:59:16 +000012991
12992 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
12993 tzset();
12994 if (localtime(&groundhogday)->tm_hour != 11)
12995 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012996#if HAVE_TZNAME
12997 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
12998 exit(1);
12999#endif
13000
13001#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013002 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13003 exit(1);
13004 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13005 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013006#endif
Brett Cannon18367812003-09-19 00:59:16 +000013007
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013008 exit(0);
13009}
13010
13011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013012if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013013 ac_cv_working_tzset=yes
13014else
Matthias Kloseb9621712010-04-24 17:59:49 +000013015 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13018 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013019fi
13020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013021fi
13022
Matthias Kloseb9621712010-04-24 17:59:49 +000013023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13024$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013025if test "$ac_cv_working_tzset" = yes
13026then
13027
Matthias Kloseb9621712010-04-24 17:59:49 +000013028$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013029
13030fi
13031
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013032# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13034$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13035if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13036 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013037else
Matthias Kloseb9621712010-04-24 17:59:49 +000013038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013039/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013040#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013041int
13042main ()
13043{
13044
13045struct stat st;
13046st.st_mtim.tv_nsec = 1;
13047
13048 ;
13049 return 0;
13050}
13051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013052if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013053 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013054else
Matthias Kloseb9621712010-04-24 17:59:49 +000013055 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13058fi
13059
Matthias Kloseb9621712010-04-24 17:59:49 +000013060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13061$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013062if test "$ac_cv_stat_tv_nsec" = yes
13063then
13064
Matthias Kloseb9621712010-04-24 17:59:49 +000013065$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013066
13067fi
13068
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013069# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13071$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13072if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13073 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013074else
Matthias Kloseb9621712010-04-24 17:59:49 +000013075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013076/* end confdefs.h. */
13077#include <sys/stat.h>
13078int
13079main ()
13080{
13081
13082struct stat st;
13083st.st_mtimespec.tv_nsec = 1;
13084
13085 ;
13086 return 0;
13087}
13088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013089if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013090 ac_cv_stat_tv_nsec2=yes
13091else
Matthias Kloseb9621712010-04-24 17:59:49 +000013092 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13095fi
13096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13098$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013099if test "$ac_cv_stat_tv_nsec2" = yes
13100then
13101
Matthias Kloseb9621712010-04-24 17:59:49 +000013102$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013103
13104fi
13105
Jack Jansen666b1e72001-10-31 12:11:48 +000013106# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13108$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13109if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13110 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013111else
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013113/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013114#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013115int
13116main ()
13117{
Jack Jansen666b1e72001-10-31 12:11:48 +000013118
13119 int rtn;
13120 rtn = mvwdelch(0,0,0);
13121
Martin v. Löwis11437992002-04-12 09:54:03 +000013122 ;
13123 return 0;
13124}
13125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013126if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013127 ac_cv_mvwdelch_is_expression=yes
13128else
Matthias Kloseb9621712010-04-24 17:59:49 +000013129 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13132fi
13133
Matthias Kloseb9621712010-04-24 17:59:49 +000013134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13135$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013136
13137if test "$ac_cv_mvwdelch_is_expression" = yes
13138then
Martin v. Löwis11437992002-04-12 09:54:03 +000013139
Matthias Kloseb9621712010-04-24 17:59:49 +000013140$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013141
13142fi
13143
Matthias Kloseb9621712010-04-24 17:59:49 +000013144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13145$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13146if test "${ac_cv_window_has_flags+set}" = set; then :
13147 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013148else
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013150/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013151#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013152int
13153main ()
13154{
Jack Jansen666b1e72001-10-31 12:11:48 +000013155
13156 WINDOW *w;
13157 w->_flags = 0;
13158
Martin v. Löwis11437992002-04-12 09:54:03 +000013159 ;
13160 return 0;
13161}
13162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013163if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013164 ac_cv_window_has_flags=yes
13165else
Matthias Kloseb9621712010-04-24 17:59:49 +000013166 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13169fi
13170
Matthias Kloseb9621712010-04-24 17:59:49 +000013171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13172$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013173
Jack Jansen666b1e72001-10-31 12:11:48 +000013174
13175if test "$ac_cv_window_has_flags" = yes
13176then
Martin v. Löwis11437992002-04-12 09:54:03 +000013177
Matthias Kloseb9621712010-04-24 17:59:49 +000013178$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013179
13180fi
13181
Matthias Kloseb9621712010-04-24 17:59:49 +000013182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13183$as_echo_n "checking for is_term_resized... " >&6; }
13184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013185/* end confdefs.h. */
13186#include <curses.h>
13187int
13188main ()
13189{
13190void *x=is_term_resized
13191 ;
13192 return 0;
13193}
13194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013195if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013196
Matthias Kloseb9621712010-04-24 17:59:49 +000013197$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013198
Matthias Kloseb159a552010-04-25 21:00:44 +000013199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013200$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013201else
Matthias Kloseb9621712010-04-24 17:59:49 +000013202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13203$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013204
13205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13207
Matthias Kloseb9621712010-04-24 17:59:49 +000013208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13209$as_echo_n "checking for resize_term... " >&6; }
13210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013211/* end confdefs.h. */
13212#include <curses.h>
13213int
13214main ()
13215{
13216void *x=resize_term
13217 ;
13218 return 0;
13219}
13220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013221if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013222
Matthias Kloseb9621712010-04-24 17:59:49 +000013223$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013224
Matthias Kloseb159a552010-04-25 21:00:44 +000013225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013226$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013227else
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13229$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013230
13231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13233
Matthias Kloseb9621712010-04-24 17:59:49 +000013234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13235$as_echo_n "checking for resizeterm... " >&6; }
13236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013237/* end confdefs.h. */
13238#include <curses.h>
13239int
13240main ()
13241{
13242void *x=resizeterm
13243 ;
13244 return 0;
13245}
13246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013247if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013248
Matthias Kloseb9621712010-04-24 17:59:49 +000013249$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013250
Matthias Kloseb159a552010-04-25 21:00:44 +000013251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013252$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013253else
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13255$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013256
13257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13259
Matthias Kloseb9621712010-04-24 17:59:49 +000013260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13261$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013262
13263if test -r /dev/ptmx
13264then
Matthias Kloseb9621712010-04-24 17:59:49 +000013265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13266$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013267
Matthias Kloseb9621712010-04-24 17:59:49 +000013268$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013269
Thomas Wouters89f507f2006-12-13 04:49:30 +000013270else
Matthias Kloseb9621712010-04-24 17:59:49 +000013271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13272$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013273fi
13274
Matthias Kloseb9621712010-04-24 17:59:49 +000013275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13276$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013277
13278if test -r /dev/ptc
13279then
Matthias Kloseb9621712010-04-24 17:59:49 +000013280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13281$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013282
Matthias Kloseb9621712010-04-24 17:59:49 +000013283$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013284
Thomas Wouters89f507f2006-12-13 04:49:30 +000013285else
Matthias Kloseb9621712010-04-24 17:59:49 +000013286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13287$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013288fi
13289
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013290if test "$have_long_long" = yes
13291then
Matthias Kloseb9621712010-04-24 17:59:49 +000013292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13293$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13294 if test "${ac_cv_have_long_long_format+set}" = set; then :
13295 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013296else
Matthias Kloseb9621712010-04-24 17:59:49 +000013297 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013298 ac_cv_have_long_long_format=no
13299else
Matthias Kloseb9621712010-04-24 17:59:49 +000013300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013301/* end confdefs.h. */
13302
13303 #include <stdio.h>
13304 #include <stddef.h>
13305 #include <string.h>
13306
13307 #ifdef HAVE_SYS_TYPES_H
13308 #include <sys/types.h>
13309 #endif
13310
13311 int main()
13312 {
13313 char buffer[256];
13314
13315 if (sprintf(buffer, "%lld", (long long)123) < 0)
13316 return 1;
13317 if (strcmp(buffer, "123"))
13318 return 1;
13319
13320 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13321 return 1;
13322 if (strcmp(buffer, "-123"))
13323 return 1;
13324
13325 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13326 return 1;
13327 if (strcmp(buffer, "123"))
13328 return 1;
13329
13330 return 0;
13331 }
13332
13333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013334if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013335 ac_cv_have_long_long_format=yes
13336else
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13340 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013341fi
13342
13343
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013344fi
13345
Matthias Kloseb9621712010-04-24 17:59:49 +000013346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13347$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013348fi
13349
Mark Dickinson89d7d412009-12-31 20:50:59 +000013350if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013351then
13352
Matthias Kloseb9621712010-04-24 17:59:49 +000013353$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013354
13355fi
13356
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013357if test $ac_sys_system = Darwin
13358then
13359 LIBS="$LIBS -framework CoreFoundation"
13360fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013361
Matthias Kloseb9621712010-04-24 17:59:49 +000013362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13363$as_echo_n "checking for %zd printf() format support... " >&6; }
13364if test "${ac_cv_have_size_t_format+set}" = set; then :
13365 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013366else
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013368 ac_cv_have_size_t_format="cross -- assuming yes"
13369
Thomas Wouters477c8d52006-05-27 19:21:47 +000013370else
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013372/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013373
Thomas Wouters477c8d52006-05-27 19:21:47 +000013374#include <stdio.h>
13375#include <stddef.h>
13376#include <string.h>
13377
Christian Heimes2c181612007-12-17 20:04:13 +000013378#ifdef HAVE_SYS_TYPES_H
13379#include <sys/types.h>
13380#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013381
13382#ifdef HAVE_SSIZE_T
13383typedef ssize_t Py_ssize_t;
13384#elif SIZEOF_VOID_P == SIZEOF_LONG
13385typedef long Py_ssize_t;
13386#else
13387typedef int Py_ssize_t;
13388#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013389
Christian Heimes2c181612007-12-17 20:04:13 +000013390int main()
13391{
13392 char buffer[256];
13393
Thomas Wouters477c8d52006-05-27 19:21:47 +000013394 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13395 return 1;
13396
Thomas Wouters89f507f2006-12-13 04:49:30 +000013397 if (strcmp(buffer, "123"))
13398 return 1;
13399
13400 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13401 return 1;
13402
13403 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013404 return 1;
13405
13406 return 0;
13407}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013408
Thomas Wouters477c8d52006-05-27 19:21:47 +000013409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013410if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013411 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013412else
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13416 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013417fi
13418
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013419fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13421$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013422if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013423
Matthias Kloseb9621712010-04-24 17:59:49 +000013424$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013425
13426fi
13427
Matthias Kloseb9621712010-04-24 17:59:49 +000013428ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013429#ifdef HAVE_SYS_TYPES_H
13430#include <sys/types.h>
13431#endif
13432#ifdef HAVE_SYS_SOCKET_H
13433#include <sys/socket.h>
13434#endif
13435
Matthias Kloseb9621712010-04-24 17:59:49 +000013436"
13437if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013438
Martin v. Löwis11437992002-04-12 09:54:03 +000013439else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013440
Matthias Kloseb9621712010-04-24 17:59:49 +000013441$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013442
13443fi
13444
Michael W. Hudson54241132001-12-07 15:38:26 +000013445
Matthias Kloseb9621712010-04-24 17:59:49 +000013446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13447$as_echo_n "checking for broken mbstowcs... " >&6; }
13448if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13449 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013450else
Matthias Kloseb9621712010-04-24 17:59:49 +000013451 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013452 ac_cv_broken_mbstowcs=no
13453else
Matthias Kloseb9621712010-04-24 17:59:49 +000013454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013455/* end confdefs.h. */
13456
13457#include<stdlib.h>
13458int main() {
13459 size_t len = -1;
13460 const char *str = "text";
13461 len = mbstowcs(NULL, str, 0);
13462 return (len != 4);
13463}
13464
13465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013466if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013467 ac_cv_broken_mbstowcs=no
13468else
Matthias Kloseb9621712010-04-24 17:59:49 +000013469 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013470fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013471rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13472 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013473fi
13474
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013475fi
13476
Matthias Kloseb9621712010-04-24 17:59:49 +000013477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13478$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013479if test "$ac_cv_broken_mbstowcs" = yes
13480then
13481
Matthias Kloseb9621712010-04-24 17:59:49 +000013482$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013483
13484fi
13485
Antoine Pitroub52ec782009-01-25 16:34:23 +000013486# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13488$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013489
13490# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013491if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013492 withval=$with_computed_gotos;
13493if test "$withval" != no
13494then
13495
Matthias Kloseb9621712010-04-24 17:59:49 +000013496$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013497
Matthias Kloseb9621712010-04-24 17:59:49 +000013498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13499$as_echo "yes" >&6; }
13500else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13501$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013502fi
13503else
Matthias Kloseb9621712010-04-24 17:59:49 +000013504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13505$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013506fi
13507
13508
13509
Michael W. Hudson54241132001-12-07 15:38:26 +000013510
13511
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013512for h in `(cd $srcdir;echo Python/thread_*.h)`
13513do
13514 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13515done
13516
Michael W. Hudson54241132001-12-07 15:38:26 +000013517
Neal Norwitzd24499d2005-12-18 21:36:39 +000013518SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13520$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013521for dir in $SRCDIRS; do
13522 if test ! -d $dir; then
13523 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013524 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013525done
Matthias Kloseb9621712010-04-24 17:59:49 +000013526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13527$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013528
Guido van Rossum627b2d71993-12-24 10:39:16 +000013529# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013530ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013531
Martin v. Löwis11437992002-04-12 09:54:03 +000013532cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013533# This file is a shell script that caches the results of configure
13534# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013535# scripts and configure runs, see configure's option --config-cache.
13536# It is not useful on other systems. If it contains results you don't
13537# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013538#
Martin v. Löwis11437992002-04-12 09:54:03 +000013539# config.status only pays attention to the cache file if you give it
13540# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013541#
Skip Montanaro6dead952003-09-25 14:50:04 +000013542# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013543# loading this file, other *unset* `ac_cv_foo' will be assigned the
13544# following values.
13545
13546_ACEOF
13547
Guido van Rossumf78abae1997-01-21 22:02:36 +000013548# The following way of writing the cache mishandles newlines in values,
13549# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013550# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013551# Ultrix sh set writes to stderr and can't be redirected directly,
13552# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013553(
13554 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13555 eval ac_val=\$$ac_var
13556 case $ac_val in #(
13557 *${as_nl}*)
13558 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013559 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13560$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013561 esac
13562 case $ac_var in #(
13563 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013564 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13565 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013566 esac ;;
13567 esac
13568 done
13569
Martin v. Löwis11437992002-04-12 09:54:03 +000013570 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013571 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13572 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013573 # `set' does not quote correctly, so add quotes: double-quote
13574 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013575 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013576 "s/'/'\\\\''/g;
13577 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013578 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013579 *)
13580 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013581 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013582 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013583 esac |
13584 sort
13585) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013586 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013587 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013588 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013589 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013590 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13591 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013592 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13593 :end' >>confcache
13594if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13595 if test -w "$cache_file"; then
13596 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013597 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13598$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013599 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013600 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013601 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13602$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013603 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013604fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013605rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013606
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013607test "x$prefix" = xNONE && prefix=$ac_default_prefix
13608# Let make expand exec_prefix.
13609test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013610
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013611DEFS=-DHAVE_CONFIG_H
13612
Skip Montanaro6dead952003-09-25 14:50:04 +000013613ac_libobjs=
13614ac_ltlibobjs=
13615for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13616 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013617 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013619 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13620 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013621 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13622 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013623done
13624LIBOBJS=$ac_libobjs
13625
13626LTLIBOBJS=$ac_ltlibobjs
13627
13628
Martin v. Löwis11437992002-04-12 09:54:03 +000013629
Matthias Kloseb9621712010-04-24 17:59:49 +000013630
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013631: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013632ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013633ac_clean_files_save=$ac_clean_files
13634ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013635{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13636$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13637as_write_fail=0
13638cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013639#! $SHELL
13640# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013641# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013642# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013643# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013644
Martin v. Löwis11437992002-04-12 09:54:03 +000013645debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013646ac_cs_recheck=false
13647ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013648
Matthias Kloseb9621712010-04-24 17:59:49 +000013649SHELL=\${CONFIG_SHELL-$SHELL}
13650export SHELL
13651_ASEOF
13652cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13653## -------------------- ##
13654## M4sh Initialization. ##
13655## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013657# Be more Bourne compatible
13658DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013659if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013660 emulate sh
13661 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013663 # is contrary to our usage. Disable this feature.
13664 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013665 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013666else
Matthias Kloseb9621712010-04-24 17:59:49 +000013667 case `(set -o) 2>/dev/null` in #(
13668 *posix*) :
13669 set -o posix ;; #(
13670 *) :
13671 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013672esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013673fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013674
13675
Matthias Kloseb9621712010-04-24 17:59:49 +000013676as_nl='
13677'
13678export as_nl
13679# Printing a long string crashes Solaris 7 /usr/bin/printf.
13680as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13681as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13682as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13683# Prefer a ksh shell builtin over an external printf program on Solaris,
13684# but without wasting forks for bash or zsh.
13685if test -z "$BASH_VERSION$ZSH_VERSION" \
13686 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13687 as_echo='print -r --'
13688 as_echo_n='print -rn --'
13689elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13690 as_echo='printf %s\n'
13691 as_echo_n='printf %s'
13692else
13693 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13694 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13695 as_echo_n='/usr/ucb/echo -n'
13696 else
13697 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13698 as_echo_n_body='eval
13699 arg=$1;
13700 case $arg in #(
13701 *"$as_nl"*)
13702 expr "X$arg" : "X\\(.*\\)$as_nl";
13703 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13704 esac;
13705 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13706 '
13707 export as_echo_n_body
13708 as_echo_n='sh -c $as_echo_n_body as_echo'
13709 fi
13710 export as_echo_body
13711 as_echo='sh -c $as_echo_body as_echo'
13712fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013713
13714# The user is always right.
13715if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 PATH_SEPARATOR=:
13717 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13718 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13719 PATH_SEPARATOR=';'
13720 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013721fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013723
13724# IFS
13725# We need space, tab and new line, in precisely that order. Quoting is
13726# there to prevent editors from complaining about space-tab.
13727# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13728# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013729IFS=" "" $as_nl"
13730
13731# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013732case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013733 *[\\/]* ) as_myself=$0 ;;
13734 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013735for as_dir in $PATH
13736do
13737 IFS=$as_save_IFS
13738 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013739 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13740 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013741IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013742
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013743 ;;
13744esac
13745# We did not find ourselves, most probably we were run as `sh COMMAND'
13746# in which case we are not to be found in the path.
13747if test "x$as_myself" = x; then
13748 as_myself=$0
13749fi
13750if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013751 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13752 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013753fi
13754
Matthias Kloseb9621712010-04-24 17:59:49 +000013755# Unset variables that we do not need and which cause bugs (e.g. in
13756# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13757# suppresses any "Segmentation fault" message there. '((' could
13758# trigger a bug in pdksh 5.2.14.
13759for as_var in BASH_ENV ENV MAIL MAILPATH
13760do eval test x\${$as_var+set} = xset \
13761 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013762done
13763PS1='$ '
13764PS2='> '
13765PS4='+ '
13766
13767# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013768LC_ALL=C
13769export LC_ALL
13770LANGUAGE=C
13771export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013772
Matthias Kloseb9621712010-04-24 17:59:49 +000013773# CDPATH.
13774(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13775
13776
13777# as_fn_error ERROR [LINENO LOG_FD]
13778# ---------------------------------
13779# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13780# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13781# script with status $?, using 1 if that was 0.
13782as_fn_error ()
13783{
13784 as_status=$?; test $as_status -eq 0 && as_status=1
13785 if test "$3"; then
13786 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13787 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
13788 fi
13789 $as_echo "$as_me: error: $1" >&2
13790 as_fn_exit $as_status
13791} # as_fn_error
13792
13793
13794# as_fn_set_status STATUS
13795# -----------------------
13796# Set $? to STATUS, without forking.
13797as_fn_set_status ()
13798{
13799 return $1
13800} # as_fn_set_status
13801
13802# as_fn_exit STATUS
13803# -----------------
13804# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13805as_fn_exit ()
13806{
13807 set +e
13808 as_fn_set_status $1
13809 exit $1
13810} # as_fn_exit
13811
13812# as_fn_unset VAR
13813# ---------------
13814# Portably unset VAR.
13815as_fn_unset ()
13816{
13817 { eval $1=; unset $1;}
13818}
13819as_unset=as_fn_unset
13820# as_fn_append VAR VALUE
13821# ----------------------
13822# Append the text in VALUE to the end of the definition contained in VAR. Take
13823# advantage of any shell optimizations that allow amortized linear growth over
13824# repeated appends, instead of the typical quadratic growth present in naive
13825# implementations.
13826if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13827 eval 'as_fn_append ()
13828 {
13829 eval $1+=\$2
13830 }'
13831else
13832 as_fn_append ()
13833 {
13834 eval $1=\$$1\$2
13835 }
13836fi # as_fn_append
13837
13838# as_fn_arith ARG...
13839# ------------------
13840# Perform arithmetic evaluation on the ARGs, and store the result in the
13841# global $as_val. Take advantage of shells that can avoid forks. The arguments
13842# must be portable across $(()) and expr.
13843if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13844 eval 'as_fn_arith ()
13845 {
13846 as_val=$(( $* ))
13847 }'
13848else
13849 as_fn_arith ()
13850 {
13851 as_val=`expr "$@" || test $? -eq 1`
13852 }
13853fi # as_fn_arith
13854
13855
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013856if expr a : '\(a\)' >/dev/null 2>&1 &&
13857 test "X`expr 00001 : '.*\(...\)'`" = X001; then
13858 as_expr=expr
13859else
13860 as_expr=false
13861fi
13862
13863if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13864 as_basename=basename
13865else
13866 as_basename=false
13867fi
13868
Matthias Kloseb9621712010-04-24 17:59:49 +000013869if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13870 as_dirname=dirname
13871else
13872 as_dirname=false
13873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013875as_me=`$as_basename -- "$0" ||
13876$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13877 X"$0" : 'X\(//\)$' \| \
13878 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000013879$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013880 sed '/^.*\/\([^/][^/]*\)\/*$/{
13881 s//\1/
13882 q
13883 }
13884 /^X\/\(\/\/\)$/{
13885 s//\1/
13886 q
13887 }
13888 /^X\/\(\/\).*/{
13889 s//\1/
13890 q
13891 }
13892 s/.*/./; q'`
13893
Matthias Kloseb9621712010-04-24 17:59:49 +000013894# Avoid depending upon Character Ranges.
13895as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13896as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13897as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13898as_cr_digits='0123456789'
13899as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900
13901ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000013902case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013903-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000013904 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013905 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000013906 xy) ECHO_C='\c';;
13907 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13908 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013909 esac;;
13910*)
13911 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000013912esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013913
Martin v. Löwis11437992002-04-12 09:54:03 +000013914rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013915if test -d conf$$.dir; then
13916 rm -f conf$$.dir/conf$$.file
13917else
13918 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000013919 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013920fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013921if (echo >conf$$.file) 2>/dev/null; then
13922 if ln -s conf$$.file conf$$ 2>/dev/null; then
13923 as_ln_s='ln -s'
13924 # ... but there are two gotchas:
13925 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13926 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13927 # In both cases, we have to default to `cp -p'.
13928 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13929 as_ln_s='cp -p'
13930 elif ln conf$$.file conf$$ 2>/dev/null; then
13931 as_ln_s=ln
13932 else
Martin v. Löwis11437992002-04-12 09:54:03 +000013933 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000013934 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013935else
13936 as_ln_s='cp -p'
13937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013938rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13939rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000013940
Matthias Kloseb9621712010-04-24 17:59:49 +000013941
13942# as_fn_mkdir_p
13943# -------------
13944# Create "$as_dir" as a directory, including parents if necessary.
13945as_fn_mkdir_p ()
13946{
13947
13948 case $as_dir in #(
13949 -*) as_dir=./$as_dir;;
13950 esac
13951 test -d "$as_dir" || eval $as_mkdir_p || {
13952 as_dirs=
13953 while :; do
13954 case $as_dir in #(
13955 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13956 *) as_qdir=$as_dir;;
13957 esac
13958 as_dirs="'$as_qdir' $as_dirs"
13959 as_dir=`$as_dirname -- "$as_dir" ||
13960$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13961 X"$as_dir" : 'X\(//\)[^/]' \| \
13962 X"$as_dir" : 'X\(//\)$' \| \
13963 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13964$as_echo X"$as_dir" |
13965 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13966 s//\1/
13967 q
13968 }
13969 /^X\(\/\/\)[^/].*/{
13970 s//\1/
13971 q
13972 }
13973 /^X\(\/\/\)$/{
13974 s//\1/
13975 q
13976 }
13977 /^X\(\/\).*/{
13978 s//\1/
13979 q
13980 }
13981 s/.*/./; q'`
13982 test -d "$as_dir" && break
13983 done
13984 test -z "$as_dirs" || eval "mkdir $as_dirs"
13985 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
13986
13987
13988} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000013989if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013990 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000013991else
Skip Montanarof0d5f792004-08-15 14:08:23 +000013992 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000013993 as_mkdir_p=false
13994fi
13995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013996if test -x / >/dev/null 2>&1; then
13997 as_test_x='test -x'
13998else
13999 if ls -dL / >/dev/null 2>&1; then
14000 as_ls_L_option=L
14001 else
14002 as_ls_L_option=
14003 fi
14004 as_test_x='
14005 eval sh -c '\''
14006 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014007 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014008 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014009 case $1 in #(
14010 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014011 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014012 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014013 ???[sx]*):;;*)false;;esac;fi
14014 '\'' sh
14015 '
14016fi
14017as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014018
14019# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014020as_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 +000014021
14022# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014023as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014024
14025
Martin v. Löwis11437992002-04-12 09:54:03 +000014026exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014027## ----------------------------------- ##
14028## Main body of $CONFIG_STATUS script. ##
14029## ----------------------------------- ##
14030_ASEOF
14031test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014032
Matthias Kloseb9621712010-04-24 17:59:49 +000014033cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14034# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014035# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014036# values after options handling.
14037ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014038This file was extended by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +000014039generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014040
14041 CONFIG_FILES = $CONFIG_FILES
14042 CONFIG_HEADERS = $CONFIG_HEADERS
14043 CONFIG_LINKS = $CONFIG_LINKS
14044 CONFIG_COMMANDS = $CONFIG_COMMANDS
14045 $ $0 $@
14046
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014047on `(hostname || uname -n) 2>/dev/null | sed 1q`
14048"
14049
Martin v. Löwis11437992002-04-12 09:54:03 +000014050_ACEOF
14051
Matthias Kloseb9621712010-04-24 17:59:49 +000014052case $ac_config_files in *"
14053"*) set x $ac_config_files; shift; ac_config_files=$*;;
14054esac
14055
14056case $ac_config_headers in *"
14057"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14058esac
14059
14060
14061cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014062# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000014063config_files="$ac_config_files"
14064config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014065
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014066_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014067
Matthias Kloseb9621712010-04-24 17:59:49 +000014068cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014069ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014070\`$as_me' instantiates files and other configuration actions
14071from templates according to the current configuration. Unless the files
14072and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014073
Matthias Kloseb9621712010-04-24 17:59:49 +000014074Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014075
14076 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014077 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014078 --config print configuration, then exit
14079 -q, --quiet, --silent
14080 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014081 -d, --debug don't remove temporary files
14082 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014083 --file=FILE[:TEMPLATE]
14084 instantiate the configuration file FILE
14085 --header=FILE[:TEMPLATE]
14086 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014087
14088Configuration files:
14089$config_files
14090
14091Configuration headers:
14092$config_headers
14093
Matthias Kloseb9621712010-04-24 17:59:49 +000014094Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014097cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14098ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014099ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014100python config.status 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014101configured by $0, generated by GNU Autoconf 2.65,
14102 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014103
Matthias Kloseb9621712010-04-24 17:59:49 +000014104Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014105This config.status script is free software; the Free Software Foundation
14106gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014107
14108ac_pwd='$ac_pwd'
14109srcdir='$srcdir'
14110INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014111test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014112_ACEOF
14113
Matthias Kloseb9621712010-04-24 17:59:49 +000014114cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14115# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014116ac_need_defaults=:
14117while test $# != 0
14118do
14119 case $1 in
14120 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014121 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14122 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014123 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014124 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014125 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014126 ac_option=$1
14127 ac_optarg=$2
14128 ac_shift=shift
14129 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014130 esac
14131
Skip Montanaro6dead952003-09-25 14:50:04 +000014132 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014133 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014134 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14135 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014136 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014137 $as_echo "$ac_cs_version"; exit ;;
14138 --config | --confi | --conf | --con | --co | --c )
14139 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014140 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014141 debug=: ;;
14142 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014143 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014144 case $ac_optarg in
14145 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14146 esac
14147 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014148 ac_need_defaults=false;;
14149 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014150 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014151 case $ac_optarg in
14152 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14153 esac
14154 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014155 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014156 --he | --h)
14157 # Conflict between --help and --header
Matthias Kloseb9621712010-04-24 17:59:49 +000014158 as_fn_error "ambiguous option: \`$1'
14159Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014160 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014161 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014162 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14163 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14164 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014165
14166 # This is an error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 -*) as_fn_error "unrecognized option: \`$1'
14168Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014169
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014171 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014172
14173 esac
14174 shift
14175done
14176
Skip Montanaro6dead952003-09-25 14:50:04 +000014177ac_configure_extra_args=
14178
14179if $ac_cs_silent; then
14180 exec 6>/dev/null
14181 ac_configure_extra_args="$ac_configure_extra_args --silent"
14182fi
14183
14184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014185cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014186if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14188 shift
14189 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14190 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014191 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014192 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014193fi
14194
Martin v. Löwis11437992002-04-12 09:54:03 +000014195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014196cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014197exec 5>>config.log
14198{
14199 echo
14200 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14201## Running $as_me. ##
14202_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014203 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014204} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014207cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014208_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014209
Matthias Kloseb9621712010-04-24 17:59:49 +000014210cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014211
14212# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014213for ac_config_target in $ac_config_targets
14214do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014215 case $ac_config_target in
14216 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14217 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14218 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014219 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14220 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014221 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14222 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014223 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014224
Matthias Kloseb9621712010-04-24 17:59:49 +000014225 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014226 esac
14227done
14228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014229
Martin v. Löwis11437992002-04-12 09:54:03 +000014230# If the user did not use the arguments to specify the items to instantiate,
14231# then the envvar interface is used. Set only those that are not.
14232# We use the long form for the default assignment because of an extremely
14233# bizarre bug on SunOS 4.1.3.
14234if $ac_need_defaults; then
14235 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14236 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14237fi
14238
Skip Montanaro6dead952003-09-25 14:50:04 +000014239# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014240# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014241# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014242# Hook for its removal unless debugging.
14243# Note that there is a small window in which the directory will not be cleaned:
14244# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014245$debug ||
14246{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014247 tmp=
14248 trap 'exit_status=$?
14249 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14250' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014252}
Martin v. Löwis11437992002-04-12 09:54:03 +000014253# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014254
Martin v. Löwis11437992002-04-12 09:54:03 +000014255{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014256 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014257 test -n "$tmp" && test -d "$tmp"
14258} ||
14259{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014260 tmp=./conf$$-$RANDOM
14261 (umask 077 && mkdir "$tmp")
Matthias Kloseb9621712010-04-24 17:59:49 +000014262} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014263
Matthias Kloseb9621712010-04-24 17:59:49 +000014264# Set up the scripts for CONFIG_FILES section.
14265# No need to generate them if there are no CONFIG_FILES.
14266# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014267if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014268
Matthias Kloseb9621712010-04-24 17:59:49 +000014269
14270ac_cr=`echo X | tr X '\015'`
14271# On cygwin, bash can eat \r inside `` if the user requested igncr.
14272# But we know of no other shell where ac_cr would be empty at this
14273# point, so we can use a bashism as a fallback.
14274if test "x$ac_cr" = x; then
14275 eval ac_cr=\$\'\\r\'
14276fi
14277ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14278if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14279 ac_cs_awk_cr='\r'
14280else
14281 ac_cs_awk_cr=$ac_cr
14282fi
14283
14284echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014285_ACEOF
14286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287
Matthias Kloseb9621712010-04-24 17:59:49 +000014288{
14289 echo "cat >conf$$subs.awk <<_ACEOF" &&
14290 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14291 echo "_ACEOF"
14292} >conf$$subs.sh ||
14293 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14294ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014295ac_delim='%!_!# '
14296for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014297 . ./conf$$subs.sh ||
14298 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014299
Matthias Kloseb9621712010-04-24 17:59:49 +000014300 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14301 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014302 break
14303 elif $ac_last_try; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014304 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014305 else
14306 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014307 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014308done
Matthias Kloseb9621712010-04-24 17:59:49 +000014309rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014310
Matthias Kloseb9621712010-04-24 17:59:49 +000014311cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14312cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014314sed -n '
14315h
14316s/^/S["/; s/!.*/"]=/
14317p
14318g
14319s/^[^!]*!//
14320:repl
14321t repl
14322s/'"$ac_delim"'$//
14323t delim
14324:nl
14325h
14326s/\(.\{148\}\)..*/\1/
14327t more1
14328s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14329p
14330n
14331b repl
14332:more1
14333s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14334p
14335g
14336s/.\{148\}//
14337t nl
14338:delim
14339h
14340s/\(.\{148\}\)..*/\1/
14341t more2
14342s/["\\]/\\&/g; s/^/"/; s/$/"/
14343p
14344b
14345:more2
14346s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14347p
14348g
14349s/.\{148\}//
14350t delim
14351' <conf$$subs.awk | sed '
14352/^[^""]/{
14353 N
14354 s/\n//
14355}
14356' >>$CONFIG_STATUS || ac_write_fail=1
14357rm -f conf$$subs.awk
14358cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14359_ACAWK
14360cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14361 for (key in S) S_is_set[key] = 1
14362 FS = ""
14363
14364}
14365{
14366 line = $ 0
14367 nfields = split(line, field, "@")
14368 substed = 0
14369 len = length(field[1])
14370 for (i = 2; i < nfields; i++) {
14371 key = field[i]
14372 keylen = length(key)
14373 if (S_is_set[key]) {
14374 value = S[key]
14375 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14376 len += length(value) + length(field[++i])
14377 substed = 1
14378 } else
14379 len += 1 + keylen
14380 }
14381
14382 print line
14383}
14384
14385_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014387cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14388if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14389 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14390else
14391 cat
14392fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14393 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014394_ACEOF
14395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014396# VPATH may cause trouble with some makes, so we remove $(srcdir),
14397# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14398# trailing colons and then remove the whole line if VPATH becomes empty
14399# (actually we leave an empty line to preserve line numbers).
14400if test "x$srcdir" = x.; then
14401 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14402s/:*\$(srcdir):*/:/
14403s/:*\${srcdir}:*/:/
14404s/:*@srcdir@:*/:/
14405s/^\([^=]*=[ ]*\):*/\1/
14406s/:*$//
14407s/^[^=]*=[ ]*$//
14408}'
14409fi
14410
Matthias Kloseb9621712010-04-24 17:59:49 +000014411cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014412fi # test -n "$CONFIG_FILES"
14413
Matthias Kloseb9621712010-04-24 17:59:49 +000014414# Set up the scripts for CONFIG_HEADERS section.
14415# No need to generate them if there are no CONFIG_HEADERS.
14416# This happens for instance with `./config.status Makefile'.
14417if test -n "$CONFIG_HEADERS"; then
14418cat >"$tmp/defines.awk" <<\_ACAWK ||
14419BEGIN {
14420_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421
Matthias Kloseb9621712010-04-24 17:59:49 +000014422# Transform confdefs.h into an awk script `defines.awk', embedded as
14423# here-document in config.status, that substitutes the proper values into
14424# config.h.in to produce config.h.
14425
14426# Create a delimiter string that does not exist in confdefs.h, to ease
14427# handling of long lines.
14428ac_delim='%!_!# '
14429for ac_last_try in false false :; do
14430 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14431 if test -z "$ac_t"; then
14432 break
14433 elif $ac_last_try; then
14434 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14435 else
14436 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14437 fi
14438done
14439
14440# For the awk script, D is an array of macro values keyed by name,
14441# likewise P contains macro parameters if any. Preserve backslash
14442# newline sequences.
14443
14444ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14445sed -n '
14446s/.\{148\}/&'"$ac_delim"'/g
14447t rset
14448:rset
14449s/^[ ]*#[ ]*define[ ][ ]*/ /
14450t def
14451d
14452:def
14453s/\\$//
14454t bsnl
14455s/["\\]/\\&/g
14456s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14457D["\1"]=" \3"/p
14458s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14459d
14460:bsnl
14461s/["\\]/\\&/g
14462s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14463D["\1"]=" \3\\\\\\n"\\/p
14464t cont
14465s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14466t cont
14467d
14468:cont
14469n
14470s/.\{148\}/&'"$ac_delim"'/g
14471t clear
14472:clear
14473s/\\$//
14474t bsnlc
14475s/["\\]/\\&/g; s/^/"/; s/$/"/p
14476d
14477:bsnlc
14478s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14479b cont
14480' <confdefs.h | sed '
14481s/'"$ac_delim"'/"\\\
14482"/g' >>$CONFIG_STATUS || ac_write_fail=1
14483
14484cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14485 for (key in D) D_is_set[key] = 1
14486 FS = ""
14487}
14488/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14489 line = \$ 0
14490 split(line, arg, " ")
14491 if (arg[1] == "#") {
14492 defundef = arg[2]
14493 mac1 = arg[3]
14494 } else {
14495 defundef = substr(arg[1], 2)
14496 mac1 = arg[2]
14497 }
14498 split(mac1, mac2, "(") #)
14499 macro = mac2[1]
14500 prefix = substr(line, 1, index(line, defundef) - 1)
14501 if (D_is_set[macro]) {
14502 # Preserve the white space surrounding the "#".
14503 print prefix "define", macro P[macro] D[macro]
14504 next
14505 } else {
14506 # Replace #undef with comments. This is necessary, for example,
14507 # in the case of _POSIX_SOURCE, which is predefined and required
14508 # on some systems where configure will not decide to define it.
14509 if (defundef == "undef") {
14510 print "/*", prefix defundef, macro, "*/"
14511 next
14512 }
14513 }
14514}
14515{ print }
14516_ACAWK
14517_ACEOF
14518cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14519 as_fn_error "could not setup config headers machinery" "$LINENO" 5
14520fi # test -n "$CONFIG_HEADERS"
14521
14522
14523eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14524shift
14525for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014526do
14527 case $ac_tag in
14528 :[FHLC]) ac_mode=$ac_tag; continue;;
14529 esac
14530 case $ac_mode$ac_tag in
14531 :[FHL]*:*);;
Matthias Kloseb9621712010-04-24 17:59:49 +000014532 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014533 :[FH]-) ac_tag=-:-;;
14534 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14535 esac
14536 ac_save_IFS=$IFS
14537 IFS=:
14538 set x $ac_tag
14539 IFS=$ac_save_IFS
14540 shift
14541 ac_file=$1
14542 shift
14543
14544 case $ac_mode in
14545 :L) ac_source=$1;;
14546 :[FH])
14547 ac_file_inputs=
14548 for ac_f
14549 do
14550 case $ac_f in
14551 -) ac_f="$tmp/stdin";;
14552 *) # Look for the file first in the build tree, then in the source tree
14553 # (if the path is not absolute). The absolute path cannot be DOS-style,
14554 # because $ac_f cannot contain `:'.
14555 test -f "$ac_f" ||
14556 case $ac_f in
14557 [\\/$]*) false;;
14558 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14559 esac ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014560 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014561 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014562 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14563 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014564 done
14565
14566 # Let's still pretend it is `configure' which instantiates (i.e., don't
14567 # use $as_me), people would be surprised to read:
14568 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014569 configure_input='Generated from '`
14570 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14571 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014572 if test x"$ac_file" != x-; then
14573 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014574 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14575$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014577 # Neutralize special characters interpreted by sed in replacement strings.
14578 case $configure_input in #(
14579 *\&* | *\|* | *\\* )
14580 ac_sed_conf_input=`$as_echo "$configure_input" |
14581 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14582 *) ac_sed_conf_input=$configure_input;;
14583 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014584
14585 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 *:-:* | *:-) cat >"$tmp/stdin" \
14587 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014588 esac
14589 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014590 esac
14591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014592 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014593$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014594 X"$ac_file" : 'X\(//\)[^/]' \| \
14595 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014596 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014597$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014598 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14599 s//\1/
14600 q
14601 }
14602 /^X\(\/\/\)[^/].*/{
14603 s//\1/
14604 q
14605 }
14606 /^X\(\/\/\)$/{
14607 s//\1/
14608 q
14609 }
14610 /^X\(\/\).*/{
14611 s//\1/
14612 q
14613 }
14614 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014615 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014616 ac_builddir=.
14617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014618case "$ac_dir" in
14619.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14620*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014621 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014622 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014623 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014624 case $ac_top_builddir_sub in
14625 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14626 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14627 esac ;;
14628esac
14629ac_abs_top_builddir=$ac_pwd
14630ac_abs_builddir=$ac_pwd$ac_dir_suffix
14631# for backward compatibility:
14632ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014633
14634case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014636 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014637 ac_top_srcdir=$ac_top_builddir_sub
14638 ac_abs_top_srcdir=$ac_pwd ;;
14639 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014640 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014641 ac_top_srcdir=$srcdir
14642 ac_abs_top_srcdir=$srcdir ;;
14643 *) # Relative name.
14644 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14645 ac_top_srcdir=$ac_top_build_prefix$srcdir
14646 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014647esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014648ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014649
Martin v. Löwis11437992002-04-12 09:54:03 +000014650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014651 case $ac_mode in
14652 :F)
14653 #
14654 # CONFIG_FILE
14655 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014656
14657 case $INSTALL in
14658 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014659 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014660 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014661_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014662
Matthias Kloseb9621712010-04-24 17:59:49 +000014663cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014664# If the template does not know about datarootdir, expand it.
14665# FIXME: This hack should be removed a few years after 2.60.
14666ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014667ac_sed_dataroot='
14668/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014669 p
14670 q
14671}
14672/@datadir@/p
14673/@docdir@/p
14674/@infodir@/p
14675/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014676/@mandir@/p'
14677case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678*datarootdir*) ac_datarootdir_seen=yes;;
14679*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014680 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14681$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014683cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014684 ac_datarootdir_hack='
14685 s&@datadir@&$datadir&g
14686 s&@docdir@&$docdir&g
14687 s&@infodir@&$infodir&g
14688 s&@localedir@&$localedir&g
14689 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014690 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014691esac
14692_ACEOF
14693
14694# Neutralize VPATH when `$srcdir' = `.'.
14695# Shell code in configure.ac might set extrasub.
14696# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014697cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14698ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014699$extrasub
14700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014701cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014702:t
14703/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014704s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014705s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014706s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014707s&@srcdir@&$ac_srcdir&;t t
14708s&@abs_srcdir@&$ac_abs_srcdir&;t t
14709s&@top_srcdir@&$ac_top_srcdir&;t t
14710s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14711s&@builddir@&$ac_builddir&;t t
14712s&@abs_builddir@&$ac_abs_builddir&;t t
14713s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14714s&@INSTALL@&$ac_INSTALL&;t t
14715$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014716"
14717eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
14718 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014720test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14721 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14722 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014724which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014725$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014726which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014728 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014729 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014730 -) cat "$tmp/out" && rm -f "$tmp/out";;
14731 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14732 esac \
14733 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014734 ;;
14735 :H)
14736 #
14737 # CONFIG_HEADER
14738 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014739 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014740 {
14741 $as_echo "/* $configure_input */" \
14742 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14743 } >"$tmp/config.h" \
14744 || as_fn_error "could not create $ac_file" "$LINENO" 5
14745 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14746 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14747$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014748 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 rm -f "$ac_file"
14750 mv "$tmp/config.h" "$ac_file" \
14751 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014752 fi
14753 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014754 $as_echo "/* $configure_input */" \
14755 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
14756 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014757 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014758 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014760
14761 esac
14762
14763done # for ac_tag
14764
Guido van Rossum627b2d71993-12-24 10:39:16 +000014765
Matthias Kloseb9621712010-04-24 17:59:49 +000014766as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014767_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014768ac_clean_files=$ac_clean_files_save
14769
Matthias Kloseb9621712010-04-24 17:59:49 +000014770test $ac_write_fail = 0 ||
14771 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14772
Martin v. Löwis11437992002-04-12 09:54:03 +000014773
14774# configure is writing to config.log, and then calls config.status.
14775# config.status does its own redirection, appending to config.log.
14776# Unfortunately, on DOS this fails, as config.log is still kept open
14777# by configure, so config.status won't be able to write to it; its
14778# output is simply discarded. So we exec the FD to /dev/null,
14779# effectively closing config.log, so it can be properly (re)opened and
14780# appended to by config.status. When coming back to configure, we
14781# need to make the FD available again.
14782if test "$no_create" != yes; then
14783 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014784 ac_config_status_args=
14785 test "$silent" = yes &&
14786 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000014787 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000014788 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000014789 exec 5>>config.log
14790 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14791 # would make configure fail if this is the last instruction.
Matthias Kloseb9621712010-04-24 17:59:49 +000014792 $ac_cs_success || as_fn_exit $?
14793fi
14794if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14796$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014797fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014798
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014799
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014800echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014801if test ! -f Modules/Setup
14802then
14803 cp $srcdir/Modules/Setup.dist Modules/Setup
14804fi
14805
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014806echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014807if test ! -f Modules/Setup.local
14808then
14809 echo "# Edit this file for local setup changes" >Modules/Setup.local
14810fi
14811
14812echo "creating Makefile"
14813$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
14814 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000014815 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014816mv config.c Modules