blob: 0489c7ab2c9cf48c866bba70ed22c4e797ef189f [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klosec511b472010-05-08 11:01:39 +00002# From configure.in Revision: 80966 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004# Generated by GNU Autoconf 2.65 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Martin v. Löwiseba40652007-08-30 20:10:57 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 Klosea0bea5d2010-05-08 10:00:28 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Martin v. Löwiseba40652007-08-30 20:10:57 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 Klosea0bea5d2010-05-08 10:00:28 +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+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
37
Skip Montanaro6dead952003-09-25 14:50:04 +000038
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 Klosea0bea5d2010-05-08 10:00:28 +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 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Martin v. Löwiseba40652007-08-30 20:10:57 +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.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000095case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000116fi
117
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000135
Matthias Klosea0bea5d2010-05-08 10:00:28 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +0000392if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
393 as_dirname=dirname
394else
395 as_dirname=false
396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000397
Martin v. Löwiseba40652007-08-30 20:10:57 +0000398as_me=`$as_basename -- "$0" ||
399$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
400 X"$0" : 'X\(//\)$' \| \
401 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000402$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000423
424
Matthias Klosea0bea5d2010-05-08 10:00:28 +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. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000430 sed -n '
431 p
432 /[$]LINENO/=
433 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000434 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000435 s/[$]LINENO.*/&-/
436 t lineno
437 b
438 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000439 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000440 :loop
441 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000443 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000444 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000445 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000457case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000458-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000459 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000460 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000461 xy) ECHO_C='\c';;
462 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
463 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000464 esac;;
465*)
466 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000467esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000468
Martin v. Löwis11437992002-04-12 09:54:03 +0000469rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000470if test -d conf$$.dir; then
471 rm -f conf$$.dir/conf$$.file
472else
473 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000474 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000475fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 Klosea0bea5d2010-05-08 10:00:28 +0000489 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000490else
491 as_ln_s='cp -p'
492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +0000514 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000515 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000516 case $1 in #(
517 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000518 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000519 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000545ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000546ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +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'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000556PACKAGE_VERSION='2.7'
557PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000558PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +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>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000565#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# include <sys/types.h>
567#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000569# include <sys/stat.h>
570#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000571#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000572# include <stdlib.h>
573# include <stddef.h>
574#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000575# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <stdlib.h>
577# endif
578#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000585#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000586# include <strings.h>
587#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000588#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000590#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +0000598ac_subst_vars='LTLIBOBJS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000599SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000600THREADHEADERS
601UNICODE_OBJS
602LIBC
603LIBM
604HAVE_GETHOSTBYNAME
605HAVE_GETHOSTBYNAME_R
606HAVE_GETHOSTBYNAME_R_3_ARG
607HAVE_GETHOSTBYNAME_R_5_ARG
608HAVE_GETHOSTBYNAME_R_6_ARG
609LIBOBJS
610TRUE
611MACHDEP_OBJS
612DYNLOADFILE
613DLINCLDIR
614THREADOBJ
615LDLAST
616USE_THREAD_MODULE
617SIGNAL_OBJS
618USE_SIGNAL_MODULE
619LIBFFI_INCLUDEDIR
620PKG_CONFIG
621SHLIBS
622CFLAGSFORSHARED
623LINKFORSHARED
624CCSHARED
625BLDSHARED
626LDCXXSHARED
627LDSHARED
628SO
629LIBTOOL_CRUFT
630OTHER_LIBTOOL_OPT
631UNIVERSAL_ARCH_FLAGS
632BASECFLAGS
633OPT
634LN
635INSTALL_DATA
636INSTALL_SCRIPT
637INSTALL_PROGRAM
638SVNVERSION
639ARFLAGS
640AR
641RANLIB
642GNULD
643LINKCC
644RUNSHARED
645INSTSONAME
646LDLIBRARYDIR
647BLDLIBRARY
648DLLLIBRARY
649LDLIBRARY
650LIBRARY
651BUILDEXEEXT
652EGREP
653GREP
654CPP
655MAINCC
656CXX
657OBJEXT
658EXEEXT
659ac_ct_CC
660CPPFLAGS
661LDFLAGS
662CFLAGS
663CC
664EXPORT_MACOSX_DEPLOYMENT_TARGET
665CONFIGURE_MACOSX_DEPLOYMENT_TARGET
666EXTRAMACHDEPPATH
667EXTRAPLATDIR
668SGI_ABI
669MACHDEP
670FRAMEWORKINSTALLAPPSPREFIX
671FRAMEWORKUNIXTOOLSPREFIX
672FRAMEWORKALTINSTALLLAST
673FRAMEWORKALTINSTALLFIRST
674FRAMEWORKINSTALLLAST
675FRAMEWORKINSTALLFIRST
676PYTHONFRAMEWORKINSTALLDIR
677PYTHONFRAMEWORKPREFIX
678PYTHONFRAMEWORKDIR
679PYTHONFRAMEWORKIDENTIFIER
680PYTHONFRAMEWORK
681LIPO_32BIT_FLAGS
682ARCH_RUN_32BIT
683UNIVERSALSDK
684CONFIG_ARGS
685SOVERSION
686VERSION
687target_alias
688host_alias
689build_alias
690LIBS
691ECHO_T
692ECHO_N
693ECHO_C
694DEFS
695mandir
696localedir
697libdir
698psdir
699pdfdir
700dvidir
701htmldir
702infodir
703docdir
704oldincludedir
705includedir
706localstatedir
707sharedstatedir
708sysconfdir
709datadir
710datarootdir
711libexecdir
712sbindir
713bindir
714program_transform_name
715prefix
716exec_prefix
717PACKAGE_URL
718PACKAGE_BUGREPORT
719PACKAGE_STRING
720PACKAGE_VERSION
721PACKAGE_TARNAME
722PACKAGE_NAME
723PATH_SEPARATOR
724SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000725ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000726ac_user_opts='
727enable_option_checking
728enable_universalsdk
729with_universal_archs
730with_framework_name
731enable_framework
732with_gcc
733with_cxx_main
734with_suffix
735enable_shared
736enable_profiling
737with_pydebug
738enable_toolbox_glue
739with_libs
740with_system_expat
741with_system_ffi
742with_dbmliborder
743with_signal_module
744with_dec_threads
745with_threads
746with_thread
747with_pth
748enable_ipv6
749with_doc_strings
750with_tsc
751with_pymalloc
752with_valgrind
753with_wctype_functions
754with_fpectl
755with_libm
756with_libc
757enable_big_digits
758enable_unicode
759'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000760 ac_precious_vars='build_alias
761host_alias
762target_alias
763CC
764CFLAGS
765LDFLAGS
766LIBS
767CPPFLAGS
768CPP'
769
Guido van Rossum627b2d71993-12-24 10:39:16 +0000770
Guido van Rossum7f43da71994-08-01 12:15:30 +0000771# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000772ac_init_help=
773ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000774ac_unrecognized_opts=
775ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000776# The variables have the same names as the options, with
777# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000778cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000779exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000780no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000781no_recursion=
782prefix=NONE
783program_prefix=NONE
784program_suffix=NONE
785program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000786silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000788srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000790x_includes=NONE
791x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000792
793# Installation directory options.
794# These are left unexpanded so users can "make install exec_prefix=/foo"
795# and all the variables that are supposed to be based on exec_prefix
796# by default will actually change.
797# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000798# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000799bindir='${exec_prefix}/bin'
800sbindir='${exec_prefix}/sbin'
801libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000802datarootdir='${prefix}/share'
803datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000804sysconfdir='${prefix}/etc'
805sharedstatedir='${prefix}/com'
806localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000807includedir='${prefix}/include'
808oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000809docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
810infodir='${datarootdir}/info'
811htmldir='${docdir}'
812dvidir='${docdir}'
813pdfdir='${docdir}'
814psdir='${docdir}'
815libdir='${exec_prefix}/lib'
816localedir='${datarootdir}/locale'
817mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000818
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000820ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000822do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823 # If the previous option needs an argument, assign it.
824 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000825 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826 ac_prev=
827 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000828 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Martin v. Löwiseba40652007-08-30 20:10:57 +0000830 case $ac_option in
831 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
832 *) ac_optarg=yes ;;
833 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000835 # Accept the important Cygnus configure options, so we can diagnose typos.
836
Martin v. Löwiseba40652007-08-30 20:10:57 +0000837 case $ac_dashdash$ac_option in
838 --)
839 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 -bindir | --bindir | --bindi | --bind | --bin | --bi)
842 ac_prev=bindir ;;
843 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000844 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845
846 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000847 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000848 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851 -cache-file | --cache-file | --cache-fil | --cache-fi \
852 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
853 ac_prev=cache_file ;;
854 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
855 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000856 cache_file=$ac_optarg ;;
857
858 --config-cache | -C)
859 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860
Martin v. Löwiseba40652007-08-30 20:10:57 +0000861 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000863 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000864 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000865
Martin v. Löwiseba40652007-08-30 20:10:57 +0000866 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
867 | --dataroo | --dataro | --datar)
868 ac_prev=datarootdir ;;
869 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
870 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
871 datarootdir=$ac_optarg ;;
872
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000874 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000876 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
877 as_fn_error "invalid feature name: $ac_useropt"
878 ac_useropt_orig=$ac_useropt
879 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
880 case $ac_user_opts in
881 *"
882"enable_$ac_useropt"
883"*) ;;
884 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
885 ac_unrecognized_sep=', ';;
886 esac
887 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000888
889 -docdir | --docdir | --docdi | --doc | --do)
890 ac_prev=docdir ;;
891 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
892 docdir=$ac_optarg ;;
893
894 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
895 ac_prev=dvidir ;;
896 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
897 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898
899 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000900 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000902 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
903 as_fn_error "invalid feature name: $ac_useropt"
904 ac_useropt_orig=$ac_useropt
905 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
906 case $ac_user_opts in
907 *"
908"enable_$ac_useropt"
909"*) ;;
910 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
911 ac_unrecognized_sep=', ';;
912 esac
913 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
916 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
917 | --exec | --exe | --ex)
918 ac_prev=exec_prefix ;;
919 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
920 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
921 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
924 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925 # Obsolete; use --with-gas.
926 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 -help | --help | --hel | --he | -h)
929 ac_init_help=long ;;
930 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
931 ac_init_help=recursive ;;
932 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
933 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
935 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
Martin v. Löwiseba40652007-08-30 20:10:57 +0000940 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
941 ac_prev=htmldir ;;
942 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
943 | --ht=*)
944 htmldir=$ac_optarg ;;
945
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 -includedir | --includedir | --includedi | --included | --include \
947 | --includ | --inclu | --incl | --inc)
948 ac_prev=includedir ;;
949 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
950 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952
953 -infodir | --infodir | --infodi | --infod | --info | --inf)
954 ac_prev=infodir ;;
955 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
958 -libdir | --libdir | --libdi | --libd)
959 ac_prev=libdir ;;
960 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962
963 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
964 | --libexe | --libex | --libe)
965 ac_prev=libexecdir ;;
966 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
967 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
Martin v. Löwiseba40652007-08-30 20:10:57 +0000970 -localedir | --localedir | --localedi | --localed | --locale)
971 ac_prev=localedir ;;
972 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
973 localedir=$ac_optarg ;;
974
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000976 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977 ac_prev=localstatedir ;;
978 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000979 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981
982 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
983 ac_prev=mandir ;;
984 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988 # Obsolete; use --without-fp.
989 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000992 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993 no_create=yes ;;
994
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
996 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
997 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1000 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1001 | --oldin | --oldi | --old | --ol | --o)
1002 ac_prev=oldincludedir ;;
1003 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1004 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1005 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001007
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1009 ac_prev=prefix ;;
1010 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
1013 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1014 | --program-pre | --program-pr | --program-p)
1015 ac_prev=program_prefix ;;
1016 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1017 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
1020 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1021 | --program-suf | --program-su | --program-s)
1022 ac_prev=program_suffix ;;
1023 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1024 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -program-transform-name | --program-transform-name \
1028 | --program-transform-nam | --program-transform-na \
1029 | --program-transform-n | --program-transform- \
1030 | --program-transform | --program-transfor \
1031 | --program-transfo | --program-transf \
1032 | --program-trans | --program-tran \
1033 | --progr-tra | --program-tr | --program-t)
1034 ac_prev=program_transform_name ;;
1035 -program-transform-name=* | --program-transform-name=* \
1036 | --program-transform-nam=* | --program-transform-na=* \
1037 | --program-transform-n=* | --program-transform-=* \
1038 | --program-transform=* | --program-transfor=* \
1039 | --program-transfo=* | --program-transf=* \
1040 | --program-trans=* | --program-tran=* \
1041 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043
Martin v. Löwiseba40652007-08-30 20:10:57 +00001044 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1045 ac_prev=pdfdir ;;
1046 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1047 pdfdir=$ac_optarg ;;
1048
1049 -psdir | --psdir | --psdi | --psd | --ps)
1050 ac_prev=psdir ;;
1051 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1052 psdir=$ac_optarg ;;
1053
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1055 | -silent | --silent | --silen | --sile | --sil)
1056 silent=yes ;;
1057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1059 ac_prev=sbindir ;;
1060 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1061 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
1064 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1065 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1066 | --sharedst | --shareds | --shared | --share | --shar \
1067 | --sha | --sh)
1068 ac_prev=sharedstatedir ;;
1069 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1070 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1071 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1072 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075 -site | --site | --sit)
1076 ac_prev=site ;;
1077 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1081 ac_prev=srcdir ;;
1082 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001085 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1086 | --syscon | --sysco | --sysc | --sys | --sy)
1087 ac_prev=sysconfdir ;;
1088 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1089 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1098 verbose=yes ;;
1099
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 -version | --version | --versio | --versi | --vers | -V)
1101 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001104 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001106 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1107 as_fn_error "invalid package name: $ac_useropt"
1108 ac_useropt_orig=$ac_useropt
1109 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1110 case $ac_user_opts in
1111 *"
1112"with_$ac_useropt"
1113"*) ;;
1114 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1115 ac_unrecognized_sep=', ';;
1116 esac
1117 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001120 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001121 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001122 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1123 as_fn_error "invalid package name: $ac_useropt"
1124 ac_useropt_orig=$ac_useropt
1125 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1126 case $ac_user_opts in
1127 *"
1128"with_$ac_useropt"
1129"*) ;;
1130 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1131 ac_unrecognized_sep=', ';;
1132 esac
1133 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 --x)
1136 # Obsolete; use --with-x.
1137 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
1139 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1140 | --x-incl | --x-inc | --x-in | --x-i)
1141 ac_prev=x_includes ;;
1142 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1143 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145
1146 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1147 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1148 ac_prev=x_libraries ;;
1149 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1150 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001153 -*) as_fn_error "unrecognized option: \`$ac_option'
1154Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155 ;;
1156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 *=*)
1158 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1159 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001160 case $ac_envvar in #(
1161 '' | [0-9]* | *[!_$as_cr_alnum]* )
1162 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1163 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001164 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 export $ac_envvar ;;
1166
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001169 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001171 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173 ;;
1174
1175 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001176done
1177
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001180 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181fi
1182
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001183if test -n "$ac_unrecognized_opts"; then
1184 case $enable_option_checking in
1185 no) ;;
1186 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1187 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1188 esac
1189fi
1190
1191# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001192for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1193 datadir sysconfdir sharedstatedir localstatedir includedir \
1194 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1195 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001197 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001198 # Remove trailing slashes.
1199 case $ac_val in
1200 */ )
1201 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1202 eval $ac_var=\$ac_val;;
1203 esac
1204 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001205 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001206 [\\/$]* | ?:[\\/]* ) continue;;
1207 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001209 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001210done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001211
Martin v. Löwis11437992002-04-12 09:54:03 +00001212# There might be people who depend on the old broken behavior: `$host'
1213# used to hold the argument of --host etc.
1214# FIXME: To remove some day.
1215build=$build_alias
1216host=$host_alias
1217target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001218
Martin v. Löwis11437992002-04-12 09:54:03 +00001219# FIXME: To remove some day.
1220if test "x$host_alias" != x; then
1221 if test "x$build_alias" = x; then
1222 cross_compiling=maybe
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001223 $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 +00001224 If a cross compiler is detected then cross compile mode will be used." >&2
1225 elif test "x$build_alias" != "x$host_alias"; then
1226 cross_compiling=yes
1227 fi
1228fi
1229
1230ac_tool_prefix=
1231test -n "$host_alias" && ac_tool_prefix=$host_alias-
1232
1233test "$silent" = yes && exec 6>/dev/null
1234
Guido van Rossum627b2d71993-12-24 10:39:16 +00001235
Martin v. Löwiseba40652007-08-30 20:10:57 +00001236ac_pwd=`pwd` && test -n "$ac_pwd" &&
1237ac_ls_di=`ls -di .` &&
1238ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001239 as_fn_error "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001240test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001241 as_fn_error "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001242
1243
Guido van Rossum627b2d71993-12-24 10:39:16 +00001244# Find the source files, if location was not specified.
1245if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001247 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001248 ac_confdir=`$as_dirname -- "$as_myself" ||
1249$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1250 X"$as_myself" : 'X\(//\)[^/]' \| \
1251 X"$as_myself" : 'X\(//\)$' \| \
1252 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1253$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001254 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1255 s//\1/
1256 q
1257 }
1258 /^X\(\/\/\)[^/].*/{
1259 s//\1/
1260 q
1261 }
1262 /^X\(\/\/\)$/{
1263 s//\1/
1264 q
1265 }
1266 /^X\(\/\).*/{
1267 s//\1/
1268 q
1269 }
1270 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001272 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273 srcdir=..
1274 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001275else
1276 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001278if test ! -r "$srcdir/$ac_unique_file"; then
1279 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001280 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001282ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1283ac_abs_confdir=`(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001284 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001285 pwd)`
1286# When building in place, set srcdir=.
1287if test "$ac_abs_confdir" = "$ac_pwd"; then
1288 srcdir=.
1289fi
1290# Remove unnecessary trailing slashes from srcdir.
1291# Double slashes in file names in object file debugging info
1292# mess up M-x gdb in Emacs.
1293case $srcdir in
1294*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1295esac
1296for ac_var in $ac_precious_vars; do
1297 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1298 eval ac_env_${ac_var}_value=\$${ac_var}
1299 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1300 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1301done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001302
Martin v. Löwis11437992002-04-12 09:54:03 +00001303#
1304# Report the --help message.
1305#
1306if test "$ac_init_help" = "long"; then
1307 # Omit some internal or obsolete options to make the list less imposing.
1308 # This message is too long to be a string in the A/UX 3.1 sh.
1309 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001310\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001311
1312Usage: $0 [OPTION]... [VAR=VALUE]...
1313
1314To assign environment variables (e.g., CC, CFLAGS...), specify them as
1315VAR=VALUE. See below for descriptions of some of the useful variables.
1316
1317Defaults for the options are specified in brackets.
1318
1319Configuration:
1320 -h, --help display this help and exit
1321 --help=short display options specific to this package
1322 --help=recursive display the short help of all the included packages
1323 -V, --version display version information and exit
1324 -q, --quiet, --silent do not print \`checking...' messages
1325 --cache-file=FILE cache test results in FILE [disabled]
1326 -C, --config-cache alias for \`--cache-file=config.cache'
1327 -n, --no-create do not create output files
1328 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1329
Martin v. Löwis11437992002-04-12 09:54:03 +00001330Installation directories:
1331 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001332 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001333 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001334 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001335
1336By default, \`make install' will install all the files in
1337\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1338an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1339for instance \`--prefix=\$HOME'.
1340
1341For better control, use the options below.
1342
1343Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001344 --bindir=DIR user executables [EPREFIX/bin]
1345 --sbindir=DIR system admin executables [EPREFIX/sbin]
1346 --libexecdir=DIR program executables [EPREFIX/libexec]
1347 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1348 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1349 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1350 --libdir=DIR object code libraries [EPREFIX/lib]
1351 --includedir=DIR C header files [PREFIX/include]
1352 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1353 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1354 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1355 --infodir=DIR info documentation [DATAROOTDIR/info]
1356 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1357 --mandir=DIR man documentation [DATAROOTDIR/man]
1358 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1359 --htmldir=DIR html documentation [DOCDIR]
1360 --dvidir=DIR dvi documentation [DOCDIR]
1361 --pdfdir=DIR pdf documentation [DOCDIR]
1362 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001363_ACEOF
1364
1365 cat <<\_ACEOF
1366_ACEOF
1367fi
1368
1369if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001370 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001371 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001372 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 cat <<\_ACEOF
1374
1375Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001376 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001377 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1378 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001379 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001380 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001381 --enable-framework[=INSTALLDIR]
1382 Build (MacOSX|Darwin) framework
1383 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001384 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001385 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1386 --enable-ipv6 Enable ipv6 (with ipv4) support
1387 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001388 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001389 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001390 --enable-unicode[=ucs[24]]
1391 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393Optional Packages:
1394 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1395 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001396 --with-universal-archs=ARCH
1397 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001398 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001399 --with-framework-name=FRAMEWORK
1400 specify an alternate name of the framework built
1401 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001402 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001403 --with-cxx-main=<compiler>
1404 compile main() and link python executable with C++
1405 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001406 --with-suffix=.exe set executable suffix
1407 --with-pydebug build with Py_DEBUG defined
1408 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001409 --with-system-expat build pyexpat module using an installed expat
1410 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001411 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001412 --with-dbmliborder=db1:db2:...
1413 order to check db backends for dbm. Valid value is a
1414 colon separated string with the backend names
1415 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001416 --with-signal-module disable/enable signal module
1417 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1418 --with(out)-threads[=DIRECTORY]
1419 disable/enable thread support
1420 --with(out)-thread[=DIRECTORY]
1421 deprecated; use --with(out)-threads
1422 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001423 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001424 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001425 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001426 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001427 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001428 --with-fpectl enable SIGFPE catching
1429 --with-libm=STRING math library
1430 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001431
1432Some influential environment variables:
1433 CC C compiler command
1434 CFLAGS C compiler flags
1435 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1436 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001437 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001438 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001439 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 CPP C preprocessor
1441
1442Use these variables to override the choices made by `configure' or to help
1443it to find libraries and programs with nonstandard names/locations.
1444
Georg Brandl464432d2009-05-20 18:24:08 +00001445Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001446_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001447ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001448fi
1449
1450if test "$ac_init_help" = "recursive"; then
1451 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001452 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001453 test -d "$ac_dir" ||
1454 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1455 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001456 ac_builddir=.
1457
Martin v. Löwiseba40652007-08-30 20:10:57 +00001458case "$ac_dir" in
1459.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1460*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001461 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001462 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001463 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001464 case $ac_top_builddir_sub in
1465 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1466 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1467 esac ;;
1468esac
1469ac_abs_top_builddir=$ac_pwd
1470ac_abs_builddir=$ac_pwd$ac_dir_suffix
1471# for backward compatibility:
1472ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001473
1474case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001475 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001477 ac_top_srcdir=$ac_top_builddir_sub
1478 ac_abs_top_srcdir=$ac_pwd ;;
1479 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001481 ac_top_srcdir=$srcdir
1482 ac_abs_top_srcdir=$srcdir ;;
1483 *) # Relative name.
1484 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1485 ac_top_srcdir=$ac_top_build_prefix$srcdir
1486 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001487esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001488ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001489
Martin v. Löwiseba40652007-08-30 20:10:57 +00001490 cd "$ac_dir" || { ac_status=$?; continue; }
1491 # Check for guested configure.
1492 if test -f "$ac_srcdir/configure.gnu"; then
1493 echo &&
1494 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1495 elif test -f "$ac_srcdir/configure"; then
1496 echo &&
1497 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001498 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001499 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001500 fi || ac_status=$?
1501 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001502 done
1503fi
1504
Martin v. Löwiseba40652007-08-30 20:10:57 +00001505test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001506if $ac_init_version; then
1507 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001508python configure 2.7
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001509generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001510
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001511Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001512This configure script is free software; the Free Software Foundation
1513gives unlimited permission to copy, distribute and modify it.
1514_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001515 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001516fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001517
1518## ------------------------ ##
1519## Autoconf initialization. ##
1520## ------------------------ ##
1521
1522# ac_fn_c_try_compile LINENO
1523# --------------------------
1524# Try to compile conftest.$ac_ext, and return whether this succeeded.
1525ac_fn_c_try_compile ()
1526{
1527 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1528 rm -f conftest.$ac_objext
1529 if { { ac_try="$ac_compile"
1530case "(($ac_try" in
1531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1532 *) ac_try_echo=$ac_try;;
1533esac
1534eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1535$as_echo "$ac_try_echo"; } >&5
1536 (eval "$ac_compile") 2>conftest.err
1537 ac_status=$?
1538 if test -s conftest.err; then
1539 grep -v '^ *+' conftest.err >conftest.er1
1540 cat conftest.er1 >&5
1541 mv -f conftest.er1 conftest.err
1542 fi
1543 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1544 test $ac_status = 0; } && {
1545 test -z "$ac_c_werror_flag" ||
1546 test ! -s conftest.err
1547 } && test -s conftest.$ac_objext; then :
1548 ac_retval=0
1549else
1550 $as_echo "$as_me: failed program was:" >&5
1551sed 's/^/| /' conftest.$ac_ext >&5
1552
1553 ac_retval=1
1554fi
1555 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1556 as_fn_set_status $ac_retval
1557
1558} # ac_fn_c_try_compile
1559
1560# ac_fn_c_try_cpp LINENO
1561# ----------------------
1562# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1563ac_fn_c_try_cpp ()
1564{
1565 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1566 if { { ac_try="$ac_cpp conftest.$ac_ext"
1567case "(($ac_try" in
1568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1569 *) ac_try_echo=$ac_try;;
1570esac
1571eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1572$as_echo "$ac_try_echo"; } >&5
1573 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1574 ac_status=$?
1575 if test -s conftest.err; then
1576 grep -v '^ *+' conftest.err >conftest.er1
1577 cat conftest.er1 >&5
1578 mv -f conftest.er1 conftest.err
1579 fi
1580 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1581 test $ac_status = 0; } >/dev/null && {
1582 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1583 test ! -s conftest.err
1584 }; then :
1585 ac_retval=0
1586else
1587 $as_echo "$as_me: failed program was:" >&5
1588sed 's/^/| /' conftest.$ac_ext >&5
1589
1590 ac_retval=1
1591fi
1592 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1593 as_fn_set_status $ac_retval
1594
1595} # ac_fn_c_try_cpp
1596
1597# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1598# -------------------------------------------------------
1599# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1600# the include files in INCLUDES and setting the cache variable VAR
1601# accordingly.
1602ac_fn_c_check_header_mongrel ()
1603{
1604 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1605 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1607$as_echo_n "checking for $2... " >&6; }
1608if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1609 $as_echo_n "(cached) " >&6
1610fi
1611eval ac_res=\$$3
1612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1613$as_echo "$ac_res" >&6; }
1614else
1615 # Is the header compilable?
1616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1617$as_echo_n "checking $2 usability... " >&6; }
1618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1619/* end confdefs.h. */
1620$4
1621#include <$2>
1622_ACEOF
1623if ac_fn_c_try_compile "$LINENO"; then :
1624 ac_header_compiler=yes
1625else
1626 ac_header_compiler=no
1627fi
1628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1630$as_echo "$ac_header_compiler" >&6; }
1631
1632# Is the header present?
1633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1634$as_echo_n "checking $2 presence... " >&6; }
1635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1636/* end confdefs.h. */
1637#include <$2>
1638_ACEOF
1639if ac_fn_c_try_cpp "$LINENO"; then :
1640 ac_header_preproc=yes
1641else
1642 ac_header_preproc=no
1643fi
1644rm -f conftest.err conftest.$ac_ext
1645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1646$as_echo "$ac_header_preproc" >&6; }
1647
1648# So? What about this header?
1649case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1650 yes:no: )
1651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1652$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1654$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1655 ;;
1656 no:yes:* )
1657 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1658$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1659 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1660$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1662$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1663 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1664$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1666$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1667( cat <<\_ASBOX
1668## -------------------------------------- ##
1669## Report this to http://bugs.python.org/ ##
1670## -------------------------------------- ##
1671_ASBOX
1672 ) | sed "s/^/$as_me: WARNING: /" >&2
1673 ;;
1674esac
1675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1676$as_echo_n "checking for $2... " >&6; }
1677if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1678 $as_echo_n "(cached) " >&6
1679else
1680 eval "$3=\$ac_header_compiler"
1681fi
1682eval ac_res=\$$3
1683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1684$as_echo "$ac_res" >&6; }
1685fi
1686 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1687
1688} # ac_fn_c_check_header_mongrel
1689
1690# ac_fn_c_try_run LINENO
1691# ----------------------
1692# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1693# that executables *can* be run.
1694ac_fn_c_try_run ()
1695{
1696 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1697 if { { ac_try="$ac_link"
1698case "(($ac_try" in
1699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1700 *) ac_try_echo=$ac_try;;
1701esac
1702eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1703$as_echo "$ac_try_echo"; } >&5
1704 (eval "$ac_link") 2>&5
1705 ac_status=$?
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1708 { { case "(($ac_try" in
1709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1710 *) ac_try_echo=$ac_try;;
1711esac
1712eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1713$as_echo "$ac_try_echo"; } >&5
1714 (eval "$ac_try") 2>&5
1715 ac_status=$?
1716 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1717 test $ac_status = 0; }; }; then :
1718 ac_retval=0
1719else
1720 $as_echo "$as_me: program exited with status $ac_status" >&5
1721 $as_echo "$as_me: failed program was:" >&5
1722sed 's/^/| /' conftest.$ac_ext >&5
1723
1724 ac_retval=$ac_status
1725fi
1726 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1727 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1728 as_fn_set_status $ac_retval
1729
1730} # ac_fn_c_try_run
1731
1732# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1733# -------------------------------------------------------
1734# Tests whether HEADER exists and can be compiled using the include files in
1735# INCLUDES, setting the cache variable VAR accordingly.
1736ac_fn_c_check_header_compile ()
1737{
1738 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1740$as_echo_n "checking for $2... " >&6; }
1741if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1742 $as_echo_n "(cached) " >&6
1743else
1744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1745/* end confdefs.h. */
1746$4
1747#include <$2>
1748_ACEOF
1749if ac_fn_c_try_compile "$LINENO"; then :
1750 eval "$3=yes"
1751else
1752 eval "$3=no"
1753fi
1754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1755fi
1756eval ac_res=\$$3
1757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1758$as_echo "$ac_res" >&6; }
1759 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1760
1761} # ac_fn_c_check_header_compile
1762
1763# ac_fn_c_try_link LINENO
1764# -----------------------
1765# Try to link conftest.$ac_ext, and return whether this succeeded.
1766ac_fn_c_try_link ()
1767{
1768 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1769 rm -f conftest.$ac_objext conftest$ac_exeext
1770 if { { ac_try="$ac_link"
1771case "(($ac_try" in
1772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1773 *) ac_try_echo=$ac_try;;
1774esac
1775eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1776$as_echo "$ac_try_echo"; } >&5
1777 (eval "$ac_link") 2>conftest.err
1778 ac_status=$?
1779 if test -s conftest.err; then
1780 grep -v '^ *+' conftest.err >conftest.er1
1781 cat conftest.er1 >&5
1782 mv -f conftest.er1 conftest.err
1783 fi
1784 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1785 test $ac_status = 0; } && {
1786 test -z "$ac_c_werror_flag" ||
1787 test ! -s conftest.err
1788 } && test -s conftest$ac_exeext && {
1789 test "$cross_compiling" = yes ||
1790 $as_test_x conftest$ac_exeext
1791 }; then :
1792 ac_retval=0
1793else
1794 $as_echo "$as_me: failed program was:" >&5
1795sed 's/^/| /' conftest.$ac_ext >&5
1796
1797 ac_retval=1
1798fi
1799 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1800 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1801 # interfere with the next link command; also delete a directory that is
1802 # left behind by Apple's compiler. We do this before executing the actions.
1803 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1804 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1805 as_fn_set_status $ac_retval
1806
1807} # ac_fn_c_try_link
1808
1809# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1810# -------------------------------------------
1811# Tests whether TYPE exists after having included INCLUDES, setting cache
1812# variable VAR accordingly.
1813ac_fn_c_check_type ()
1814{
1815 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1817$as_echo_n "checking for $2... " >&6; }
1818if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1819 $as_echo_n "(cached) " >&6
1820else
1821 eval "$3=no"
1822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1823/* end confdefs.h. */
1824$4
1825int
1826main ()
1827{
1828if (sizeof ($2))
1829 return 0;
1830 ;
1831 return 0;
1832}
1833_ACEOF
1834if ac_fn_c_try_compile "$LINENO"; then :
1835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1836/* end confdefs.h. */
1837$4
1838int
1839main ()
1840{
1841if (sizeof (($2)))
1842 return 0;
1843 ;
1844 return 0;
1845}
1846_ACEOF
1847if ac_fn_c_try_compile "$LINENO"; then :
1848
1849else
1850 eval "$3=yes"
1851fi
1852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1853fi
1854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1855fi
1856eval ac_res=\$$3
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1858$as_echo "$ac_res" >&6; }
1859 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1860
1861} # ac_fn_c_check_type
1862
1863# ac_fn_c_find_uintX_t LINENO BITS VAR
1864# ------------------------------------
1865# Finds an unsigned integer type with width BITS, setting cache variable VAR
1866# accordingly.
1867ac_fn_c_find_uintX_t ()
1868{
1869 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1871$as_echo_n "checking for uint$2_t... " >&6; }
1872if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1873 $as_echo_n "(cached) " >&6
1874else
1875 eval "$3=no"
1876 # Order is important - never check a type that is potentially smaller
1877 # than half of the expected target width.
1878 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1879 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1881/* end confdefs.h. */
1882$ac_includes_default
1883int
1884main ()
1885{
1886static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1887test_array [0] = 0
1888
1889 ;
1890 return 0;
1891}
1892_ACEOF
1893if ac_fn_c_try_compile "$LINENO"; then :
1894 case $ac_type in #(
1895 uint$2_t) :
1896 eval "$3=yes" ;; #(
1897 *) :
1898 eval "$3=\$ac_type" ;;
1899esac
1900fi
1901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1902 eval as_val=\$$3
1903 if test "x$as_val" = x""no; then :
1904
1905else
1906 break
1907fi
1908 done
1909fi
1910eval ac_res=\$$3
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1912$as_echo "$ac_res" >&6; }
1913 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1914
1915} # ac_fn_c_find_uintX_t
1916
1917# ac_fn_c_find_intX_t LINENO BITS VAR
1918# -----------------------------------
1919# Finds a signed integer type with width BITS, setting cache variable VAR
1920# accordingly.
1921ac_fn_c_find_intX_t ()
1922{
1923 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1925$as_echo_n "checking for int$2_t... " >&6; }
1926if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1927 $as_echo_n "(cached) " >&6
1928else
1929 eval "$3=no"
1930 # Order is important - never check a type that is potentially smaller
1931 # than half of the expected target width.
1932 for ac_type in int$2_t 'int' 'long int' \
1933 'long long int' 'short int' 'signed char'; do
1934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1935/* end confdefs.h. */
1936$ac_includes_default
1937 enum { N = $2 / 2 - 1 };
1938int
1939main ()
1940{
1941static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
1942test_array [0] = 0
1943
1944 ;
1945 return 0;
1946}
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$ac_includes_default
1952 enum { N = $2 / 2 - 1 };
1953int
1954main ()
1955{
1956static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
1957 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1958test_array [0] = 0
1959
1960 ;
1961 return 0;
1962}
1963_ACEOF
1964if ac_fn_c_try_compile "$LINENO"; then :
1965
1966else
1967 case $ac_type in #(
1968 int$2_t) :
1969 eval "$3=yes" ;; #(
1970 *) :
1971 eval "$3=\$ac_type" ;;
1972esac
1973fi
1974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977 eval as_val=\$$3
1978 if test "x$as_val" = x""no; then :
1979
1980else
1981 break
1982fi
1983 done
1984fi
1985eval ac_res=\$$3
1986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1987$as_echo "$ac_res" >&6; }
1988 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1989
1990} # ac_fn_c_find_intX_t
1991
1992# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1993# --------------------------------------------
1994# Tries to find the compile-time value of EXPR in a program that includes
1995# INCLUDES, setting VAR accordingly. Returns whether the value could be
1996# computed
1997ac_fn_c_compute_int ()
1998{
1999 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2000 if test "$cross_compiling" = yes; then
2001 # Depending upon the size, compute the lo and hi bounds.
2002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003/* end confdefs.h. */
2004$4
2005int
2006main ()
2007{
2008static int test_array [1 - 2 * !(($2) >= 0)];
2009test_array [0] = 0
2010
2011 ;
2012 return 0;
2013}
2014_ACEOF
2015if ac_fn_c_try_compile "$LINENO"; then :
2016 ac_lo=0 ac_mid=0
2017 while :; do
2018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2019/* end confdefs.h. */
2020$4
2021int
2022main ()
2023{
2024static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2025test_array [0] = 0
2026
2027 ;
2028 return 0;
2029}
2030_ACEOF
2031if ac_fn_c_try_compile "$LINENO"; then :
2032 ac_hi=$ac_mid; break
2033else
2034 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2035 if test $ac_lo -le $ac_mid; then
2036 ac_lo= ac_hi=
2037 break
2038 fi
2039 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2040fi
2041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2042 done
2043else
2044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2045/* end confdefs.h. */
2046$4
2047int
2048main ()
2049{
2050static int test_array [1 - 2 * !(($2) < 0)];
2051test_array [0] = 0
2052
2053 ;
2054 return 0;
2055}
2056_ACEOF
2057if ac_fn_c_try_compile "$LINENO"; then :
2058 ac_hi=-1 ac_mid=-1
2059 while :; do
2060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061/* end confdefs.h. */
2062$4
2063int
2064main ()
2065{
2066static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2067test_array [0] = 0
2068
2069 ;
2070 return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"; then :
2074 ac_lo=$ac_mid; break
2075else
2076 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2077 if test $ac_mid -le $ac_hi; then
2078 ac_lo= ac_hi=
2079 break
2080 fi
2081 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084 done
2085else
2086 ac_lo= ac_hi=
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091# Binary search between lo and hi bounds.
2092while test "x$ac_lo" != "x$ac_hi"; do
2093 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095/* end confdefs.h. */
2096$4
2097int
2098main ()
2099{
2100static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2101test_array [0] = 0
2102
2103 ;
2104 return 0;
2105}
2106_ACEOF
2107if ac_fn_c_try_compile "$LINENO"; then :
2108 ac_hi=$ac_mid
2109else
2110 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2111fi
2112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113done
2114case $ac_lo in #((
2115?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2116'') ac_retval=1 ;;
2117esac
2118 else
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122static long int longval () { return $2; }
2123static unsigned long int ulongval () { return $2; }
2124#include <stdio.h>
2125#include <stdlib.h>
2126int
2127main ()
2128{
2129
2130 FILE *f = fopen ("conftest.val", "w");
2131 if (! f)
2132 return 1;
2133 if (($2) < 0)
2134 {
2135 long int i = longval ();
2136 if (i != ($2))
2137 return 1;
2138 fprintf (f, "%ld", i);
2139 }
2140 else
2141 {
2142 unsigned long int i = ulongval ();
2143 if (i != ($2))
2144 return 1;
2145 fprintf (f, "%lu", i);
2146 }
2147 /* Do not output a trailing newline, as this causes \r\n confusion
2148 on some platforms. */
2149 return ferror (f) || fclose (f) != 0;
2150
2151 ;
2152 return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_run "$LINENO"; then :
2156 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2157else
2158 ac_retval=1
2159fi
2160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2161 conftest.$ac_objext conftest.beam conftest.$ac_ext
2162rm -f conftest.val
2163
2164 fi
2165 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2166 as_fn_set_status $ac_retval
2167
2168} # ac_fn_c_compute_int
2169
2170# ac_fn_c_check_func LINENO FUNC VAR
2171# ----------------------------------
2172# Tests whether FUNC exists, setting the cache variable VAR accordingly
2173ac_fn_c_check_func ()
2174{
2175 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2177$as_echo_n "checking for $2... " >&6; }
2178if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2179 $as_echo_n "(cached) " >&6
2180else
2181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h. */
2183/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2184 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2185#define $2 innocuous_$2
2186
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $2 (); below.
2189 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2190 <limits.h> exists even on freestanding compilers. */
2191
2192#ifdef __STDC__
2193# include <limits.h>
2194#else
2195# include <assert.h>
2196#endif
2197
2198#undef $2
2199
2200/* Override any GCC internal prototype to avoid an error.
2201 Use char because int might match the return type of a GCC
2202 builtin and then its argument prototype would still apply. */
2203#ifdef __cplusplus
2204extern "C"
2205#endif
2206char $2 ();
2207/* The GNU C library defines this for functions which it implements
2208 to always fail with ENOSYS. Some functions are actually named
2209 something starting with __ and the normal name is an alias. */
2210#if defined __stub_$2 || defined __stub___$2
2211choke me
2212#endif
2213
2214int
2215main ()
2216{
2217return $2 ();
2218 ;
2219 return 0;
2220}
2221_ACEOF
2222if ac_fn_c_try_link "$LINENO"; then :
2223 eval "$3=yes"
2224else
2225 eval "$3=no"
2226fi
2227rm -f core conftest.err conftest.$ac_objext \
2228 conftest$ac_exeext conftest.$ac_ext
2229fi
2230eval ac_res=\$$3
2231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2232$as_echo "$ac_res" >&6; }
2233 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2234
2235} # ac_fn_c_check_func
2236
2237# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2238# ----------------------------------------------------
2239# Tries to find if the field MEMBER exists in type AGGR, after including
2240# INCLUDES, setting cache variable VAR accordingly.
2241ac_fn_c_check_member ()
2242{
2243 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2245$as_echo_n "checking for $2.$3... " >&6; }
2246if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2247 $as_echo_n "(cached) " >&6
2248else
2249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2250/* end confdefs.h. */
2251$5
2252int
2253main ()
2254{
2255static $2 ac_aggr;
2256if (ac_aggr.$3)
2257return 0;
2258 ;
2259 return 0;
2260}
2261_ACEOF
2262if ac_fn_c_try_compile "$LINENO"; then :
2263 eval "$4=yes"
2264else
2265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2266/* end confdefs.h. */
2267$5
2268int
2269main ()
2270{
2271static $2 ac_aggr;
2272if (sizeof ac_aggr.$3)
2273return 0;
2274 ;
2275 return 0;
2276}
2277_ACEOF
2278if ac_fn_c_try_compile "$LINENO"; then :
2279 eval "$4=yes"
2280else
2281 eval "$4=no"
2282fi
2283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284fi
2285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286fi
2287eval ac_res=\$$4
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2289$as_echo "$ac_res" >&6; }
2290 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2291
2292} # ac_fn_c_check_member
2293
2294# ac_fn_c_check_decl LINENO SYMBOL VAR
2295# ------------------------------------
2296# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2297ac_fn_c_check_decl ()
2298{
2299 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2301$as_echo_n "checking whether $2 is declared... " >&6; }
2302if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2303 $as_echo_n "(cached) " >&6
2304else
2305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2306/* end confdefs.h. */
2307$4
2308int
2309main ()
2310{
2311#ifndef $2
2312 (void) $2;
2313#endif
2314
2315 ;
2316 return 0;
2317}
2318_ACEOF
2319if ac_fn_c_try_compile "$LINENO"; then :
2320 eval "$3=yes"
2321else
2322 eval "$3=no"
2323fi
2324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325fi
2326eval ac_res=\$$3
2327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2328$as_echo "$ac_res" >&6; }
2329 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2330
2331} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002332cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002333This file contains any messages produced by compilers while
2334running configure, to aid debugging if configure makes a mistake.
2335
Martin v. Löwis174440b2008-10-03 08:59:41 +00002336It was created by python $as_me 2.7, which was
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002337generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002338
2339 $ $0 $@
2340
2341_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002342exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002343{
2344cat <<_ASUNAME
2345## --------- ##
2346## Platform. ##
2347## --------- ##
2348
2349hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2350uname -m = `(uname -m) 2>/dev/null || echo unknown`
2351uname -r = `(uname -r) 2>/dev/null || echo unknown`
2352uname -s = `(uname -s) 2>/dev/null || echo unknown`
2353uname -v = `(uname -v) 2>/dev/null || echo unknown`
2354
2355/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2356/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2357
2358/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2359/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2360/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002361/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002362/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2363/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2364/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2365
2366_ASUNAME
2367
2368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2369for as_dir in $PATH
2370do
2371 IFS=$as_save_IFS
2372 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002373 $as_echo "PATH: $as_dir"
2374 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002375IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002376
2377} >&5
2378
2379cat >&5 <<_ACEOF
2380
2381
2382## ----------- ##
2383## Core tests. ##
2384## ----------- ##
2385
2386_ACEOF
2387
2388
2389# Keep a trace of the command line.
2390# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002391# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002392# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002393# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002394ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002395ac_configure_args0=
2396ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002397ac_must_keep_next=false
2398for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002399do
Skip Montanaro6dead952003-09-25 14:50:04 +00002400 for ac_arg
2401 do
2402 case $ac_arg in
2403 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2404 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2405 | -silent | --silent | --silen | --sile | --sil)
2406 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002407 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002408 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 esac
2410 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002411 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002413 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002415 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002417 case $ac_arg in
2418 *=* | --config-cache | -C | -disable-* | --disable-* \
2419 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2420 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2421 | -with-* | --with-* | -without-* | --without-* | --x)
2422 case "$ac_configure_args0 " in
2423 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2424 esac
2425 ;;
2426 -* ) ac_must_keep_next=true ;;
2427 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002429 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 ;;
2431 esac
2432 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002433done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002434{ ac_configure_args0=; unset ac_configure_args0;}
2435{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002436
2437# When interrupted or exit'd, cleanup temporary files, and complete
2438# config.log. We remove comments because anyway the quotes in there
2439# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002440# WARNING: Use '\'' to represent an apostrophe within the trap.
2441# 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 +00002442trap 'exit_status=$?
2443 # Save into config.log some information that might help in debugging.
2444 {
2445 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002446
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 cat <<\_ASBOX
2448## ---------------- ##
2449## Cache variables. ##
2450## ---------------- ##
2451_ASBOX
2452 echo
2453 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002454(
2455 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2456 eval ac_val=\$$ac_var
2457 case $ac_val in #(
2458 *${as_nl}*)
2459 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002460 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2461$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002462 esac
2463 case $ac_var in #(
2464 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002465 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2466 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002467 esac ;;
2468 esac
2469 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002470 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002471 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2472 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002474 "s/'\''/'\''\\\\'\'''\''/g;
2475 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2476 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002477 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002478 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002479 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002480 esac |
2481 sort
2482)
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002484
2485 cat <<\_ASBOX
2486## ----------------- ##
2487## Output variables. ##
2488## ----------------- ##
2489_ASBOX
2490 echo
2491 for ac_var in $ac_subst_vars
2492 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002493 eval ac_val=\$$ac_var
2494 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002495 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002496 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002497 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 done | sort
2499 echo
2500
2501 if test -n "$ac_subst_files"; then
2502 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00002503## ------------------- ##
2504## File substitutions. ##
2505## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002506_ASBOX
2507 echo
2508 for ac_var in $ac_subst_files
2509 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002510 eval ac_val=\$$ac_var
2511 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002512 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002513 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002514 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 done | sort
2516 echo
2517 fi
2518
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 if test -s confdefs.h; then
2520 cat <<\_ASBOX
2521## ----------- ##
2522## confdefs.h. ##
2523## ----------- ##
2524_ASBOX
2525 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002526 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 echo
2528 fi
2529 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002530 $as_echo "$as_me: caught signal $ac_signal"
2531 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002533 rm -f core *.core core.conftest.* &&
2534 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002536' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002537for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002538 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002539done
2540ac_signal=0
2541
2542# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002544
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002545$as_echo "/* confdefs.h */" > confdefs.h
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547# Predefined preprocessor variables.
2548
2549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_NAME "$PACKAGE_NAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_VERSION "$PACKAGE_VERSION"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_STRING "$PACKAGE_STRING"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2567_ACEOF
2568
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_URL "$PACKAGE_URL"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573
2574# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002575# Prefer an explicitly selected file to automatically selected ones.
2576ac_site_file1=NONE
2577ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002578if test -n "$CONFIG_SITE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002579 ac_site_file1=$CONFIG_SITE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002580elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002581 ac_site_file1=$prefix/share/config.site
2582 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002583else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002584 ac_site_file1=$ac_default_prefix/share/config.site
2585 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002586fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002587for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002588do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002589 test "x$ac_site_file" = xNONE && continue
2590 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2591 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2592$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002594 . "$ac_site_file"
2595 fi
2596done
2597
2598if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002599 # Some versions of bash will fail to source /dev/null (special files
2600 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2601 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2602 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2603$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002605 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2606 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 esac
2608 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002609else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002610 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2611$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 >$cache_file
2613fi
2614
2615# Check that the precious variables saved in the cache have kept the same
2616# value.
2617ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002618for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2620 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002621 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2622 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 case $ac_old_set,$ac_new_set in
2624 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002625 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2626$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 +00002627 ac_cache_corrupted=: ;;
2628 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002629 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2630$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 ac_cache_corrupted=: ;;
2632 ,);;
2633 *)
2634 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002635 # differences in whitespace do not lead to failure.
2636 ac_old_val_w=`echo x $ac_old_val`
2637 ac_new_val_w=`echo x $ac_new_val`
2638 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2639 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2640$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2641 ac_cache_corrupted=:
2642 else
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2644$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2645 eval $ac_var=\$ac_old_val
2646 fi
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2648$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2650$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 fi;;
2652 esac
2653 # Pass precious variables to config.status.
2654 if test "$ac_new_set" = set; then
2655 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002656 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 *) ac_arg=$ac_var=$ac_new_val ;;
2658 esac
2659 case " $ac_configure_args " in
2660 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002661 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002662 esac
2663 fi
2664done
2665if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002666 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2669$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2670 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002671fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002672## -------------------- ##
2673## Main body of script. ##
2674## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002675
Guido van Rossum7f43da71994-08-01 12:15:30 +00002676ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002677ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002678ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2679ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2680ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002681
Guido van Rossum627b2d71993-12-24 10:39:16 +00002682
Michael W. Hudson54241132001-12-07 15:38:26 +00002683
Martin v. Löwiseba40652007-08-30 20:10:57 +00002684ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002685
2686
Martin v. Löwis11437992002-04-12 09:54:03 +00002687
Georg Brandlbcd64a32009-03-31 21:45:18 +00002688if test "$prefix" != "/"; then
2689 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2690fi
2691
2692
Martin v. Löwis11437992002-04-12 09:54:03 +00002693
2694
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002695# We don't use PACKAGE_ variables, and they cause conflicts
2696# with other autoconf-based packages that include Python.h
2697grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2698rm confdefs.h
2699mv confdefs.h.new confdefs.h
2700
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002701
Martin v. Löwis174440b2008-10-03 08:59:41 +00002702VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002703
Martin v. Löwis1142de32002-03-29 16:28:31 +00002704
2705SOVERSION=1.0
2706
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002707# The later defininition of _XOPEN_SOURCE disables certain features
2708# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2709
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002710$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002711
2712
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002713# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2714# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2715# them.
2716
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002717$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002718
2719
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002720# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2721# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2722# them.
2723
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002724$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002725
2726
Martin v. Löwisd6320502004-08-12 13:45:08 +00002727# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2728# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2729
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002730$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002731
2732
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002733# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2734# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2735# them.
2736
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002737$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002738
2739
2740
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002741define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002742
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002743# Arguments passed to configure.
2744
2745CONFIG_ARGS="$ac_configure_args"
2746
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2748$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002749# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002750if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002751 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002752 case $enableval in
2753 yes)
2754 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002755 if test ! -d "${enableval}"
2756 then
2757 enableval=/
2758 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002759 ;;
2760 esac
2761 case $enableval in
2762 no)
2763 UNIVERSALSDK=
2764 enable_universalsdk=
2765 ;;
2766 *)
2767 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002768 if test ! -d "${UNIVERSALSDK}"
2769 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002770 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002771 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002772 ;;
2773 esac
2774
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002775
Ronald Oussoren988117f2006-04-29 11:31:35 +00002776else
2777
2778 UNIVERSALSDK=
2779 enable_universalsdk=
2780
Martin v. Löwiseba40652007-08-30 20:10:57 +00002781fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002782
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002783if test -n "${UNIVERSALSDK}"
2784then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2786$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002787else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2789$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002790fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002791
Martin v. Löwiseba40652007-08-30 20:10:57 +00002792
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002793
2794
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002795UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002796
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2798$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002799
2800# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002801if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002802 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2804$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002805 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002806 if test "${enable_universalsdk}" ; then
2807 :
2808 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002809 as_fn_error "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002810 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002811
2812else
2813
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2815$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002816
2817fi
2818
2819
2820
2821
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002822
2823# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002824if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002825 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002826 if test "${enable_framework}"; then
2827 :
2828 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002829 as_fn_error "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002830 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002831 PYTHONFRAMEWORK=${withval}
2832 PYTHONFRAMEWORKDIR=${withval}.framework
2833 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2834
2835else
2836
2837 PYTHONFRAMEWORK=Python
2838 PYTHONFRAMEWORKDIR=Python.framework
2839 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2840
2841fi
2842
Martin v. Löwiseba40652007-08-30 20:10:57 +00002843# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002844if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002845 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002846 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002847 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002848 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002849 esac
2850 case $enableval in
2851 no)
2852 PYTHONFRAMEWORK=
2853 PYTHONFRAMEWORKDIR=no-framework
2854 PYTHONFRAMEWORKPREFIX=
2855 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002856 FRAMEWORKINSTALLFIRST=
2857 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002858 FRAMEWORKALTINSTALLFIRST=
2859 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002860 if test "x${prefix}" = "xNONE"; then
2861 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2862 else
2863 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2864 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002865 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002866 ;;
2867 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002868 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002869 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002870 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002871 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002872 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2873 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002874 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002875
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002876 if test "x${prefix}" = "xNONE" ; then
2877 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002878
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002879 else
2880 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2881 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002882
2883 case "${enableval}" in
2884 /System*)
2885 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2886 if test "${prefix}" = "NONE" ; then
2887 # See below
2888 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2889 fi
2890 ;;
2891
2892 /Library*)
2893 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2894 ;;
2895
2896 */Library/Frameworks)
2897 MDIR="`dirname "${enableval}"`"
2898 MDIR="`dirname "${MDIR}"`"
2899 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2900
2901 if test "${prefix}" = "NONE"; then
2902 # User hasn't specified the
2903 # --prefix option, but wants to install
2904 # the framework in a non-default location,
2905 # ensure that the compatibility links get
2906 # installed relative to that prefix as well
2907 # instead of in /usr/local.
2908 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2909 fi
2910 ;;
2911
2912 *)
2913 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2914 ;;
2915 esac
2916
Jack Jansen127e56e2001-09-11 14:41:54 +00002917 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002918
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002919 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002920 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002921 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002922
Martin v. Löwiseba40652007-08-30 20:10:57 +00002923 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002924
Martin v. Löwiseba40652007-08-30 20:10:57 +00002925 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002926
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002927 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2928
2929 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2930
Jack Jansene578a632001-08-15 01:27:14 +00002931 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002932
Guido van Rossum563e7081996-09-10 18:20:48 +00002933else
Martin v. Löwis11437992002-04-12 09:54:03 +00002934
Jack Jansene578a632001-08-15 01:27:14 +00002935 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002936 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002937 PYTHONFRAMEWORKPREFIX=
2938 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002939 FRAMEWORKINSTALLFIRST=
2940 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002941 FRAMEWORKALTINSTALLFIRST=
2942 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002943 if test "x${prefix}" = "xNONE" ; then
2944 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2945 else
2946 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2947 fi
Jack Jansene578a632001-08-15 01:27:14 +00002948 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002949
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002950
Martin v. Löwiseba40652007-08-30 20:10:57 +00002951fi
2952
Michael W. Hudson54241132001-12-07 15:38:26 +00002953
2954
2955
2956
Jack Jansene578a632001-08-15 01:27:14 +00002957
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002958
2959
Ronald Oussoren5b787322006-06-06 19:50:24 +00002960
2961
2962
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002963
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002964
Jack Jansene578a632001-08-15 01:27:14 +00002965##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00002966## AS_HELP_STRING([--with-dyld],
2967## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002968##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002969# Set name for machine-dependent library files
2970
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2972$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002973if test -z "$MACHDEP"
2974then
Guido van Rossum563e7081996-09-10 18:20:48 +00002975 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002976 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002977 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002978 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002979 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002980 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002981 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002982 ac_md_system=`echo $ac_sys_system |
2983 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2984 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002985 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002986 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002987
Guido van Rossum07397971997-04-29 21:49:50 +00002988 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002989 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002990 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002991 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002992 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002993 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002994 esac
2995fi
Guido van Rossum91922671997-10-09 20:24:13 +00002996
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002997# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2998# disable features if it is defined, without any means to access these
2999# features as extensions. For these systems, we skip the definition of
3000# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3001# some feature, make sure there is no alternative way to access this
3002# feature. Also, when using wildcards, make sure you have verified the
3003# need for not defining _XOPEN_SOURCE on all systems matching the
3004# wildcard, and that the wildcard does not include future systems
3005# (which may remove their limitations).
3006case $ac_sys_system/$ac_sys_release in
3007 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3008 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003009 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003010 # In addition, Stefan Krah confirms that issue #1244610 exists through
3011 # OpenBSD 4.6, but is fixed in 4.7.
3012 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003013 define_xopen_source=no
3014 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3015 # also defined. This can be overridden by defining _BSD_SOURCE
3016 # As this has a different meaning on Linux, only define it on OpenBSD
3017
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003018$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003019
3020 ;;
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003021 OpenBSD/4.[789])
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003022 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3023 # also defined. This can be overridden by defining _BSD_SOURCE
3024 # As this has a different meaning on Linux, only define it on OpenBSD
3025
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003026$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003027
3028 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003029 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3030 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3031 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003032 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003033 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003034 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
3035 # of union __?sigval. Reported by Stuart Bishop.
3036 SunOS/5.6)
3037 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003038 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3039 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003040 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003041 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003042 define_xopen_source=no;;
3043 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003044 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003045 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003046 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003047 # On FreeBSD 4, the math functions C89 does not cover are never defined
3048 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3049 FreeBSD/4.*)
3050 define_xopen_source=no;;
3051 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3052 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3053 # identifies itself as Darwin/7.*
3054 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3055 # disables platform specific features beyond repair.
3056 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3057 # has no effect, don't bother defining them
3058 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003059 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003060 Darwin/1[0-9].*)
3061 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003062 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3063 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3064 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003065 AIX/4)
3066 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003067 AIX/5)
3068 if test `uname -r` -eq 1; then
3069 define_xopen_source=no
3070 fi
3071 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003072 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3073 # defining NI_NUMERICHOST.
3074 QNX/6.3.2)
3075 define_xopen_source=no
3076 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003077
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003078esac
3079
3080if test $define_xopen_source = yes
3081then
Skip Montanarof0d5f792004-08-15 14:08:23 +00003082 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
3083 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00003084 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
3085 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00003086 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00003087 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00003088
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003089$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
Skip Montanarof0d5f792004-08-15 14:08:23 +00003090
3091 ;;
3092 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003093
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003094$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003095
Skip Montanarof0d5f792004-08-15 14:08:23 +00003096 ;;
3097 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003098
3099 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3100 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3101 # several APIs are not declared. Since this is also needed in some
3102 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00003103 # except for Solaris 10, where it must not be defined,
3104 # as it implies XPG4.2
3105 case $ac_sys_system/$ac_sys_release in
3106 SunOS/5.10)
3107 ;;
3108 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003109
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003110$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003111
Martin v. Löwis7dece662005-11-26 11:38:24 +00003112 ;;
3113 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003114
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003115
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003116$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003117
3118
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003119fi
3120
Guido van Rossum91922671997-10-09 20:24:13 +00003121#
3122# SGI compilers allow the specification of the both the ABI and the
3123# ISA on the command line. Depending on the values of these switches,
3124# different and often incompatable code will be generated.
3125#
3126# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3127# thus supply support for various ABI/ISA combinations. The MACHDEP
3128# variable is also adjusted.
3129#
3130
3131if test ! -z "$SGI_ABI"
3132then
3133 CC="cc $SGI_ABI"
3134 LDFLAGS="$SGI_ABI $LDFLAGS"
3135 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3136fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3138$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003139
Jack Jansen83f898c2002-12-30 22:23:40 +00003140# And add extra plat-mac for darwin
3141
Jack Jansen7b59b422003-03-17 15:44:10 +00003142
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3144$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003145if test -z "$EXTRAPLATDIR"
3146then
3147 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003148 darwin)
3149 EXTRAPLATDIR="\$(PLATMACDIRS)"
3150 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3151 ;;
3152 *)
3153 EXTRAPLATDIR=""
3154 EXTRAMACHDEPPATH=""
3155 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003156 esac
3157fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3159$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003160
Jack Jansen6b08a402004-06-03 12:41:45 +00003161# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3162# it may influence the way we can build extensions, so distutils
3163# needs to check it
3164
Ronald Oussoren988117f2006-04-29 11:31:35 +00003165
Jack Jansen6b08a402004-06-03 12:41:45 +00003166CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003167EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003168
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3170$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003171ac_sys_machine=`uname -m`
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3173$as_echo "$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003174
Guido van Rossum627b2d71993-12-24 10:39:16 +00003175# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003176
3177# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3178# for debug/optimization stuff. BASECFLAGS is for flags that are required
3179# just to get things to compile and link. Users are free to override OPT
3180# when running configure or make. The build should not break if they do.
3181# BASECFLAGS should generally not be messed with, however.
3182
3183# XXX shouldn't some/most/all of this code be merged with the stuff later
3184# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3186$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003187
Martin v. Löwiseba40652007-08-30 20:10:57 +00003188# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003189if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003190 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003191 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003192 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003193 without_gcc=yes;;
3194 yes) CC=gcc
3195 without_gcc=no;;
3196 *) CC=$withval
3197 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003198 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003199else
Martin v. Löwis11437992002-04-12 09:54:03 +00003200
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003201 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003202 AIX*) CC=cc_r
3203 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003204 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003205 case $BE_HOST_CPU in
3206 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003207 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003208 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003209 BASECFLAGS="$BASECFLAGS -export pragma"
3210 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003211 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003212 ;;
3213 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003214 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003215 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003216 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003217 ;;
3218 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003219 as_fn_error "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003220 ;;
3221 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003222 AR="\$(srcdir)/Modules/ar_beos"
3223 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003224 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003225 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003226 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003227fi
3228
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3230$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003231
Guido van Rossum8b131c51995-03-09 14:10:13 +00003232# If the user switches compilers, we can't believe the cache
3233if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3234then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003235 as_fn_error "cached CC is different -- throw away $cache_file
3236(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003237fi
3238
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003239# If the user set CFLAGS, use this instead of the automatically
3240# determined setting
3241preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003242ac_ext=c
3243ac_cpp='$CPP $CPPFLAGS'
3244ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3245ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3246ac_compiler_gnu=$ac_cv_c_compiler_gnu
3247if test -n "$ac_tool_prefix"; then
3248 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3249set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3251$as_echo_n "checking for $ac_word... " >&6; }
3252if test "${ac_cv_prog_CC+set}" = set; then :
3253 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003254else
3255 if test -n "$CC"; then
3256 ac_cv_prog_CC="$CC" # Let the user override the test.
3257else
Martin v. Löwis11437992002-04-12 09:54:03 +00003258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3259for as_dir in $PATH
3260do
3261 IFS=$as_save_IFS
3262 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003263 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003264 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 +00003265 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003266 $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 +00003267 break 2
3268 fi
3269done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003270 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003271IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003272
Jack Jansendd19cf82001-12-06 22:36:17 +00003273fi
3274fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003275CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003276if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3278$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003279else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3281$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003282fi
3283
Martin v. Löwiseba40652007-08-30 20:10:57 +00003284
Martin v. Löwis11437992002-04-12 09:54:03 +00003285fi
3286if test -z "$ac_cv_prog_CC"; then
3287 ac_ct_CC=$CC
3288 # Extract the first word of "gcc", so it can be a program name with args.
3289set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3291$as_echo_n "checking for $ac_word... " >&6; }
3292if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3293 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003294else
3295 if test -n "$ac_ct_CC"; then
3296 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3297else
3298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3299for as_dir in $PATH
3300do
3301 IFS=$as_save_IFS
3302 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003303 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003304 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 +00003305 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003306 $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 +00003307 break 2
3308 fi
3309done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003310 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003311IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003312
3313fi
3314fi
3315ac_ct_CC=$ac_cv_prog_ac_ct_CC
3316if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3318$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003319else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3321$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003322fi
3323
Martin v. Löwiseba40652007-08-30 20:10:57 +00003324 if test "x$ac_ct_CC" = x; then
3325 CC=""
3326 else
3327 case $cross_compiling:$ac_tool_warned in
3328yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003329{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3330$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003331ac_tool_warned=yes ;;
3332esac
3333 CC=$ac_ct_CC
3334 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003335else
3336 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003337fi
3338
Jack Jansendd19cf82001-12-06 22:36:17 +00003339if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003340 if test -n "$ac_tool_prefix"; then
3341 # 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 +00003342set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3344$as_echo_n "checking for $ac_word... " >&6; }
3345if test "${ac_cv_prog_CC+set}" = set; then :
3346 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003347else
3348 if test -n "$CC"; then
3349 ac_cv_prog_CC="$CC" # Let the user override the test.
3350else
Martin v. Löwis11437992002-04-12 09:54:03 +00003351as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3352for as_dir in $PATH
3353do
3354 IFS=$as_save_IFS
3355 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003356 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003357 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 +00003358 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003359 $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 +00003360 break 2
3361 fi
3362done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003363 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003364IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003365
3366fi
3367fi
3368CC=$ac_cv_prog_CC
3369if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3371$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003372else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3374$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003375fi
3376
Martin v. Löwiseba40652007-08-30 20:10:57 +00003377
Martin v. Löwis11437992002-04-12 09:54:03 +00003378 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003379fi
3380if test -z "$CC"; then
3381 # Extract the first word of "cc", so it can be a program name with args.
3382set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3384$as_echo_n "checking for $ac_word... " >&6; }
3385if test "${ac_cv_prog_CC+set}" = set; then :
3386 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003387else
3388 if test -n "$CC"; then
3389 ac_cv_prog_CC="$CC" # Let the user override the test.
3390else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003391 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3393for as_dir in $PATH
3394do
3395 IFS=$as_save_IFS
3396 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003397 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003398 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 +00003399 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3400 ac_prog_rejected=yes
3401 continue
3402 fi
3403 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003404 $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 +00003405 break 2
3406 fi
3407done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003408 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003409IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003410
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003411if test $ac_prog_rejected = yes; then
3412 # We found a bogon in the path, so make sure we never use it.
3413 set dummy $ac_cv_prog_CC
3414 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003415 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003416 # We chose a different compiler from the bogus one.
3417 # However, it has the same basename, so the bogon will be chosen
3418 # first if we set CC to just the basename; use the full file name.
3419 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003420 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003421 fi
3422fi
3423fi
3424fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003425CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003426if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3428$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003429else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3431$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003432fi
3433
Martin v. Löwiseba40652007-08-30 20:10:57 +00003434
Martin v. Löwis11437992002-04-12 09:54:03 +00003435fi
3436if test -z "$CC"; then
3437 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003438 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 do
3440 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3441set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3443$as_echo_n "checking for $ac_word... " >&6; }
3444if test "${ac_cv_prog_CC+set}" = set; then :
3445 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003446else
3447 if test -n "$CC"; then
3448 ac_cv_prog_CC="$CC" # Let the user override the test.
3449else
Martin v. Löwis11437992002-04-12 09:54:03 +00003450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3451for as_dir in $PATH
3452do
3453 IFS=$as_save_IFS
3454 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003455 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003456 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 +00003457 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003458 $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 +00003459 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003460 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003461done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003462 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003463IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003464
3465fi
3466fi
3467CC=$ac_cv_prog_CC
3468if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3470$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003471else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3473$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003474fi
3475
Martin v. Löwiseba40652007-08-30 20:10:57 +00003476
Martin v. Löwis11437992002-04-12 09:54:03 +00003477 test -n "$CC" && break
3478 done
3479fi
3480if test -z "$CC"; then
3481 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003482 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003483do
3484 # Extract the first word of "$ac_prog", so it can be a program name with args.
3485set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3487$as_echo_n "checking for $ac_word... " >&6; }
3488if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3489 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003490else
3491 if test -n "$ac_ct_CC"; then
3492 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3493else
3494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3495for as_dir in $PATH
3496do
3497 IFS=$as_save_IFS
3498 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003499 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003500 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 +00003501 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003502 $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 +00003503 break 2
3504 fi
3505done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003506 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003507IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003508
Martin v. Löwis11437992002-04-12 09:54:03 +00003509fi
3510fi
3511ac_ct_CC=$ac_cv_prog_ac_ct_CC
3512if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3514$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003515else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3517$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003518fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003519
Martin v. Löwiseba40652007-08-30 20:10:57 +00003520
Martin v. Löwis11437992002-04-12 09:54:03 +00003521 test -n "$ac_ct_CC" && break
3522done
Michael W. Hudson54241132001-12-07 15:38:26 +00003523
Martin v. Löwiseba40652007-08-30 20:10:57 +00003524 if test "x$ac_ct_CC" = x; then
3525 CC=""
3526 else
3527 case $cross_compiling:$ac_tool_warned in
3528yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003529{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3530$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003531ac_tool_warned=yes ;;
3532esac
3533 CC=$ac_ct_CC
3534 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003535fi
3536
3537fi
3538
3539
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003540test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3541$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3542as_fn_error "no acceptable C compiler found in \$PATH
3543See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003544
3545# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003546$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3547set X $ac_compile
3548ac_compiler=$2
3549for ac_option in --version -v -V -qversion; do
3550 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003551case "(($ac_try" in
3552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3553 *) ac_try_echo=$ac_try;;
3554esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003555eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3556$as_echo "$ac_try_echo"; } >&5
3557 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003558 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003559 if test -s conftest.err; then
3560 sed '10a\
3561... rest of stderr output deleted ...
3562 10q' conftest.err >conftest.er1
3563 cat conftest.er1 >&5
3564 fi
3565 rm -f conftest.er1 conftest.err
3566 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3567 test $ac_status = 0; }
3568done
Martin v. Löwis11437992002-04-12 09:54:03 +00003569
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003571/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003572
Martin v. Löwis11437992002-04-12 09:54:03 +00003573int
3574main ()
3575{
3576
3577 ;
3578 return 0;
3579}
3580_ACEOF
3581ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003582ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003583# Try to create an executable without -o first, disregard a.out.
3584# It will help us diagnose broken compilers, and finding out an intuition
3585# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3587$as_echo_n "checking whether the C compiler works... " >&6; }
3588ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3589
3590# The possible output files:
3591ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3592
Martin v. Löwiseba40652007-08-30 20:10:57 +00003593ac_rmfiles=
3594for ac_file in $ac_files
3595do
3596 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003597 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003598 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3599 esac
3600done
3601rm -f $ac_rmfiles
3602
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003603if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003604case "(($ac_try" in
3605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3606 *) ac_try_echo=$ac_try;;
3607esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003608eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3609$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003610 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003612 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3613 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003614 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3615# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3616# in a Makefile. We should not override ac_cv_exeext if it was cached,
3617# so that the user can short-circuit this test for compilers unknown to
3618# Autoconf.
3619for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003620do
3621 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003623 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003624 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003625 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003626 # We found the default executable, but exeext='' is most
3627 # certainly right.
3628 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003629 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003630 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003631 then :; else
3632 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3633 fi
3634 # We set ac_cv_exeext here because the later test for it is not
3635 # safe: cross compilers may not add the suffix if given an `-o'
3636 # argument, so we may need to know it at that point already.
3637 # Even if this section looks crufty: it has the advantage of
3638 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003639 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003640 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003641 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003642 esac
3643done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003644test "$ac_cv_exeext" = no && ac_cv_exeext=
3645
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003646else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003647 ac_file=''
3648fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003649if test -z "$ac_file"; then :
3650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3651$as_echo "no" >&6; }
3652$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003653sed 's/^/| /' conftest.$ac_ext >&5
3654
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003655{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3657{ as_fn_set_status 77
3658as_fn_error "C compiler cannot create executables
3659See \`config.log' for more details." "$LINENO" 5; }; }
3660else
3661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3662$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003663fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3665$as_echo_n "checking for C compiler default output file name... " >&6; }
3666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3667$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003668ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003669
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003670rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003671ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3673$as_echo_n "checking for suffix of executables... " >&6; }
3674if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003675case "(($ac_try" in
3676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3677 *) ac_try_echo=$ac_try;;
3678esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003679eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3680$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003681 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003683 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3684 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003685 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3686# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3687# work properly (i.e., refer to `conftest.exe'), while it won't with
3688# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003689for ac_file in conftest.exe conftest conftest.*; do
3690 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003691 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003692 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003693 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003694 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003695 * ) break;;
3696 esac
3697done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003698else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003699 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3700$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3701as_fn_error "cannot compute suffix of executables: cannot compile and link
3702See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003703fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003704rm -f conftest conftest$ac_cv_exeext
3705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3706$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003707
3708rm -f conftest.$ac_ext
3709EXEEXT=$ac_cv_exeext
3710ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3712/* end confdefs.h. */
3713#include <stdio.h>
3714int
3715main ()
3716{
3717FILE *f = fopen ("conftest.out", "w");
3718 return ferror (f) || fclose (f) != 0;
3719
3720 ;
3721 return 0;
3722}
Skip Montanaro6dead952003-09-25 14:50:04 +00003723_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003724ac_clean_files="$ac_clean_files conftest.out"
3725# Check that the compiler produces executables we can run. If not, either
3726# the compiler is broken, or we cross compile.
3727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3728$as_echo_n "checking whether we are cross compiling... " >&6; }
3729if test "$cross_compiling" != yes; then
3730 { { ac_try="$ac_link"
3731case "(($ac_try" in
3732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3733 *) ac_try_echo=$ac_try;;
3734esac
3735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3736$as_echo "$ac_try_echo"; } >&5
3737 (eval "$ac_link") 2>&5
3738 ac_status=$?
3739 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3740 test $ac_status = 0; }
3741 if { ac_try='./conftest$ac_cv_exeext'
3742 { { case "(($ac_try" in
3743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3744 *) ac_try_echo=$ac_try;;
3745esac
3746eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3747$as_echo "$ac_try_echo"; } >&5
3748 (eval "$ac_try") 2>&5
3749 ac_status=$?
3750 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3751 test $ac_status = 0; }; }; then
3752 cross_compiling=no
3753 else
3754 if test "$cross_compiling" = maybe; then
3755 cross_compiling=yes
3756 else
3757 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3759as_fn_error "cannot run C compiled programs.
3760If you meant to cross compile, use \`--host'.
3761See \`config.log' for more details." "$LINENO" 5; }
3762 fi
3763 fi
3764fi
3765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3766$as_echo "$cross_compiling" >&6; }
3767
3768rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3769ac_clean_files=$ac_clean_files_save
3770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3771$as_echo_n "checking for suffix of object files... " >&6; }
3772if test "${ac_cv_objext+set}" = set; then :
3773 $as_echo_n "(cached) " >&6
3774else
3775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003777
Martin v. Löwis11437992002-04-12 09:54:03 +00003778int
3779main ()
3780{
3781
3782 ;
3783 return 0;
3784}
3785_ACEOF
3786rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003787if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003788case "(($ac_try" in
3789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3790 *) ac_try_echo=$ac_try;;
3791esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003792eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3793$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003794 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003795 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003796 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3797 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003798 for ac_file in conftest.o conftest.obj conftest.*; do
3799 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003800 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003801 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3803 break;;
3804 esac
3805done
3806else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003807 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003808sed 's/^/| /' conftest.$ac_ext >&5
3809
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003810{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3811$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3812as_fn_error "cannot compute suffix of object files: cannot compile
3813See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003814fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003815rm -f conftest.$ac_cv_objext conftest.$ac_ext
3816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3818$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003819OBJEXT=$ac_cv_objext
3820ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3822$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3823if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3824 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003825else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003828
Martin v. Löwis11437992002-04-12 09:54:03 +00003829int
3830main ()
3831{
3832#ifndef __GNUC__
3833 choke me
3834#endif
3835
3836 ;
3837 return 0;
3838}
3839_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003840if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003841 ac_compiler_gnu=yes
3842else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003843 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003846ac_cv_c_compiler_gnu=$ac_compiler_gnu
3847
3848fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3850$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3851if test $ac_compiler_gnu = yes; then
3852 GCC=yes
3853else
3854 GCC=
3855fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003856ac_test_CFLAGS=${CFLAGS+set}
3857ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3859$as_echo_n "checking whether $CC accepts -g... " >&6; }
3860if test "${ac_cv_prog_cc_g+set}" = set; then :
3861 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003862else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003863 ac_save_c_werror_flag=$ac_c_werror_flag
3864 ac_c_werror_flag=yes
3865 ac_cv_prog_cc_g=no
3866 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003868/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003869
Martin v. Löwis11437992002-04-12 09:54:03 +00003870int
3871main ()
3872{
3873
3874 ;
3875 return 0;
3876}
3877_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003878if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003879 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003880else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003881 CFLAGS=""
3882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003883/* end confdefs.h. */
3884
3885int
3886main ()
3887{
3888
3889 ;
3890 return 0;
3891}
3892_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003893if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003894
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003895else
3896 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00003897 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003899/* end confdefs.h. */
3900
3901int
3902main ()
3903{
3904
3905 ;
3906 return 0;
3907}
3908_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003909if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003910 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3917 ac_c_werror_flag=$ac_save_c_werror_flag
3918fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3920$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003921if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003922 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003923elif test $ac_cv_prog_cc_g = yes; then
3924 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003925 CFLAGS="-g -O2"
3926 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003927 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003928 fi
3929else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003930 if test "$GCC" = yes; then
3931 CFLAGS="-O2"
3932 else
3933 CFLAGS=
3934 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003935fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3937$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3938if test "${ac_cv_prog_cc_c89+set}" = set; then :
3939 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003940else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003941 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003942ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003944/* end confdefs.h. */
3945#include <stdarg.h>
3946#include <stdio.h>
3947#include <sys/types.h>
3948#include <sys/stat.h>
3949/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3950struct buf { int x; };
3951FILE * (*rcsopen) (struct buf *, struct stat *, int);
3952static char *e (p, i)
3953 char **p;
3954 int i;
3955{
3956 return p[i];
3957}
3958static char *f (char * (*g) (char **, int), char **p, ...)
3959{
3960 char *s;
3961 va_list v;
3962 va_start (v,p);
3963 s = g (p, va_arg (v,int));
3964 va_end (v);
3965 return s;
3966}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003967
3968/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3969 function prototypes and stuff, but not '\xHH' hex character constants.
3970 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003971 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003972 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3973 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003974 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003975int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3976
Martin v. Löwiseba40652007-08-30 20:10:57 +00003977/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3978 inside strings and character constants. */
3979#define FOO(x) 'x'
3980int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3981
Skip Montanaro6dead952003-09-25 14:50:04 +00003982int test (int i, double x);
3983struct s1 {int (*f) (int a);};
3984struct s2 {int (*f) (double a);};
3985int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3986int argc;
3987char **argv;
3988int
3989main ()
3990{
3991return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3992 ;
3993 return 0;
3994}
3995_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003996for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3997 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003998do
3999 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004000 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004001 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004003rm -f core conftest.err conftest.$ac_objext
4004 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004005done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004006rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004007CC=$ac_save_CC
4008
4009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004010# AC_CACHE_VAL
4011case "x$ac_cv_prog_cc_c89" in
4012 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4014$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004015 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4017$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004018 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004019 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4021$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004022esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004023if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004024
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004025fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004026
Martin v. Löwis11437992002-04-12 09:54:03 +00004027ac_ext=c
4028ac_cpp='$CPP $CPPFLAGS'
4029ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4030ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4031ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004032
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004033if test ! -z "$preset_cflags"
4034then
4035 CFLAGS=$preset_cflags
4036fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004037
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004038
4039
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4041$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004042
Martin v. Löwiseba40652007-08-30 20:10:57 +00004043# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004044if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004045 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004046
4047 case $withval in
4048 no) with_cxx_main=no
4049 MAINCC='$(CC)';;
4050 yes) with_cxx_main=yes
4051 MAINCC='$(CXX)';;
4052 *) with_cxx_main=yes
4053 MAINCC=$withval
4054 if test -z "$CXX"
4055 then
4056 CXX=$withval
4057 fi;;
4058 esac
4059else
4060
4061 with_cxx_main=no
4062 MAINCC='$(CC)'
4063
Martin v. Löwiseba40652007-08-30 20:10:57 +00004064fi
4065
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4067$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004068
4069preset_cxx="$CXX"
4070if test -z "$CXX"
4071then
4072 case "$CC" in
4073 gcc) # Extract the first word of "g++", so it can be a program name with args.
4074set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4076$as_echo_n "checking for $ac_word... " >&6; }
4077if test "${ac_cv_path_CXX+set}" = set; then :
4078 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004079else
4080 case $CXX in
4081 [\\/]* | ?:[\\/]*)
4082 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4083 ;;
4084 *)
4085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4086for as_dir in notfound
4087do
4088 IFS=$as_save_IFS
4089 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004090 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004091 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004092 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004094 break 2
4095 fi
4096done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004097 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004098IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004099
4100 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4101 ;;
4102esac
4103fi
4104CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004105if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4107$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4110$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004111fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004112
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004113 ;;
4114 cc) # Extract the first word of "c++", so it can be a program name with args.
4115set dummy c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4117$as_echo_n "checking for $ac_word... " >&6; }
4118if test "${ac_cv_path_CXX+set}" = set; then :
4119 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004120else
4121 case $CXX in
4122 [\\/]* | ?:[\\/]*)
4123 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4124 ;;
4125 *)
4126 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4127for as_dir in notfound
4128do
4129 IFS=$as_save_IFS
4130 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004131 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004132 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004133 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004134 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004135 break 2
4136 fi
4137done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004138 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004139IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004140
4141 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4142 ;;
4143esac
4144fi
4145CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004146if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4148$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004149else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4151$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004152fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004153
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004154 ;;
4155 esac
4156 if test "$CXX" = "notfound"
4157 then
4158 CXX=""
4159 fi
4160fi
4161if test -z "$CXX"
4162then
4163 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4164do
4165 # Extract the first word of "$ac_prog", so it can be a program name with args.
4166set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4168$as_echo_n "checking for $ac_word... " >&6; }
4169if test "${ac_cv_prog_CXX+set}" = set; then :
4170 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004171else
4172 if test -n "$CXX"; then
4173 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4174else
4175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4176for as_dir in $PATH
4177do
4178 IFS=$as_save_IFS
4179 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004180 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004181 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004182 ac_cv_prog_CXX="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004183 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004184 break 2
4185 fi
4186done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004187 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004188IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004189
4190fi
4191fi
4192CXX=$ac_cv_prog_CXX
4193if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4195$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004196else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4198$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004199fi
4200
Martin v. Löwiseba40652007-08-30 20:10:57 +00004201
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004202 test -n "$CXX" && break
4203done
4204test -n "$CXX" || CXX="notfound"
4205
4206 if test "$CXX" = "notfound"
4207 then
4208 CXX=""
4209 fi
4210fi
4211if test "$preset_cxx" != "$CXX"
4212then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004213 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004214
4215 By default, distutils will build C++ extension modules with \"$CXX\".
4216 If this is not intended, then set CXX on the configure command line.
4217 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004218$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004219
4220 By default, distutils will build C++ extension modules with \"$CXX\".
4221 If this is not intended, then set CXX on the configure command line.
4222 " >&2;}
4223fi
4224
4225
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004226# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004227
4228ac_ext=c
4229ac_cpp='$CPP $CPPFLAGS'
4230ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4231ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4232ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4234$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004235# On Suns, sometimes $CPP names a directory.
4236if test -n "$CPP" && test -d "$CPP"; then
4237 CPP=
4238fi
4239if test -z "$CPP"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004240 if test "${ac_cv_prog_CPP+set}" = set; then :
4241 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004242else
Martin v. Löwis11437992002-04-12 09:54:03 +00004243 # Double quotes because CPP needs to be expanded
4244 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4245 do
4246 ac_preproc_ok=false
4247for ac_c_preproc_warn_flag in '' yes
4248do
4249 # Use a header file that comes with gcc, so configuring glibc
4250 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004251 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4252 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004253 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004254 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004256/* end confdefs.h. */
4257#ifdef __STDC__
4258# include <limits.h>
4259#else
4260# include <assert.h>
4261#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004262 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004263_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004264if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004265
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004266else
Martin v. Löwis11437992002-04-12 09:54:03 +00004267 # Broken: fails on valid input.
4268continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004269fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004270rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004271
Martin v. Löwiseba40652007-08-30 20:10:57 +00004272 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004276#include <ac_nonexistent.h>
4277_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004278if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004279 # Broken: success on invalid input.
4280continue
4281else
Martin v. Löwis11437992002-04-12 09:54:03 +00004282 # Passes both tests.
4283ac_preproc_ok=:
4284break
4285fi
4286rm -f conftest.err conftest.$ac_ext
4287
4288done
4289# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4290rm -f conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004291if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004292 break
4293fi
4294
4295 done
4296 ac_cv_prog_CPP=$CPP
4297
4298fi
4299 CPP=$ac_cv_prog_CPP
4300else
4301 ac_cv_prog_CPP=$CPP
4302fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4304$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004305ac_preproc_ok=false
4306for ac_c_preproc_warn_flag in '' yes
4307do
4308 # Use a header file that comes with gcc, so configuring glibc
4309 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004310 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4311 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004312 # On the NeXT, cc -E runs the code through the compiler's parser,
4313 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004315/* end confdefs.h. */
4316#ifdef __STDC__
4317# include <limits.h>
4318#else
4319# include <assert.h>
4320#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004321 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004322_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004323if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004324
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004325else
Martin v. Löwis11437992002-04-12 09:54:03 +00004326 # Broken: fails on valid input.
4327continue
4328fi
4329rm -f conftest.err conftest.$ac_ext
4330
Martin v. Löwiseba40652007-08-30 20:10:57 +00004331 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004332 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004334/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004335#include <ac_nonexistent.h>
4336_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004337if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004338 # Broken: success on invalid input.
4339continue
4340else
Martin v. Löwis11437992002-04-12 09:54:03 +00004341 # Passes both tests.
4342ac_preproc_ok=:
4343break
4344fi
4345rm -f conftest.err conftest.$ac_ext
4346
4347done
4348# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4349rm -f conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004350if $ac_preproc_ok; then :
4351
Martin v. Löwis11437992002-04-12 09:54:03 +00004352else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004353 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4354$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4355as_fn_error "C preprocessor \"$CPP\" fails sanity check
4356See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004357fi
4358
4359ac_ext=c
4360ac_cpp='$CPP $CPPFLAGS'
4361ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4362ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4363ac_compiler_gnu=$ac_cv_c_compiler_gnu
4364
4365
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4367$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4368if test "${ac_cv_path_GREP+set}" = set; then :
4369 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004370else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004371 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004372 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004373 # Loop through the user's path and test for each of PROGNAME-LIST
4374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004375for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4376do
4377 IFS=$as_save_IFS
4378 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004379 for ac_prog in grep ggrep; do
4380 for ac_exec_ext in '' $ac_executable_extensions; do
4381 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4382 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4383# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004384 # Check for GNU $ac_path_GREP
4385case `"$ac_path_GREP" --version 2>&1` in
4386*GNU*)
4387 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4388*)
4389 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004390 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004391 while :
4392 do
4393 cat "conftest.in" "conftest.in" >"conftest.tmp"
4394 mv "conftest.tmp" "conftest.in"
4395 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004396 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004397 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4398 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004399 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004400 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4401 # Best one so far, save it but keep looking for a better one
4402 ac_cv_path_GREP="$ac_path_GREP"
4403 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004404 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004405 # 10*(2^10) chars as input seems more than enough
4406 test $ac_count -gt 10 && break
4407 done
4408 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4409esac
4410
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004411 $ac_path_GREP_found && break 3
4412 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004413 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004414 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004415IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004416 if test -z "$ac_cv_path_GREP"; then
4417 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4418 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004419else
4420 ac_cv_path_GREP=$GREP
4421fi
4422
Martin v. Löwiseba40652007-08-30 20:10:57 +00004423fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4425$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004426 GREP="$ac_cv_path_GREP"
4427
4428
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4430$as_echo_n "checking for egrep... " >&6; }
4431if test "${ac_cv_path_EGREP+set}" = set; then :
4432 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004433else
4434 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4435 then ac_cv_path_EGREP="$GREP -E"
4436 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004437 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004438 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004439 # Loop through the user's path and test for each of PROGNAME-LIST
4440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004441for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4442do
4443 IFS=$as_save_IFS
4444 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004445 for ac_prog in egrep; do
4446 for ac_exec_ext in '' $ac_executable_extensions; do
4447 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4448 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4449# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004450 # Check for GNU $ac_path_EGREP
4451case `"$ac_path_EGREP" --version 2>&1` in
4452*GNU*)
4453 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4454*)
4455 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004456 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004457 while :
4458 do
4459 cat "conftest.in" "conftest.in" >"conftest.tmp"
4460 mv "conftest.tmp" "conftest.in"
4461 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004462 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004463 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4464 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004465 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004466 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4467 # Best one so far, save it but keep looking for a better one
4468 ac_cv_path_EGREP="$ac_path_EGREP"
4469 ac_path_EGREP_max=$ac_count
4470 fi
4471 # 10*(2^10) chars as input seems more than enough
4472 test $ac_count -gt 10 && break
4473 done
4474 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4475esac
4476
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004477 $ac_path_EGREP_found && break 3
4478 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004479 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004480 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004481IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004482 if test -z "$ac_cv_path_EGREP"; then
4483 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4484 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004485else
4486 ac_cv_path_EGREP=$EGREP
4487fi
4488
Martin v. Löwiseba40652007-08-30 20:10:57 +00004489 fi
4490fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4492$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004493 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004494
4495
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4497$as_echo_n "checking for ANSI C header files... " >&6; }
4498if test "${ac_cv_header_stdc+set}" = set; then :
4499 $as_echo_n "(cached) " >&6
4500else
4501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004502/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004503#include <stdlib.h>
4504#include <stdarg.h>
4505#include <string.h>
4506#include <float.h>
4507
4508int
4509main ()
4510{
4511
4512 ;
4513 return 0;
4514}
4515_ACEOF
4516if ac_fn_c_try_compile "$LINENO"; then :
4517 ac_cv_header_stdc=yes
4518else
4519 ac_cv_header_stdc=no
4520fi
4521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4522
4523if test $ac_cv_header_stdc = yes; then
4524 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4526/* end confdefs.h. */
4527#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004528
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004529_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004530if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004531 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004532
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004533else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004534 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004535fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004536rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004537
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004538fi
4539
4540if test $ac_cv_header_stdc = yes; then
4541 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4543/* end confdefs.h. */
4544#include <stdlib.h>
4545
4546_ACEOF
4547if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4548 $EGREP "free" >/dev/null 2>&1; then :
4549
4550else
4551 ac_cv_header_stdc=no
4552fi
4553rm -f conftest*
4554
4555fi
4556
4557if test $ac_cv_header_stdc = yes; then
4558 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4559 if test "$cross_compiling" = yes; then :
4560 :
4561else
4562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4563/* end confdefs.h. */
4564#include <ctype.h>
4565#include <stdlib.h>
4566#if ((' ' & 0x0FF) == 0x020)
4567# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4568# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4569#else
4570# define ISLOWER(c) \
4571 (('a' <= (c) && (c) <= 'i') \
4572 || ('j' <= (c) && (c) <= 'r') \
4573 || ('s' <= (c) && (c) <= 'z'))
4574# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4575#endif
4576
4577#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4578int
4579main ()
4580{
4581 int i;
4582 for (i = 0; i < 256; i++)
4583 if (XOR (islower (i), ISLOWER (i))
4584 || toupper (i) != TOUPPER (i))
4585 return 2;
4586 return 0;
4587}
4588_ACEOF
4589if ac_fn_c_try_run "$LINENO"; then :
4590
4591else
4592 ac_cv_header_stdc=no
4593fi
4594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4595 conftest.$ac_objext conftest.beam conftest.$ac_ext
4596fi
4597
4598fi
4599fi
4600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4601$as_echo "$ac_cv_header_stdc" >&6; }
4602if test $ac_cv_header_stdc = yes; then
4603
4604$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4605
4606fi
4607
4608# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4609for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4610 inttypes.h stdint.h unistd.h
4611do :
4612 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4613ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4614"
4615eval as_val=\$$as_ac_Header
4616 if test "x$as_val" = x""yes; then :
4617 cat >>confdefs.h <<_ACEOF
4618#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4619_ACEOF
4620
4621fi
4622
4623done
4624
4625
4626
4627 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4628if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4629 MINIX=yes
4630else
4631 MINIX=
4632fi
4633
4634
4635 if test "$MINIX" = yes; then
4636
4637$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4638
4639
4640$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4641
4642
4643$as_echo "#define _MINIX 1" >>confdefs.h
4644
4645 fi
4646
4647
4648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4649$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4650if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4651 $as_echo_n "(cached) " >&6
4652else
4653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4654/* end confdefs.h. */
4655
4656# define __EXTENSIONS__ 1
4657 $ac_includes_default
4658int
4659main ()
4660{
4661
4662 ;
4663 return 0;
4664}
4665_ACEOF
4666if ac_fn_c_try_compile "$LINENO"; then :
4667 ac_cv_safe_to_define___extensions__=yes
4668else
4669 ac_cv_safe_to_define___extensions__=no
4670fi
4671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4672fi
4673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4674$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4675 test $ac_cv_safe_to_define___extensions__ = yes &&
4676 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4677
4678 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4679
4680 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4681
4682 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4683
4684 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4685
4686
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004687
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004688# Check for unsupported systems
4689case $ac_sys_system/$ac_sys_release in
4690atheos*|Linux*/1*)
4691 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4692 echo See README for details.
4693 exit 1;;
4694esac
4695
4696
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4698$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004699
4700# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004701if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004702 withval=$with_suffix;
4703 case $withval in
4704 no) EXEEXT=;;
4705 yes) EXEEXT=.exe;;
4706 *) EXEEXT=$withval;;
4707 esac
4708fi
4709
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4711$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004712
4713# Test whether we're running on a non-case-sensitive system, in which
4714# case we give a warning if no ext is given
4715
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4717$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004718if test ! -d CaseSensitiveTestDir; then
4719mkdir CaseSensitiveTestDir
4720fi
4721
4722if test -d casesensitivetestdir
4723then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4725$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004726 BUILDEXEEXT=.exe
4727else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4729$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004730 BUILDEXEEXT=$EXEEXT
4731fi
4732rmdir CaseSensitiveTestDir
4733
4734case $MACHDEP in
4735bsdos*)
4736 case $CC in
4737 gcc) CC="$CC -D_HAVE_BSDI";;
4738 esac;;
4739esac
4740
4741case $ac_sys_system in
4742hp*|HP*)
4743 case $CC in
4744 cc|*/cc) CC="$CC -Ae";;
4745 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004746SunOS*)
4747 # Some functions have a prototype only with that define, e.g. confstr
4748
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004749$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004750
4751 ;;
4752esac
4753
4754
4755
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4757$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004758if test -z "$LIBRARY"
4759then
4760 LIBRARY='libpython$(VERSION).a'
4761fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4763$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004764
4765# LDLIBRARY is the name of the library to link against (as opposed to the
4766# name of the library into which to insert object files). BLDLIBRARY is also
4767# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4768# is blank as the main program is not linked directly against LDLIBRARY.
4769# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4770# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4771# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4772# DLLLIBRARY is the shared (i.e., DLL) library.
4773#
4774# RUNSHARED is used to run shared python without installed libraries
4775#
4776# INSTSONAME is the name of the shared library that will be use to install
4777# on the system - some systems like version suffix, others don't
4778
4779
4780
4781
4782
4783
4784LDLIBRARY="$LIBRARY"
4785BLDLIBRARY='$(LDLIBRARY)'
4786INSTSONAME='$(LDLIBRARY)'
4787DLLLIBRARY=''
4788LDLIBRARYDIR=''
4789RUNSHARED=''
4790
4791# LINKCC is the command that links the python executable -- default is $(CC).
4792# If CXX is set, and if it is needed to link a main function that was
4793# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4794# python might then depend on the C++ runtime
4795# This is altered for AIX in order to build the export list before
4796# linking.
4797
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4799$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004800if test -z "$LINKCC"
4801then
4802 LINKCC='$(PURIFY) $(MAINCC)'
4803 case $ac_sys_system in
4804 AIX*)
4805 exp_extra="\"\""
4806 if test $ac_sys_release -ge 5 -o \
4807 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4808 exp_extra="."
4809 fi
4810 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004811 QNX*)
4812 # qcc must be used because the other compilers do not
4813 # support -N.
4814 LINKCC=qcc;;
4815 esac
4816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4818$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004819
4820# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4821# make sure we default having it set to "no": this is used by
4822# distutils.unixccompiler to know if it should add --enable-new-dtags
4823# to linker command lines, and failing to detect GNU ld simply results
4824# in the same bahaviour as before.
4825
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4827$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004828ac_prog=ld
4829if test "$GCC" = yes; then
4830 ac_prog=`$CC -print-prog-name=ld`
4831fi
4832case `"$ac_prog" -V 2>&1 < /dev/null` in
4833 *GNU*)
4834 GNULD=yes;;
4835 *)
4836 GNULD=no;;
4837esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4839$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004840
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4842$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004843# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004844if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004845 enableval=$enable_shared;
4846fi
4847
4848
4849if test -z "$enable_shared"
4850then
4851 case $ac_sys_system in
4852 CYGWIN* | atheos*)
4853 enable_shared="yes";;
4854 *)
4855 enable_shared="no";;
4856 esac
4857fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4859$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004860
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4862$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004863# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004864if test "${enable_profiling+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004865 enableval=$enable_profiling; ac_save_cc="$CC"
4866 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004867 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004868 ac_enable_profiling="no"
4869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004871/* end confdefs.h. */
4872int main() { return 0; }
4873_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004874if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004875 ac_enable_profiling="yes"
4876else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004877 ac_enable_profiling="no"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004878fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004879rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4880 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004881fi
4882
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004883 CC="$ac_save_cc"
4884fi
4885
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4887$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004888
4889case "$ac_enable_profiling" in
4890 "yes")
4891 BASECFLAGS="-pg $BASECFLAGS"
4892 LDFLAGS="-pg $LDFLAGS"
4893 ;;
4894esac
4895
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4897$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004898
4899# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4900# library that we build, but we do not want to link against it (we
4901# will find it with a -framework option). For this reason there is an
4902# extra variable BLDLIBRARY against which Python and the extension
4903# modules are linked, BLDLIBRARY. This is normally the same as
4904# LDLIBRARY, but empty for MacOSX framework builds.
4905if test "$enable_framework"
4906then
4907 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4908 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4909 BLDLIBRARY=''
4910else
4911 BLDLIBRARY='$(LDLIBRARY)'
4912fi
4913
4914# Other platforms follow
4915if test $enable_shared = "yes"; then
4916
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004917$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004918
4919 case $ac_sys_system in
4920 BeOS*)
4921 LDLIBRARY='libpython$(VERSION).so'
4922 ;;
4923 CYGWIN*)
4924 LDLIBRARY='libpython$(VERSION).dll.a'
4925 DLLLIBRARY='libpython$(VERSION).dll'
4926 ;;
4927 SunOS*)
4928 LDLIBRARY='libpython$(VERSION).so'
4929 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4930 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4931 INSTSONAME="$LDLIBRARY".$SOVERSION
4932 ;;
4933 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4934 LDLIBRARY='libpython$(VERSION).so'
4935 BLDLIBRARY='-L. -lpython$(VERSION)'
4936 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4937 case $ac_sys_system in
4938 FreeBSD*)
4939 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4940 ;;
4941 esac
4942 INSTSONAME="$LDLIBRARY".$SOVERSION
4943 ;;
4944 hp*|HP*)
4945 case `uname -m` in
4946 ia64)
4947 LDLIBRARY='libpython$(VERSION).so'
4948 ;;
4949 *)
4950 LDLIBRARY='libpython$(VERSION).sl'
4951 ;;
4952 esac
4953 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4954 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4955 ;;
4956 OSF*)
4957 LDLIBRARY='libpython$(VERSION).so'
4958 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4959 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4960 ;;
4961 atheos*)
4962 LDLIBRARY='libpython$(VERSION).so'
4963 BLDLIBRARY='-L. -lpython$(VERSION)'
4964 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4965 ;;
4966 Darwin*)
4967 LDLIBRARY='libpython$(VERSION).dylib'
4968 BLDLIBRARY='-L. -lpython$(VERSION)'
4969 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4970 ;;
4971
4972 esac
4973else # shared is disabled
4974 case $ac_sys_system in
4975 CYGWIN*)
4976 BLDLIBRARY='$(LIBRARY)'
4977 LDLIBRARY='libpython$(VERSION).dll.a'
4978 ;;
4979 esac
4980fi
4981
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4983$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004984
4985if test -n "$ac_tool_prefix"; then
4986 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4987set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4989$as_echo_n "checking for $ac_word... " >&6; }
4990if test "${ac_cv_prog_RANLIB+set}" = set; then :
4991 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004992else
4993 if test -n "$RANLIB"; then
4994 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4995else
4996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4997for as_dir in $PATH
4998do
4999 IFS=$as_save_IFS
5000 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005001 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005002 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5003 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005004 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005005 break 2
5006 fi
5007done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005008 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005009IFS=$as_save_IFS
5010
5011fi
5012fi
5013RANLIB=$ac_cv_prog_RANLIB
5014if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5016$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005017else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5019$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005020fi
5021
5022
5023fi
5024if test -z "$ac_cv_prog_RANLIB"; then
5025 ac_ct_RANLIB=$RANLIB
5026 # Extract the first word of "ranlib", so it can be a program name with args.
5027set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5029$as_echo_n "checking for $ac_word... " >&6; }
5030if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5031 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005032else
5033 if test -n "$ac_ct_RANLIB"; then
5034 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5035else
5036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5037for as_dir in $PATH
5038do
5039 IFS=$as_save_IFS
5040 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005041 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005042 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5043 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005045 break 2
5046 fi
5047done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005048 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005049IFS=$as_save_IFS
5050
5051fi
5052fi
5053ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5054if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5056$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005057else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5059$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005060fi
5061
5062 if test "x$ac_ct_RANLIB" = x; then
5063 RANLIB=":"
5064 else
5065 case $cross_compiling:$ac_tool_warned in
5066yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005067{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5068$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005069ac_tool_warned=yes ;;
5070esac
5071 RANLIB=$ac_ct_RANLIB
5072 fi
5073else
5074 RANLIB="$ac_cv_prog_RANLIB"
5075fi
5076
5077
5078for ac_prog in ar aal
5079do
5080 # Extract the first word of "$ac_prog", so it can be a program name with args.
5081set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5083$as_echo_n "checking for $ac_word... " >&6; }
5084if test "${ac_cv_prog_AR+set}" = set; then :
5085 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005086else
5087 if test -n "$AR"; then
5088 ac_cv_prog_AR="$AR" # Let the user override the test.
5089else
5090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5091for as_dir in $PATH
5092do
5093 IFS=$as_save_IFS
5094 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005095 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005096 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5097 ac_cv_prog_AR="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005099 break 2
5100 fi
5101done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005102 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005103IFS=$as_save_IFS
5104
5105fi
5106fi
5107AR=$ac_cv_prog_AR
5108if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5110$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005111else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5113$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005114fi
5115
5116
5117 test -n "$AR" && break
5118done
5119test -n "$AR" || AR="ar"
5120
5121
5122# tweak ARFLAGS only if the user didn't set it on the command line
5123
5124if test -z "$ARFLAGS"
5125then
5126 ARFLAGS="rc"
5127fi
5128
5129
5130# Extract the first word of "svnversion", so it can be a program name with args.
5131set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5133$as_echo_n "checking for $ac_word... " >&6; }
5134if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5135 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005136else
5137 if test -n "$SVNVERSION"; then
5138 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5139else
5140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5141for as_dir in $PATH
5142do
5143 IFS=$as_save_IFS
5144 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005145 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005146 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5147 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005148 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005149 break 2
5150 fi
5151done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005152 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005153IFS=$as_save_IFS
5154
5155 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5156fi
5157fi
5158SVNVERSION=$ac_cv_prog_SVNVERSION
5159if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5161$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005162else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5164$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005165fi
5166
5167
5168if test $SVNVERSION = found
5169then
5170 SVNVERSION="svnversion \$(srcdir)"
5171else
5172 SVNVERSION="echo Unversioned directory"
5173fi
5174
5175case $MACHDEP in
5176bsdos*|hp*|HP*)
5177 # install -d does not work on BSDI or HP-UX
5178 if test -z "$INSTALL"
5179 then
5180 INSTALL="${srcdir}/install-sh -c"
5181 fi
5182esac
5183ac_aux_dir=
5184for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005185 for ac_t in install-sh install.sh shtool; do
5186 if test -f "$ac_dir/$ac_t"; then
5187 ac_aux_dir=$ac_dir
5188 ac_install_sh="$ac_aux_dir/$ac_t -c"
5189 break 2
5190 fi
5191 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005192done
5193if test -z "$ac_aux_dir"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005194 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005195fi
5196
5197# These three variables are undocumented and unsupported,
5198# and are intended to be withdrawn in a future Autoconf release.
5199# They can cause serious problems if a builder's source tree is in a directory
5200# whose full name contains unusual characters.
5201ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5202ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5203ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5204
5205
5206# Find a good install program. We prefer a C program (faster),
5207# so one script is as good as another. But avoid the broken or
5208# incompatible versions:
5209# SysV /etc/install, /usr/sbin/install
5210# SunOS /usr/etc/install
5211# IRIX /sbin/install
5212# AIX /bin/install
5213# AmigaOS /C/install, which installs bootblocks on floppy discs
5214# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5215# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5216# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5217# OS/2's system install, which has a completely different semantic
5218# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005219# Reject install programs that cannot install multiple files.
5220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5221$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005222if test -z "$INSTALL"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005223if test "${ac_cv_path_install+set}" = set; then :
5224 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005225else
5226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5227for as_dir in $PATH
5228do
5229 IFS=$as_save_IFS
5230 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005231 # Account for people who put trailing slashes in PATH elements.
5232case $as_dir/ in #((
5233 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005234 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005235 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005236 /usr/ucb/* ) ;;
5237 *)
5238 # OSF1 and SCO ODT 3.0 have their own names for install.
5239 # Don't use installbsd from OSF since it installs stuff as root
5240 # by default.
5241 for ac_prog in ginstall scoinst install; do
5242 for ac_exec_ext in '' $ac_executable_extensions; do
5243 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5244 if test $ac_prog = install &&
5245 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5246 # AIX install. It has an incompatible calling convention.
5247 :
5248 elif test $ac_prog = install &&
5249 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5250 # program-specific install script used by HP pwplus--don't use.
5251 :
5252 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005253 rm -rf conftest.one conftest.two conftest.dir
5254 echo one > conftest.one
5255 echo two > conftest.two
5256 mkdir conftest.dir
5257 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5258 test -s conftest.one && test -s conftest.two &&
5259 test -s conftest.dir/conftest.one &&
5260 test -s conftest.dir/conftest.two
5261 then
5262 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5263 break 3
5264 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005265 fi
5266 fi
5267 done
5268 done
5269 ;;
5270esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005271
5272 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005273IFS=$as_save_IFS
5274
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005275rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005276
5277fi
5278 if test "${ac_cv_path_install+set}" = set; then
5279 INSTALL=$ac_cv_path_install
5280 else
5281 # As a last resort, use the slow shell script. Don't cache a
5282 # value for INSTALL within a source directory, because that will
5283 # break other packages using the cache if that directory is
5284 # removed, or if the value is a relative name.
5285 INSTALL=$ac_install_sh
5286 fi
5287fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5289$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005290
5291# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5292# It thinks the first close brace ends the variable substitution.
5293test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5294
5295test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5296
5297test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5298
5299
5300# Not every filesystem supports hard links
5301
5302if test -z "$LN" ; then
5303 case $ac_sys_system in
5304 BeOS*) LN="ln -s";;
5305 CYGWIN*) LN="ln -s";;
5306 atheos*) LN="ln -s";;
5307 *) LN=ln;;
5308 esac
5309fi
5310
5311# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5313$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005314
5315# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005316if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005317 withval=$with_pydebug;
5318if test "$withval" != no
5319then
5320
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005321$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005322
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5324$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005325 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005326else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5327$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005328fi
5329else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5331$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005332fi
5333
5334
5335# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5336# merged with this chunk of code?
5337
5338# Optimizer/debugger flags
5339# ------------------------
5340# (The following bit of code is complicated enough - please keep things
5341# indented properly. Just pretend you're editing Python code. ;-)
5342
5343# There are two parallel sets of case statements below, one that checks to
5344# see if OPT was set and one that does BASECFLAGS setting based upon
5345# compiler and platform. BASECFLAGS tweaks need to be made even if the
5346# user set OPT.
5347
5348# tweak OPT based on compiler and platform, only if the user didn't set
5349# it on the command line
5350
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005351if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005352then
5353 case $GCC in
5354 yes)
5355 if test "$CC" != 'g++' ; then
5356 STRICT_PROTO="-Wstrict-prototypes"
5357 fi
5358 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5359 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5360 WRAP="-fwrapv"
5361 fi
5362 case $ac_cv_prog_cc_g in
5363 yes)
5364 if test "$Py_DEBUG" = 'true' ; then
5365 # Optimization messes up debuggers, so turn it off for
5366 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005367 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005368 else
5369 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5370 fi
5371 ;;
5372 *)
5373 OPT="-O3 -Wall $STRICT_PROTO"
5374 ;;
5375 esac
5376 case $ac_sys_system in
5377 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5378 ;;
5379 esac
5380 ;;
5381
5382 *)
5383 OPT="-O"
5384 ;;
5385 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005386fi
5387
5388
5389
5390# The -arch flags for universal builds on OSX
5391UNIVERSAL_ARCH_FLAGS=
5392
5393
5394# tweak BASECFLAGS based on compiler and platform
5395case $GCC in
5396yes)
5397 # Python violates C99 rules, by casting between incompatible
5398 # pointer types. GCC may generate bad code as a result of that,
5399 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5401$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005402 ac_save_cc="$CC"
5403 CC="$CC -fno-strict-aliasing"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005404 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then :
5405 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005406else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005408/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005409
5410int
5411main ()
5412{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005413int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00005414 ;
5415 return 0;
5416}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005417_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005418if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005419 ac_cv_no_strict_aliasing_ok=yes
5420else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005421 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005422fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005424fi
5425
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005426 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5428$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005429 if test $ac_cv_no_strict_aliasing_ok = yes
5430 then
5431 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5432 fi
5433
5434 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5435 # support. Without this, treatment of subnormals doesn't follow
5436 # the standard.
5437 case $ac_sys_machine in
5438 alpha*)
5439 BASECFLAGS="$BASECFLAGS -mieee"
5440 ;;
5441 esac
5442
5443 case $ac_sys_system in
5444 SCO_SV*)
5445 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5446 ;;
5447 # is there any other compiler on Darwin besides gcc?
5448 Darwin*)
5449 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5450 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005451 if test "${CC}" = gcc
5452 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5454$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005455 case "${UNIVERSALSDK}" in
5456 */MacOSX10.4u.sdk)
5457 # Build using 10.4 SDK, force usage of gcc when the
5458 # compiler is gcc, otherwise the user will get very
5459 # confusing error messages when building on OSX 10.6
5460 CC=gcc-4.0
5461 CPP=cpp-4.0
5462 ;;
5463 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5465$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005466 fi
5467
5468 # Calculate the right deployment target for this build.
5469 #
5470 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5471 if test ${cur_target} '>' 10.2; then
5472 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00005473 if test ${enable_universalsdk}; then
5474 if test "${UNIVERSAL_ARCHS}" = "all"; then
5475 # Ensure that the default platform for a
5476 # 4-way universal build is OSX 10.5,
5477 # that's the first OS release where
5478 # 4-way builds make sense.
5479 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00005480
5481 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5482 cur_target='10.5'
5483
5484 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5485 cur_target='10.5'
5486
5487 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5488 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00005489 fi
5490 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00005491 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00005492 # On Intel macs default to a deployment
5493 # target of 10.4, that's the first OSX
5494 # release with Intel support.
5495 cur_target="10.4"
5496 fi
5497 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005498 fi
5499 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5500
5501 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5502 # environment with a value that is the same as what we'll use
5503 # in the Makefile to ensure that we'll get the same compiler
5504 # environment during configure and build time.
5505 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5506 export MACOSX_DEPLOYMENT_TARGET
5507 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5508
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005509 if test "${enable_universalsdk}"; then
5510 UNIVERSAL_ARCH_FLAGS=""
5511 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5512 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5513 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00005514 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005515
5516 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5517 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5518 LIPO_32BIT_FLAGS=""
5519 ARCH_RUN_32BIT="true"
5520
5521 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5522 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5523 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005524 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005525
5526 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5527 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5528 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005529 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005530
5531 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5532 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5533 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00005534 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005535
5536 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005537 as_fn_error "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005538
5539 fi
5540
5541
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00005542 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
5543 if test "${UNIVERSALSDK}" != "/"
5544 then
5545 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
5546 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5547 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005548 fi
5549
5550 fi
5551
5552
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005553 ;;
5554 OSF*)
5555 BASECFLAGS="$BASECFLAGS -mieee"
5556 ;;
5557 esac
5558 ;;
5559
5560*)
5561 case $ac_sys_system in
5562 OpenUNIX*|UnixWare*)
5563 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5564 ;;
5565 OSF*)
5566 BASECFLAGS="$BASECFLAGS -ieee -std"
5567 ;;
5568 SCO_SV*)
5569 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5570 ;;
5571 esac
5572 ;;
5573esac
5574
5575if test "$Py_DEBUG" = 'true'; then
5576 :
5577else
5578 OPT="-DNDEBUG $OPT"
5579fi
5580
5581if test "$ac_arch_flags"
5582then
5583 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5584fi
5585
5586# disable check for icc since it seems to pass, but generates a warning
5587if test "$CC" = icc
5588then
5589 ac_cv_opt_olimit_ok=no
5590fi
5591
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5593$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5594if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5595 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005596else
5597 ac_save_cc="$CC"
5598CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005600/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005601
5602int
5603main ()
5604{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005605int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00005606 ;
5607 return 0;
5608}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005609_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005610if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005611 ac_cv_opt_olimit_ok=yes
5612else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005613 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005614
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005615fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005617CC="$ac_save_cc"
5618fi
5619
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5621$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005622if test $ac_cv_opt_olimit_ok = yes; then
5623 case $ac_sys_system in
5624 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5625 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5626 # environment?
5627 Darwin*)
5628 ;;
5629 *)
5630 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5631 ;;
5632 esac
5633else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5635$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5636 if test "${ac_cv_olimit_ok+set}" = set; then :
5637 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005638else
5639 ac_save_cc="$CC"
5640 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005642/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005643
5644int
5645main ()
5646{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005647int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00005648 ;
5649 return 0;
5650}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005651_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005652if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005653 ac_cv_olimit_ok=yes
5654else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005655 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005656
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005657fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005659 CC="$ac_save_cc"
5660fi
5661
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5663$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005664 if test $ac_cv_olimit_ok = yes; then
5665 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5666 fi
5667fi
5668
5669# Check whether GCC supports PyArg_ParseTuple format
5670if test "$GCC" = "yes"
5671then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5673$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005674 save_CFLAGS=$CFLAGS
5675 CFLAGS="$CFLAGS -Werror"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005677/* end confdefs.h. */
5678
5679 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005680int
5681main ()
5682{
5683
5684 ;
5685 return 0;
5686}
Matthias Klosec511b472010-05-08 11:01:39 +00005687
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005688_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005689if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005690
Matthias Klosec511b472010-05-08 11:01:39 +00005691
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005692$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005693
Matthias Klosec511b472010-05-08 11:01:39 +00005694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005695$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00005696
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005697else
Matthias Klosec511b472010-05-08 11:01:39 +00005698
5699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005700$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005701
5702fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5704 CFLAGS=$save_CFLAGS
5705fi
5706
5707# On some compilers, pthreads are available without further options
5708# (e.g. MacOS X). On some of these systems, the compiler will not
5709# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5710# So we have to see first whether pthreads are available without
5711# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5713$as_echo_n "checking whether pthreads are available without options... " >&6; }
5714if test "${ac_cv_pthread_is_default+set}" = set; then :
5715 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005716else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005717 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005718 ac_cv_pthread_is_default=no
5719else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005721/* end confdefs.h. */
5722
5723#include <pthread.h>
5724
5725void* routine(void* p){return NULL;}
5726
5727int main(){
5728 pthread_t p;
5729 if(pthread_create(&p,NULL,routine,NULL)!=0)
5730 return 1;
5731 (void)pthread_detach(p);
5732 return 0;
5733}
5734
5735_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005736if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005737
5738 ac_cv_pthread_is_default=yes
5739 ac_cv_kthread=no
5740 ac_cv_pthread=no
5741
5742else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005743 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005744fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005745rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5746 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005747fi
5748
5749
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005750fi
5751
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5753$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005754
5755
5756if test $ac_cv_pthread_is_default = yes
5757then
5758 ac_cv_kpthread=no
5759else
5760# -Kpthread, if available, provides the right #defines
5761# and linker options to make pthread_create available
5762# Some compilers won't report that they do not support -Kpthread,
5763# so we need to run a program to see whether it really made the
5764# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5766$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5767if test "${ac_cv_kpthread+set}" = set; then :
5768 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005769else
5770 ac_save_cc="$CC"
5771CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005772if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005773 ac_cv_kpthread=no
5774else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005776/* end confdefs.h. */
5777
5778#include <pthread.h>
5779
5780void* routine(void* p){return NULL;}
5781
5782int main(){
5783 pthread_t p;
5784 if(pthread_create(&p,NULL,routine,NULL)!=0)
5785 return 1;
5786 (void)pthread_detach(p);
5787 return 0;
5788}
5789
5790_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005791if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005792 ac_cv_kpthread=yes
5793else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005794 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005795fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5797 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005798fi
5799
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005800CC="$ac_save_cc"
5801fi
5802
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5804$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005805fi
5806
5807if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5808then
5809# -Kthread, if available, provides the right #defines
5810# and linker options to make pthread_create available
5811# Some compilers won't report that they do not support -Kthread,
5812# so we need to run a program to see whether it really made the
5813# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5815$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5816if test "${ac_cv_kthread+set}" = set; then :
5817 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005818else
5819 ac_save_cc="$CC"
5820CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005821if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005822 ac_cv_kthread=no
5823else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005825/* end confdefs.h. */
5826
5827#include <pthread.h>
5828
5829void* routine(void* p){return NULL;}
5830
5831int main(){
5832 pthread_t p;
5833 if(pthread_create(&p,NULL,routine,NULL)!=0)
5834 return 1;
5835 (void)pthread_detach(p);
5836 return 0;
5837}
5838
5839_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005840if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005841 ac_cv_kthread=yes
5842else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005843 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005844fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005845rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5846 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005847fi
5848
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005849CC="$ac_save_cc"
5850fi
5851
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5853$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005854fi
5855
5856if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5857then
5858# -pthread, if available, provides the right #defines
5859# and linker options to make pthread_create available
5860# Some compilers won't report that they do not support -pthread,
5861# so we need to run a program to see whether it really made the
5862# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5864$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5865if test "${ac_cv_thread+set}" = set; then :
5866 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005867else
5868 ac_save_cc="$CC"
5869CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005870if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005871 ac_cv_pthread=no
5872else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005874/* end confdefs.h. */
5875
5876#include <pthread.h>
5877
5878void* routine(void* p){return NULL;}
5879
5880int main(){
5881 pthread_t p;
5882 if(pthread_create(&p,NULL,routine,NULL)!=0)
5883 return 1;
5884 (void)pthread_detach(p);
5885 return 0;
5886}
5887
5888_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005889if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005890 ac_cv_pthread=yes
5891else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005892 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005893fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5895 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005896fi
5897
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005898CC="$ac_save_cc"
5899fi
5900
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5902$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005903fi
5904
5905# If we have set a CC compiler flag for thread support then
5906# check if it works for CXX, too.
5907ac_cv_cxx_thread=no
5908if test ! -z "$CXX"
5909then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5911$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005912ac_save_cxx="$CXX"
5913
5914if test "$ac_cv_kpthread" = "yes"
5915then
5916 CXX="$CXX -Kpthread"
5917 ac_cv_cxx_thread=yes
5918elif test "$ac_cv_kthread" = "yes"
5919then
5920 CXX="$CXX -Kthread"
5921 ac_cv_cxx_thread=yes
5922elif test "$ac_cv_pthread" = "yes"
5923then
5924 CXX="$CXX -pthread"
5925 ac_cv_cxx_thread=yes
5926fi
5927
5928if test $ac_cv_cxx_thread = yes
5929then
5930 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5931 $CXX -c conftest.$ac_ext 2>&5
5932 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5933 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5934 then
5935 ac_cv_cxx_thread=yes
5936 else
5937 ac_cv_cxx_thread=no
5938 fi
5939 rm -fr conftest*
5940fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5942$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005943fi
5944CXX="$ac_save_cxx"
5945
5946
5947# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5949$as_echo_n "checking for ANSI C header files... " >&6; }
5950if test "${ac_cv_header_stdc+set}" = set; then :
5951 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005952else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005954/* end confdefs.h. */
5955#include <stdlib.h>
5956#include <stdarg.h>
5957#include <string.h>
5958#include <float.h>
5959
5960int
5961main ()
5962{
5963
5964 ;
5965 return 0;
5966}
5967_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005968if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005969 ac_cv_header_stdc=yes
5970else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005971 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005972fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5974
5975if test $ac_cv_header_stdc = yes; then
5976 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005978/* end confdefs.h. */
5979#include <string.h>
5980
5981_ACEOF
5982if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005983 $EGREP "memchr" >/dev/null 2>&1; then :
5984
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005985else
5986 ac_cv_header_stdc=no
5987fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005988rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005989
5990fi
5991
5992if test $ac_cv_header_stdc = yes; then
5993 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005995/* end confdefs.h. */
5996#include <stdlib.h>
5997
5998_ACEOF
5999if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006000 $EGREP "free" >/dev/null 2>&1; then :
6001
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006002else
6003 ac_cv_header_stdc=no
6004fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006005rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006006
6007fi
6008
6009if test $ac_cv_header_stdc = yes; then
6010 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006011 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006012 :
6013else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006015/* end confdefs.h. */
6016#include <ctype.h>
6017#include <stdlib.h>
6018#if ((' ' & 0x0FF) == 0x020)
6019# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6020# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6021#else
6022# define ISLOWER(c) \
6023 (('a' <= (c) && (c) <= 'i') \
6024 || ('j' <= (c) && (c) <= 'r') \
6025 || ('s' <= (c) && (c) <= 'z'))
6026# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6027#endif
6028
6029#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6030int
6031main ()
6032{
6033 int i;
6034 for (i = 0; i < 256; i++)
6035 if (XOR (islower (i), ISLOWER (i))
6036 || toupper (i) != TOUPPER (i))
6037 return 2;
6038 return 0;
6039}
6040_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006041if ac_fn_c_try_run "$LINENO"; then :
6042
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006043else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006044 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006045fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006046rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6047 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006048fi
6049
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006050fi
6051fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6053$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006054if test $ac_cv_header_stdc = yes; then
6055
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006056$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006057
6058fi
6059
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006060for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6061fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006062ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006063shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006064unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006065sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6066sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006067sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00006068sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006069sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00006070sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006071bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006072do :
6073 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6074ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6075eval as_val=\$$as_ac_Header
6076 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006077 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006078#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006079_ACEOF
6080
6081fi
6082
Guido van Rossum627b2d71993-12-24 10:39:16 +00006083done
6084
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006085ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006086for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006087 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6089$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
6090if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
6091 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006092else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006094/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006095#include <sys/types.h>
6096#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006097
Martin v. Löwis11437992002-04-12 09:54:03 +00006098int
6099main ()
6100{
6101if ((DIR *) 0)
6102return 0;
6103 ;
6104 return 0;
6105}
6106_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006107if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006108 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006109else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006110 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006111fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006113fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006114eval ac_res=\$$as_ac_Header
6115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6116$as_echo "$ac_res" >&6; }
6117eval as_val=\$$as_ac_Header
6118 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006119 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006120#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006121_ACEOF
6122
6123ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006124fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006125
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006126done
6127# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6128if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6130$as_echo_n "checking for library containing opendir... " >&6; }
6131if test "${ac_cv_search_opendir+set}" = set; then :
6132 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006133else
Martin v. Löwis11437992002-04-12 09:54:03 +00006134 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006137
Martin v. Löwiseba40652007-08-30 20:10:57 +00006138/* Override any GCC internal prototype to avoid an error.
6139 Use char because int might match the return type of a GCC
6140 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006141#ifdef __cplusplus
6142extern "C"
6143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006144char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006145int
6146main ()
6147{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006148return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006149 ;
6150 return 0;
6151}
6152_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006153for ac_lib in '' dir; do
6154 if test -z "$ac_lib"; then
6155 ac_res="none required"
6156 else
6157 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006158 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006159 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006160 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006161 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006162fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006163rm -f core conftest.err conftest.$ac_objext \
6164 conftest$ac_exeext
6165 if test "${ac_cv_search_opendir+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006166 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006168done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006169if test "${ac_cv_search_opendir+set}" = set; then :
6170
Martin v. Löwiseba40652007-08-30 20:10:57 +00006171else
6172 ac_cv_search_opendir=no
6173fi
6174rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006175LIBS=$ac_func_search_save_LIBS
6176fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6178$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006179ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006180if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006181 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006182
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006183fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006184
Michael W. Hudson54241132001-12-07 15:38:26 +00006185else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6187$as_echo_n "checking for library containing opendir... " >&6; }
6188if test "${ac_cv_search_opendir+set}" = set; then :
6189 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006190else
6191 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006194
Martin v. Löwiseba40652007-08-30 20:10:57 +00006195/* Override any GCC internal prototype to avoid an error.
6196 Use char because int might match the return type of a GCC
6197 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006198#ifdef __cplusplus
6199extern "C"
6200#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006201char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006202int
6203main ()
6204{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006205return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006206 ;
6207 return 0;
6208}
6209_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006210for ac_lib in '' x; do
6211 if test -z "$ac_lib"; then
6212 ac_res="none required"
6213 else
6214 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006215 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006216 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006217 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006218 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006219fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006220rm -f core conftest.err conftest.$ac_objext \
6221 conftest$ac_exeext
6222 if test "${ac_cv_search_opendir+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006223 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006225done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006226if test "${ac_cv_search_opendir+set}" = set; then :
6227
Martin v. Löwiseba40652007-08-30 20:10:57 +00006228else
6229 ac_cv_search_opendir=no
6230fi
6231rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006232LIBS=$ac_func_search_save_LIBS
6233fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6235$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006236ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006237if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006238 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006239
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006240fi
6241
6242fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006243
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6245$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6246if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6247 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006250/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006251#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006252int
6253main ()
6254{
6255return makedev(0, 0);
6256 ;
6257 return 0;
6258}
6259_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006260if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006261 ac_cv_header_sys_types_h_makedev=yes
6262else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006263 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006264fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006265rm -f core conftest.err conftest.$ac_objext \
6266 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006267
6268fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6270$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006271
6272if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006273ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6274if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006275
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006276$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006277
6278fi
6279
6280
6281
6282 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006283 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6284if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006285
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006286$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006287
6288fi
6289
6290
6291 fi
6292fi
6293
Michael W. Hudson54241132001-12-07 15:38:26 +00006294
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006295# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006296for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006297do :
6298 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006299#ifdef HAVE_CURSES_H
6300#include <curses.h>
6301#endif
6302
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006303"
6304if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006305 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006306#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006307_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006308
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006309fi
6310
6311done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006312
6313
Martin v. Löwis11017b12006-01-14 18:12:57 +00006314# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006315for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006316do :
6317 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 +00006318#ifdef HAVE_ASM_TYPES_H
6319#include <asm/types.h>
6320#endif
6321#ifdef HAVE_SYS_SOCKET_H
6322#include <sys/socket.h>
6323#endif
6324
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006325"
6326if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006327 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006328#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006329_ACEOF
6330
6331fi
6332
6333done
6334
6335
Guido van Rossum627b2d71993-12-24 10:39:16 +00006336# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006337was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6339$as_echo_n "checking for clock_t in time.h... " >&6; }
6340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006341/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006342#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006343
6344_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006345if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006346 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006347 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006348else
Martin v. Löwis11437992002-04-12 09:54:03 +00006349
6350
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006351$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006352
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006353
Guido van Rossum627b2d71993-12-24 10:39:16 +00006354fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006355rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006356
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6358$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006359
Neal Norwitz11690112002-07-30 01:08:28 +00006360# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6362$as_echo_n "checking for makedev... " >&6; }
6363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006364/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006365
6366#if defined(MAJOR_IN_MKDEV)
6367#include <sys/mkdev.h>
6368#elif defined(MAJOR_IN_SYSMACROS)
6369#include <sys/sysmacros.h>
6370#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006371#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006372#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006373int
6374main ()
6375{
6376 makedev(0, 0)
6377 ;
6378 return 0;
6379}
6380_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006381if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006382 ac_cv_has_makedev=yes
6383else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006384 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006385fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006386rm -f core conftest.err conftest.$ac_objext \
6387 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006388if test "$ac_cv_has_makedev" = "no"; then
6389 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006391/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006392
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006393#define _OSF_SOURCE 1
6394#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006395
Neal Norwitz11690112002-07-30 01:08:28 +00006396int
6397main ()
6398{
6399 makedev(0, 0)
6400 ;
6401 return 0;
6402}
6403_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006404if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006405 ac_cv_has_makedev=yes
6406else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006407 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006408fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006409rm -f core conftest.err conftest.$ac_objext \
6410 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006411 if test "$ac_cv_has_makedev" = "yes"; then
6412
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006413$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006414
6415 fi
6416fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6418$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006419if test "$ac_cv_has_makedev" = "yes"; then
6420
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006421$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006422
6423fi
6424
Martin v. Löwis399a6892002-10-04 10:22:02 +00006425# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6426# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6427# defined, but the compiler does not support pragma redefine_extname,
6428# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6429# structures (such as rlimit64) without declaring them. As a
6430# work-around, disable LFS on such configurations
6431
6432use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6434$as_echo_n "checking Solaris LFS bug... " >&6; }
6435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006436/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006437
6438#define _LARGEFILE_SOURCE 1
6439#define _FILE_OFFSET_BITS 64
6440#include <sys/resource.h>
6441
Martin v. Löwis399a6892002-10-04 10:22:02 +00006442int
6443main ()
6444{
6445struct rlimit foo;
6446 ;
6447 return 0;
6448}
6449_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006450if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006451 sol_lfs_bug=no
6452else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006453 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006454fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6457$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006458if test "$sol_lfs_bug" = "yes"; then
6459 use_lfs=no
6460fi
6461
6462if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006463# Two defines needed to enable largefile support on various platforms
6464# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006465
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006466$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006467
6468
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006469$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006470
Martin v. Löwis399a6892002-10-04 10:22:02 +00006471fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006472
Guido van Rossum84e7b241996-08-19 21:59:00 +00006473# Add some code to confdefs.h so that the test for off_t works on SCO
6474cat >> confdefs.h <<\EOF
6475#if defined(SCO_DS)
6476#undef _OFF_T
6477#endif
6478EOF
6479
Guido van Rossumef2255b2000-03-10 22:30:29 +00006480# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006481ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6482if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006483
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006484else
Martin v. Löwis11437992002-04-12 09:54:03 +00006485
6486cat >>confdefs.h <<_ACEOF
6487#define mode_t int
6488_ACEOF
6489
6490fi
6491
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006492ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6493if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006494
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006495else
Martin v. Löwis11437992002-04-12 09:54:03 +00006496
6497cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006498#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006499_ACEOF
6500
6501fi
6502
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006503ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6504if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006505
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006506else
Martin v. Löwis11437992002-04-12 09:54:03 +00006507
6508cat >>confdefs.h <<_ACEOF
6509#define pid_t int
6510_ACEOF
6511
6512fi
6513
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
6515$as_echo_n "checking return type of signal handlers... " >&6; }
6516if test "${ac_cv_type_signal+set}" = set; then :
6517 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006518else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006520/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006521#include <sys/types.h>
6522#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006523
Martin v. Löwis11437992002-04-12 09:54:03 +00006524int
6525main ()
6526{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006527return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006528 ;
6529 return 0;
6530}
6531_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006532if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006533 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006534else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006535 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006538fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
6540$as_echo "$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006541
Martin v. Löwis11437992002-04-12 09:54:03 +00006542cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006543#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006544_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006545
Michael W. Hudson54241132001-12-07 15:38:26 +00006546
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006547ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6548if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006549
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006550else
Martin v. Löwis11437992002-04-12 09:54:03 +00006551
6552cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006553#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006554_ACEOF
6555
6556fi
6557
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6559$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6560if test "${ac_cv_type_uid_t+set}" = set; then :
6561 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006562else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006564/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006565#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006566
6567_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006568if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006569 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006570 ac_cv_type_uid_t=yes
6571else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006572 ac_cv_type_uid_t=no
6573fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006574rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006575
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006576fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6578$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006579if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006580
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006581$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006582
6583
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006584$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006585
6586fi
6587
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006588ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6589case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006590 no|yes) ;; #(
6591 *)
6592
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006593$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006594
6595
6596cat >>confdefs.h <<_ACEOF
6597#define uint32_t $ac_cv_c_uint32_t
6598_ACEOF
6599;;
6600 esac
6601
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006602ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6603case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006604 no|yes) ;; #(
6605 *)
6606
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006607$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006608
6609
6610cat >>confdefs.h <<_ACEOF
6611#define uint64_t $ac_cv_c_uint64_t
6612_ACEOF
6613;;
6614 esac
6615
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006616ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6617case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006618 no|yes) ;; #(
6619 *)
6620
6621cat >>confdefs.h <<_ACEOF
6622#define int32_t $ac_cv_c_int32_t
6623_ACEOF
6624;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006625esac
6626
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006627ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6628case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006629 no|yes) ;; #(
6630 *)
6631
6632cat >>confdefs.h <<_ACEOF
6633#define int64_t $ac_cv_c_int64_t
6634_ACEOF
6635;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006636esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006637
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006638ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6639if test "x$ac_cv_type_ssize_t" = x""yes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006640
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006641$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006642
6643fi
6644
Jack Jansendd19cf82001-12-06 22:36:17 +00006645
Michael W. Hudson54241132001-12-07 15:38:26 +00006646# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006647# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006648# The cast to long int works around a bug in the HP C Compiler
6649# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6650# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6651# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6653$as_echo_n "checking size of int... " >&6; }
6654if test "${ac_cv_sizeof_int+set}" = set; then :
6655 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006656else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006657 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 +00006658
Martin v. Löwis11437992002-04-12 09:54:03 +00006659else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006660 if test "$ac_cv_type_int" = yes; then
6661 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6663{ as_fn_set_status 77
6664as_fn_error "cannot compute sizeof (int)
6665See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006666 else
6667 ac_cv_sizeof_int=0
6668 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006669fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006670
Martin v. Löwis11437992002-04-12 09:54:03 +00006671fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6673$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006674
6675
6676
Martin v. Löwis11437992002-04-12 09:54:03 +00006677cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006678#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006679_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006680
6681
Martin v. Löwiseba40652007-08-30 20:10:57 +00006682# The cast to long int works around a bug in the HP C Compiler
6683# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6684# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6685# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6687$as_echo_n "checking size of long... " >&6; }
6688if test "${ac_cv_sizeof_long+set}" = set; then :
6689 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006690else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006691 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 +00006692
Martin v. Löwis11437992002-04-12 09:54:03 +00006693else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006694 if test "$ac_cv_type_long" = yes; then
6695 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6696$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6697{ as_fn_set_status 77
6698as_fn_error "cannot compute sizeof (long)
6699See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006700 else
6701 ac_cv_sizeof_long=0
6702 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006703fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006704
Martin v. Löwis11437992002-04-12 09:54:03 +00006705fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6707$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006708
6709
6710
Martin v. Löwis11437992002-04-12 09:54:03 +00006711cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006712#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006713_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006714
6715
Martin v. Löwiseba40652007-08-30 20:10:57 +00006716# The cast to long int works around a bug in the HP C Compiler
6717# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6718# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6719# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6721$as_echo_n "checking size of void *... " >&6; }
6722if test "${ac_cv_sizeof_void_p+set}" = set; then :
6723 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006724else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006725 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 +00006726
Martin v. Löwis11437992002-04-12 09:54:03 +00006727else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006728 if test "$ac_cv_type_void_p" = yes; then
6729 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6730$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6731{ as_fn_set_status 77
6732as_fn_error "cannot compute sizeof (void *)
6733See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006734 else
6735 ac_cv_sizeof_void_p=0
6736 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006737fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006738
Martin v. Löwis11437992002-04-12 09:54:03 +00006739fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6741$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006742
6743
6744
Martin v. Löwis11437992002-04-12 09:54:03 +00006745cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006746#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006747_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006748
6749
Martin v. Löwiseba40652007-08-30 20:10:57 +00006750# The cast to long int works around a bug in the HP C Compiler
6751# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6752# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6753# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6755$as_echo_n "checking size of short... " >&6; }
6756if test "${ac_cv_sizeof_short+set}" = set; then :
6757 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006758else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006759 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 +00006760
Martin v. Löwis11437992002-04-12 09:54:03 +00006761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006762 if test "$ac_cv_type_short" = yes; then
6763 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6764$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6765{ as_fn_set_status 77
6766as_fn_error "cannot compute sizeof (short)
6767See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006768 else
6769 ac_cv_sizeof_short=0
6770 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006771fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006772
Martin v. Löwis11437992002-04-12 09:54:03 +00006773fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6775$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006776
6777
6778
Martin v. Löwis11437992002-04-12 09:54:03 +00006779cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006780#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006781_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006782
6783
Martin v. Löwiseba40652007-08-30 20:10:57 +00006784# The cast to long int works around a bug in the HP C Compiler
6785# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6786# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6787# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6789$as_echo_n "checking size of float... " >&6; }
6790if test "${ac_cv_sizeof_float+set}" = set; then :
6791 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006792else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006793 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 +00006794
Martin v. Löwis11437992002-04-12 09:54:03 +00006795else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006796 if test "$ac_cv_type_float" = yes; then
6797 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6798$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6799{ as_fn_set_status 77
6800as_fn_error "cannot compute sizeof (float)
6801See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006802 else
6803 ac_cv_sizeof_float=0
6804 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006805fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006806
Martin v. Löwis11437992002-04-12 09:54:03 +00006807fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6809$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006810
6811
6812
Martin v. Löwis11437992002-04-12 09:54:03 +00006813cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006814#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006815_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006816
6817
Martin v. Löwiseba40652007-08-30 20:10:57 +00006818# The cast to long int works around a bug in the HP C Compiler
6819# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6820# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6821# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6823$as_echo_n "checking size of double... " >&6; }
6824if test "${ac_cv_sizeof_double+set}" = set; then :
6825 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006827 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 +00006828
Martin v. Löwis11437992002-04-12 09:54:03 +00006829else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006830 if test "$ac_cv_type_double" = yes; then
6831 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6833{ as_fn_set_status 77
6834as_fn_error "cannot compute sizeof (double)
6835See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006836 else
6837 ac_cv_sizeof_double=0
6838 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006839fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006840
Martin v. Löwis11437992002-04-12 09:54:03 +00006841fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6843$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006844
6845
6846
Martin v. Löwis11437992002-04-12 09:54:03 +00006847cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006848#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006849_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006850
6851
Martin v. Löwiseba40652007-08-30 20:10:57 +00006852# The cast to long int works around a bug in the HP C Compiler
6853# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6854# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6855# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6857$as_echo_n "checking size of fpos_t... " >&6; }
6858if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6859 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006860else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006861 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 +00006862
Martin v. Löwis11437992002-04-12 09:54:03 +00006863else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006864 if test "$ac_cv_type_fpos_t" = yes; then
6865 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6866$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6867{ as_fn_set_status 77
6868as_fn_error "cannot compute sizeof (fpos_t)
6869See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006870 else
6871 ac_cv_sizeof_fpos_t=0
6872 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006873fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006874
Martin v. Löwis11437992002-04-12 09:54:03 +00006875fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6877$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006878
6879
6880
Martin v. Löwis11437992002-04-12 09:54:03 +00006881cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006882#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006883_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006884
Michael W. Hudson54241132001-12-07 15:38:26 +00006885
Martin v. Löwiseba40652007-08-30 20:10:57 +00006886# The cast to long int works around a bug in the HP C Compiler
6887# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6888# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6889# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6891$as_echo_n "checking size of size_t... " >&6; }
6892if test "${ac_cv_sizeof_size_t+set}" = set; then :
6893 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006894else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006895 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 +00006896
Martin v. Löwis18e16552006-02-15 17:27:45 +00006897else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006898 if test "$ac_cv_type_size_t" = yes; then
6899 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6900$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6901{ as_fn_set_status 77
6902as_fn_error "cannot compute sizeof (size_t)
6903See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006904 else
6905 ac_cv_sizeof_size_t=0
6906 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006907fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006908
Martin v. Löwis18e16552006-02-15 17:27:45 +00006909fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6911$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006912
6913
6914
Martin v. Löwis18e16552006-02-15 17:27:45 +00006915cat >>confdefs.h <<_ACEOF
6916#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6917_ACEOF
6918
6919
Christian Heimes951cc0f2008-01-31 23:08:23 +00006920# The cast to long int works around a bug in the HP C Compiler
6921# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6922# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6923# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6925$as_echo_n "checking size of pid_t... " >&6; }
6926if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6927 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00006928else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006929 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes951cc0f2008-01-31 23:08:23 +00006930
Christian Heimes951cc0f2008-01-31 23:08:23 +00006931else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006932 if test "$ac_cv_type_pid_t" = yes; then
6933 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6935{ as_fn_set_status 77
6936as_fn_error "cannot compute sizeof (pid_t)
6937See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006938 else
6939 ac_cv_sizeof_pid_t=0
6940 fi
6941fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006942
Christian Heimes951cc0f2008-01-31 23:08:23 +00006943fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6945$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006946
6947
6948
6949cat >>confdefs.h <<_ACEOF
6950#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6951_ACEOF
6952
6953
Michael W. Hudson54241132001-12-07 15:38:26 +00006954
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6956$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006957have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006959/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006960
Martin v. Löwis11437992002-04-12 09:54:03 +00006961int
6962main ()
6963{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006964long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006965 ;
6966 return 0;
6967}
6968_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006969if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006970
6971
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006972$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006973
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006974 have_long_long=yes
6975
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6979$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006980if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006981# The cast to long int works around a bug in the HP C Compiler
6982# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6983# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6984# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6986$as_echo_n "checking size of long long... " >&6; }
6987if test "${ac_cv_sizeof_long_long+set}" = set; then :
6988 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006989else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006990 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 +00006991
Martin v. Löwis11437992002-04-12 09:54:03 +00006992else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006993 if test "$ac_cv_type_long_long" = yes; then
6994 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6995$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6996{ as_fn_set_status 77
6997as_fn_error "cannot compute sizeof (long long)
6998See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006999 else
7000 ac_cv_sizeof_long_long=0
7001 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007002fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007003
Martin v. Löwis11437992002-04-12 09:54:03 +00007004fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7006$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007007
7008
7009
Martin v. Löwis11437992002-04-12 09:54:03 +00007010cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007011#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007012_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007013
Michael W. Hudson54241132001-12-07 15:38:26 +00007014
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007015fi
7016
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7018$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007019have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007021/* end confdefs.h. */
7022
7023int
7024main ()
7025{
Matthias Klosec511b472010-05-08 11:01:39 +00007026long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007027 ;
7028 return 0;
7029}
7030_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007031if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007032
7033
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007034$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007035
7036 have_long_double=yes
7037
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007038fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7041$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007042if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007043# The cast to long int works around a bug in the HP C Compiler
7044# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7045# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7046# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7048$as_echo_n "checking size of long double... " >&6; }
7049if test "${ac_cv_sizeof_long_double+set}" = set; then :
7050 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007051else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007052 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007053
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007054else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007055 if test "$ac_cv_type_long_double" = yes; then
7056 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7058{ as_fn_set_status 77
7059as_fn_error "cannot compute sizeof (long double)
7060See \`config.log' for more details." "$LINENO" 5; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007061 else
7062 ac_cv_sizeof_long_double=0
7063 fi
7064fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007065
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007066fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7068$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007069
7070
7071
7072cat >>confdefs.h <<_ACEOF
7073#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7074_ACEOF
7075
7076
7077fi
7078
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7080$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007081have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007083/* end confdefs.h. */
7084
7085int
7086main ()
7087{
7088_Bool x; x = (_Bool)0;
7089 ;
7090 return 0;
7091}
7092_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007093if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007094
7095
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007096$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007097
7098 have_c99_bool=yes
7099
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007100fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7103$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007104if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007105# The cast to long int works around a bug in the HP C Compiler
7106# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7107# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7108# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7110$as_echo_n "checking size of _Bool... " >&6; }
7111if test "${ac_cv_sizeof__Bool+set}" = set; then :
7112 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007113else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007114 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007115
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007116else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007117 if test "$ac_cv_type__Bool" = yes; then
7118 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7119$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7120{ as_fn_set_status 77
7121as_fn_error "cannot compute sizeof (_Bool)
7122See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007123 else
7124 ac_cv_sizeof__Bool=0
7125 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007126fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007127
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007128fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7130$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007131
7132
7133
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007134cat >>confdefs.h <<_ACEOF
7135#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7136_ACEOF
7137
7138
7139fi
7140
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007141ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007142 #include <stdint.h>
7143 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007144"
7145if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007146
7147cat >>confdefs.h <<_ACEOF
7148#define HAVE_UINTPTR_T 1
7149_ACEOF
7150
Martin v. Löwiseba40652007-08-30 20:10:57 +00007151# The cast to long int works around a bug in the HP C Compiler
7152# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7153# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7154# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7156$as_echo_n "checking size of uintptr_t... " >&6; }
7157if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7158 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007159else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007160 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 +00007161
Martin v. Löwis11437992002-04-12 09:54:03 +00007162else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007163 if test "$ac_cv_type_uintptr_t" = yes; then
7164 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7165$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7166{ as_fn_set_status 77
7167as_fn_error "cannot compute sizeof (uintptr_t)
7168See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007169 else
7170 ac_cv_sizeof_uintptr_t=0
7171 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007172fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007173
Martin v. Löwis11437992002-04-12 09:54:03 +00007174fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7176$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007177
7178
7179
Martin v. Löwis11437992002-04-12 09:54:03 +00007180cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007181#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007182_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007183
Michael W. Hudson54241132001-12-07 15:38:26 +00007184
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007185fi
7186
Martin v. Löwisebe26702006-10-02 14:55:51 +00007187
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007188# The cast to long int works around a bug in the HP C Compiler
7189# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7190# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7191# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7193$as_echo_n "checking size of off_t... " >&6; }
7194if test "${ac_cv_sizeof_off_t+set}" = set; then :
7195 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007196else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007197 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007198#ifdef HAVE_SYS_TYPES_H
7199#include <sys/types.h>
7200#endif
7201
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007202"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007203
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007204else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007205 if test "$ac_cv_type_off_t" = yes; then
7206 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7207$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7208{ as_fn_set_status 77
7209as_fn_error "cannot compute sizeof (off_t)
7210See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007211 else
7212 ac_cv_sizeof_off_t=0
7213 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007214fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007215
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007216fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7218$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007219
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007220
7221
Martin v. Löwis11437992002-04-12 09:54:03 +00007222cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007223#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007224_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007225
Michael W. Hudson54241132001-12-07 15:38:26 +00007226
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007227
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7229$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007230if test "$have_long_long" = yes
7231then
7232if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007233 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007234
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007235$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007236
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7238$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007239else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7241$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007242fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007243else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7245$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007246fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007247
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007248# The cast to long int works around a bug in the HP C Compiler
7249# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7250# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7251# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7253$as_echo_n "checking size of time_t... " >&6; }
7254if test "${ac_cv_sizeof_time_t+set}" = set; then :
7255 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007256else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007257 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007258#ifdef HAVE_SYS_TYPES_H
7259#include <sys/types.h>
7260#endif
7261#ifdef HAVE_TIME_H
7262#include <time.h>
7263#endif
7264
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007265"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007266
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007267else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007268 if test "$ac_cv_type_time_t" = yes; then
7269 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7270$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7271{ as_fn_set_status 77
7272as_fn_error "cannot compute sizeof (time_t)
7273See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007274 else
7275 ac_cv_sizeof_time_t=0
7276 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007277fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007278
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007279fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7281$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007282
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007283
7284
Martin v. Löwis11437992002-04-12 09:54:03 +00007285cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007286#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007287_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007288
Michael W. Hudson54241132001-12-07 15:38:26 +00007289
7290
Trent Mick635f6fb2000-08-23 21:33:05 +00007291# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007292ac_save_cc="$CC"
7293if test "$ac_cv_kpthread" = "yes"
7294then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007295elif test "$ac_cv_kthread" = "yes"
7296then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007297elif test "$ac_cv_pthread" = "yes"
7298then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007299fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7301$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007302have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007304/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007305
7306 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007307int
7308main ()
7309{
Guido van Rossum12580492000-09-24 16:47:19 +00007310pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007311 ;
7312 return 0;
7313}
Matthias Klosec511b472010-05-08 11:01:39 +00007314
Martin v. Löwis11437992002-04-12 09:54:03 +00007315_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007316if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007317 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7321$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007322if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007323 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007324# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7325# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7326# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7328$as_echo_n "checking size of pthread_t... " >&6; }
7329if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7330 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007331else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007332 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007333#ifdef HAVE_PTHREAD_H
7334#include <pthread.h>
7335#endif
7336
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007337"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007338
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007339else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007340 if test "$ac_cv_type_pthread_t" = yes; then
7341 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7342$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7343{ as_fn_set_status 77
7344as_fn_error "cannot compute sizeof (pthread_t)
7345See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007346 else
7347 ac_cv_sizeof_pthread_t=0
7348 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007349fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007350
Trent Mick635f6fb2000-08-23 21:33:05 +00007351fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7353$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007354
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007355
7356
Martin v. Löwis11437992002-04-12 09:54:03 +00007357cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007358#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007359_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007360
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007361
Trent Mick635f6fb2000-08-23 21:33:05 +00007362fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007363CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007364
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7366$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007367# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007368if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007369 enableval=$enable_toolbox_glue;
7370fi
Jack Jansene578a632001-08-15 01:27:14 +00007371
7372
7373if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007374then
Jack Jansene578a632001-08-15 01:27:14 +00007375 case $ac_sys_system/$ac_sys_release in
7376 Darwin/*)
7377 enable_toolbox_glue="yes";;
7378 *)
7379 enable_toolbox_glue="no";;
7380 esac
7381fi
7382case "$enable_toolbox_glue" in
7383yes)
Jack Jansene578a632001-08-15 01:27:14 +00007384 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007385 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007386
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007387$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007388
7389 ;;
7390*)
Jack Jansene578a632001-08-15 01:27:14 +00007391 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007392 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007393 ;;
7394esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7396$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007397
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007398
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007399
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007400case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007401 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007402 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7403 ;;
7404 Darwin/*)
7405 OTHER_LIBTOOL_OPT=""
7406 ;;
7407esac
7408
7409
Ronald Oussoren25967582009-09-06 10:00:26 +00007410ARCH_RUN_32BIT=""
7411
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007412case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007413 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00007414 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7415 if test "${enable_universalsdk}"; then
7416 :
7417 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007418 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007419 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007420 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007421 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007422 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00007423 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007424 if test ${gcc_version} '<' 4.0
7425 then
7426 LIBTOOL_CRUFT="-lcc_dynamic"
7427 else
7428 LIBTOOL_CRUFT=""
7429 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007430 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00007431 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00007432else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007434/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00007435
Ronald Oussoren25967582009-09-06 10:00:26 +00007436 #include <unistd.h>
7437 int main(int argc, char*argv[])
7438 {
7439 if (sizeof(long) == 4) {
7440 return 0;
7441 } else {
7442 return 1;
7443 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00007444 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00007445
Ronald Oussoren25967582009-09-06 10:00:26 +00007446_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007447if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00007448 ac_osx_32bit=yes
7449else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007450 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00007451fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7453 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007454fi
7455
7456
Ronald Oussoren25967582009-09-06 10:00:26 +00007457 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007458 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007459 i386)
7460 MACOSX_DEFAULT_ARCH="i386"
7461 ;;
7462 ppc)
7463 MACOSX_DEFAULT_ARCH="ppc"
7464 ;;
7465 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007466 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007467 ;;
7468 esac
7469 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007470 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007471 i386)
7472 MACOSX_DEFAULT_ARCH="x86_64"
7473 ;;
7474 ppc)
7475 MACOSX_DEFAULT_ARCH="ppc64"
7476 ;;
7477 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007478 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007479 ;;
7480 esac
7481
7482 #ARCH_RUN_32BIT="true"
7483 fi
7484
7485 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007486 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007487 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007488esac
7489
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7491$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007492if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007493then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007494 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007495 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007496 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007497
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007498$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007499
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7501$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00007502 if test $enable_shared = "yes"
7503 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007504 as_fn_error "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." "$LINENO" 5
Ronald Oussoren450d5612009-06-08 21:12:41 +00007505 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007506else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7508$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007509fi
7510
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7512$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007513case $ac_sys_system/$ac_sys_release in
7514 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007515
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007516$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007517
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7519$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007520 ;;
7521 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7523$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007524 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007525esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007526
Guido van Rossum0a516c91994-09-12 10:58:40 +00007527# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007528
Michael W. Hudson54241132001-12-07 15:38:26 +00007529
7530
7531
7532
Ronald Oussoren75912852010-04-08 08:13:31 +00007533
Guido van Rossum0a516c91994-09-12 10:58:40 +00007534# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007535# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7537$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007538if test -z "$SO"
7539then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007540 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00007541 hp*|HP*)
7542 case `uname -m` in
7543 ia64) SO=.so;;
7544 *) SO=.sl;;
7545 esac
7546 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007547 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007548 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007549 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007550else
7551 # this might also be a termcap variable, see #610332
7552 echo
7553 echo '====================================================================='
7554 echo '+ +'
7555 echo '+ WARNING: You have set SO in your environment. +'
7556 echo '+ Do you really mean to change the extension for shared libraries? +'
7557 echo '+ Continuing in 10 seconds to let you to ponder. +'
7558 echo '+ +'
7559 echo '====================================================================='
7560 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007561fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7563$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00007564
Ronald Oussoren79f90492009-01-02 10:44:46 +00007565
Neal Norwitz58e28882006-05-19 07:00:58 +00007566cat >>confdefs.h <<_ACEOF
7567#define SHLIB_EXT "$SO"
7568_ACEOF
7569
Guido van Rossum0a516c91994-09-12 10:58:40 +00007570# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007571# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007572# (Shared libraries in this instance are shared modules to be loaded into
7573# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7575$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007576if test -z "$LDSHARED"
7577then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007578 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007579 AIX*)
7580 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007581 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007582 ;;
7583 BeOS*)
7584 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00007585 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007586 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007587 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007588 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007589 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007590 if test "$GCC" = "yes" ; then
7591 LDSHARED='$(CC) -shared'
7592 LDCXXSHARED='$(CXX) -shared'
7593 else
7594 LDSHARED='$(CC) -G'
7595 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00007596 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00007597 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007598 if test "$GCC" = "yes" ; then
7599 LDSHARED='$(CC) -shared'
7600 LDCXXSHARED='$(CXX) -shared'
7601 else
7602 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00007603 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007604 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007605 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00007606 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +00007607 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007608 if test "$enable_framework" ; then
7609 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007610 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7611 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007612 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007613 else
7614 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007615 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00007616 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007617 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007618 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00007619 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +00007620 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007621 if test "$enable_framework" ; then
7622 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007623 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7624 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007625 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007626 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007627 # No framework, use the Python app as bundle-loader
7628 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007629 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007630 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007631 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007632 Darwin/*)
7633 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7634 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00007635
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007636 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007637 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00007638 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007639 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007640 fi
Jack Jansen6b08a402004-06-03 12:41:45 +00007641 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Ronald Oussoren75912852010-04-08 08:13:31 +00007642 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007643 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007644 else
7645 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +00007646 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007647 if test "$enable_framework" ; then
7648 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007649 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7650 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007651 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007652 else
7653 # No framework, use the Python app as bundle-loader
7654 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7655 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007656 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007657 fi
7658 fi
7659 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007660 Linux*|GNU*|QNX*)
7661 LDSHARED='$(CC) -shared'
7662 LDCXXSHARED='$(CXX) -shared';;
7663 BSD/OS*/4*)
7664 LDSHARED="gcc -shared"
7665 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007666 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007667 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007668 then
Benjamin Peterson3b2abe92010-03-14 15:06:14 +00007669 LDSHARED='$(CC) -shared ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +00007670 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007671 else
7672 LDSHARED="ld -Bshareable ${LDFLAGS}"
7673 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007674 OpenBSD*)
7675 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7676 then
7677 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +00007678 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007679 else
7680 case `uname -r` in
7681 [01].* | 2.[0-7] | 2.[0-7].*)
7682 LDSHARED="ld -Bshareable ${LDFLAGS}"
7683 ;;
7684 *)
7685 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +00007686 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007687 ;;
7688 esac
7689 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007690 NetBSD*|DragonFly*)
7691 LDSHARED="cc -shared ${LDFLAGS}"
7692 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007693 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007694 if test "$GCC" = "yes" ; then
7695 LDSHARED='$(CC) -shared'
7696 LDCXXSHARED='$(CXX) -shared'
7697 else
7698 LDSHARED='$(CC) -G'
7699 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007700 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007701 SCO_SV*)
7702 LDSHARED='$(CC) -Wl,-G,-Bexport'
7703 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7704 CYGWIN*)
7705 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7706 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
7707 atheos*)
7708 LDSHARED="gcc -shared"
7709 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007710 *) LDSHARED="ld";;
7711 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007712fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7714$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00007715LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007716BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007717# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007718# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7720$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007721if test -z "$CCSHARED"
7722then
Guido van Rossum07397971997-04-29 21:49:50 +00007723 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007724 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00007725 then CCSHARED="-fPIC";
7726 elif test `uname -p` = sparc;
7727 then CCSHARED="-xcode=pic32";
7728 else CCSHARED="-Kpic";
7729 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007730 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007731 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007732 else CCSHARED="+z";
7733 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007734 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007735 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007736 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007737 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007738 if test "$GCC" = "yes"
7739 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007740 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007741 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007742 SCO_SV*)
7743 if test "$GCC" = "yes"
7744 then CCSHARED="-fPIC"
7745 else CCSHARED="-Kpic -belf"
7746 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007747 IRIX*/6*) case $CC in
7748 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007749 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007750 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007751 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007752 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007753fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7755$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007756# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007757# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7759$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007760if test -z "$LINKFORSHARED"
7761then
Guido van Rossum07397971997-04-29 21:49:50 +00007762 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007763 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007764 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007765 LINKFORSHARED="-Wl,-E -Wl,+s";;
7766# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007767 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007768 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007769 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007770 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007771 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
7772 # which is
Jack Jansene578a632001-08-15 01:27:14 +00007773 # not used by the core itself but which needs to be in the core so
7774 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00007775 # -prebind is no longer used, because it actually seems to give a
7776 # slowdown in stead of a speedup, maybe due to the large number of
7777 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007778
7779 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00007780 if test "$enable_framework"
7781 then
Jack Jansenda49e192005-01-07 13:08:22 +00007782 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007783 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007784 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007785 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007786 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007787 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007788 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007789 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7790 then
7791 LINKFORSHARED="-Wl,--export-dynamic"
7792 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007793 SunOS/5*) case $CC in
7794 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007795 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007796 then
7797 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007798 fi;;
7799 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007800 CYGWIN*)
7801 if test $enable_shared = "no"
7802 then
7803 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7804 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007805 QNX*)
7806 # -Wl,-E causes the symbols to be added to the dynamic
7807 # symbol table so that they can be found when a module
7808 # is loaded. -N 2048K causes the stack size to be set
7809 # to 2048 kilobytes so that the stack doesn't overflow
7810 # when running test_compile.py.
7811 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007812 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007813fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7815$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007816
Michael W. Hudson54241132001-12-07 15:38:26 +00007817
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007818
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7820$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007821if test ! "$LIBRARY" = "$LDLIBRARY"
7822then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007823 case $ac_sys_system in
7824 CYGWIN*)
7825 # Cygwin needs CCSHARED when building extension DLLs
7826 # but not when building the interpreter DLL.
7827 CFLAGSFORSHARED='';;
7828 *)
7829 CFLAGSFORSHARED='$(CCSHARED)'
7830 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007831fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7833$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007834
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007835# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7836# library (with --enable-shared).
7837# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007838# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7839# if it is not required, since it creates a dependency of the shared library
7840# to LIBS. This, in turn, means that applications linking the shared libpython
7841# don't need to link LIBS explicitly. The default should be only changed
7842# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007843
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7845$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007846case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007847 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007848 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007849esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7851$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007852
7853
Guido van Rossum627b2d71993-12-24 10:39:16 +00007854# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7856$as_echo_n "checking for dlopen in -ldl... " >&6; }
7857if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7858 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007859else
Martin v. Löwis11437992002-04-12 09:54:03 +00007860 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007861LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007864
Martin v. Löwiseba40652007-08-30 20:10:57 +00007865/* Override any GCC internal prototype to avoid an error.
7866 Use char because int might match the return type of a GCC
7867 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007868#ifdef __cplusplus
7869extern "C"
7870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007871char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007872int
7873main ()
7874{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007875return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007876 ;
7877 return 0;
7878}
7879_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007880if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007881 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007882else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007883 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007884fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007885rm -f core conftest.err conftest.$ac_objext \
7886 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007887LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007888fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7890$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7891if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007892 cat >>confdefs.h <<_ACEOF
7893#define HAVE_LIBDL 1
7894_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007895
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007896 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007897
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007898fi
7899 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7901$as_echo_n "checking for shl_load in -ldld... " >&6; }
7902if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7903 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007904else
Martin v. Löwis11437992002-04-12 09:54:03 +00007905 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007906LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007908/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007909
Martin v. Löwiseba40652007-08-30 20:10:57 +00007910/* Override any GCC internal prototype to avoid an error.
7911 Use char because int might match the return type of a GCC
7912 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007913#ifdef __cplusplus
7914extern "C"
7915#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007916char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007917int
7918main ()
7919{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007920return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007921 ;
7922 return 0;
7923}
7924_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007925if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007926 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007927else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007928 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007929fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007930rm -f core conftest.err conftest.$ac_objext \
7931 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007932LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007933fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7935$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7936if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007937 cat >>confdefs.h <<_ACEOF
7938#define HAVE_LIBDLD 1
7939_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007940
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007941 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007942
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007943fi
7944 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007945
Ronald Oussoren79f90492009-01-02 10:44:46 +00007946# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007947if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7949$as_echo_n "checking for library containing sem_init... " >&6; }
7950if test "${ac_cv_search_sem_init+set}" = set; then :
7951 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007952else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007953 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007956
Martin v. Löwiseba40652007-08-30 20:10:57 +00007957/* Override any GCC internal prototype to avoid an error.
7958 Use char because int might match the return type of a GCC
7959 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007960#ifdef __cplusplus
7961extern "C"
7962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007963char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007964int
7965main ()
7966{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007967return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007968 ;
7969 return 0;
7970}
7971_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007972for ac_lib in '' pthread rt posix4; do
7973 if test -z "$ac_lib"; then
7974 ac_res="none required"
7975 else
7976 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007977 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007978 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007979 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007980 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007981fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007982rm -f core conftest.err conftest.$ac_objext \
7983 conftest$ac_exeext
7984 if test "${ac_cv_search_sem_init+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007985 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007986fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007987done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007988if test "${ac_cv_search_sem_init+set}" = set; then :
7989
Martin v. Löwiseba40652007-08-30 20:10:57 +00007990else
7991 ac_cv_search_sem_init=no
7992fi
7993rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007994LIBS=$ac_func_search_save_LIBS
7995fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7997$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007998ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007999if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008000 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008001
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008002fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008003 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008004 # posix4 on Solaris 2.6
8005 # pthread (first!) on Linux
8006fi
8007
Martin v. Löwis19d17342003-06-14 21:03:05 +00008008# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8010$as_echo_n "checking for textdomain in -lintl... " >&6; }
8011if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
8012 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008013else
8014 ac_check_lib_save_LIBS=$LIBS
8015LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008017/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008018
Martin v. Löwiseba40652007-08-30 20:10:57 +00008019/* Override any GCC internal prototype to avoid an error.
8020 Use char because int might match the return type of a GCC
8021 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008022#ifdef __cplusplus
8023extern "C"
8024#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008025char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008026int
8027main ()
8028{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008029return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008030 ;
8031 return 0;
8032}
8033_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008034if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008035 ac_cv_lib_intl_textdomain=yes
8036else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008037 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008038fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008039rm -f core conftest.err conftest.$ac_objext \
8040 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008041LIBS=$ac_check_lib_save_LIBS
8042fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8044$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
8045if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008046
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008047$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008048
8049fi
8050
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008051
8052# checks for system dependent C++ extensions support
8053case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008054 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8055$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008057/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008058
8059 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008060int
8061main ()
8062{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008063loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008064 ;
8065 return 0;
8066}
Matthias Klosec511b472010-05-08 11:01:39 +00008067
Martin v. Löwis11437992002-04-12 09:54:03 +00008068_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008069if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008070
Matthias Klosec511b472010-05-08 11:01:39 +00008071
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008072$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008073
Matthias Klosec511b472010-05-08 11:01:39 +00008074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008075$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008076
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008077else
Matthias Klosec511b472010-05-08 11:01:39 +00008078
8079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008080$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008081
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008082fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008083rm -f core conftest.err conftest.$ac_objext \
8084 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008085 *) ;;
8086esac
8087
Guido van Rossum70c7f481998-03-26 18:44:10 +00008088# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008089# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8091$as_echo_n "checking for t_open in -lnsl... " >&6; }
8092if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
8093 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008094else
Martin v. Löwis11437992002-04-12 09:54:03 +00008095 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008096LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008099
Martin v. Löwiseba40652007-08-30 20:10:57 +00008100/* Override any GCC internal prototype to avoid an error.
8101 Use char because int might match the return type of a GCC
8102 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008103#ifdef __cplusplus
8104extern "C"
8105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008106char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008107int
8108main ()
8109{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008110return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008111 ;
8112 return 0;
8113}
8114_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008115if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008116 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008117else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008118 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008119fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008120rm -f core conftest.err conftest.$ac_objext \
8121 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008122LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008123fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8125$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
8126if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008127 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008128fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008129 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8131$as_echo_n "checking for socket in -lsocket... " >&6; }
8132if test "${ac_cv_lib_socket_socket+set}" = set; then :
8133 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008134else
Martin v. Löwis11437992002-04-12 09:54:03 +00008135 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008136LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008139
Martin v. Löwiseba40652007-08-30 20:10:57 +00008140/* Override any GCC internal prototype to avoid an error.
8141 Use char because int might match the return type of a GCC
8142 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008143#ifdef __cplusplus
8144extern "C"
8145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008146char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008147int
8148main ()
8149{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008150return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008151 ;
8152 return 0;
8153}
8154_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008155if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008156 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008157else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008158 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008159fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008160rm -f core conftest.err conftest.$ac_objext \
8161 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008162LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008163fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8165$as_echo "$ac_cv_lib_socket_socket" >&6; }
8166if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008167 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008168fi
8169 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008170
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008171case "$ac_sys_system" in
8172BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8174$as_echo_n "checking for socket in -lnet... " >&6; }
8175if test "${ac_cv_lib_net_socket+set}" = set; then :
8176 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008177else
Martin v. Löwis11437992002-04-12 09:54:03 +00008178 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008179LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008182
Martin v. Löwiseba40652007-08-30 20:10:57 +00008183/* Override any GCC internal prototype to avoid an error.
8184 Use char because int might match the return type of a GCC
8185 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008186#ifdef __cplusplus
8187extern "C"
8188#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008189char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008190int
8191main ()
8192{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008193return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008194 ;
8195 return 0;
8196}
8197_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008198if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008199 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008200else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008201 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008202fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008203rm -f core conftest.err conftest.$ac_objext \
8204 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008205LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008206fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8208$as_echo "$ac_cv_lib_net_socket" >&6; }
8209if test "x$ac_cv_lib_net_socket" = x""yes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008210 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008211fi
8212 # BeOS
8213;;
8214esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008215
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8217$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008218
Martin v. Löwiseba40652007-08-30 20:10:57 +00008219# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008220if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008221 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8223$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008224LIBS="$withval $LIBS"
8225
8226else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8228$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008229fi
8230
Guido van Rossum7f43da71994-08-01 12:15:30 +00008231
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008232if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008233 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8234set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8236$as_echo_n "checking for $ac_word... " >&6; }
8237if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8238 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008239else
8240 case $PKG_CONFIG in
8241 [\\/]* | ?:[\\/]*)
8242 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8243 ;;
8244 *)
8245 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8246for as_dir in $PATH
8247do
8248 IFS=$as_save_IFS
8249 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008250 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008251 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8252 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008253 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008254 break 2
8255 fi
8256done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008257 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008258IFS=$as_save_IFS
8259
8260 ;;
8261esac
8262fi
8263PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8264if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8266$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008267else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8269$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008270fi
8271
8272
8273fi
8274if test -z "$ac_cv_path_PKG_CONFIG"; then
8275 ac_pt_PKG_CONFIG=$PKG_CONFIG
8276 # Extract the first word of "pkg-config", so it can be a program name with args.
8277set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8279$as_echo_n "checking for $ac_word... " >&6; }
8280if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8281 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008282else
8283 case $ac_pt_PKG_CONFIG in
8284 [\\/]* | ?:[\\/]*)
8285 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8286 ;;
8287 *)
8288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8289for as_dir in $PATH
8290do
8291 IFS=$as_save_IFS
8292 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008293 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008294 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8295 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008296 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008297 break 2
8298 fi
8299done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008300 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008301IFS=$as_save_IFS
8302
8303 ;;
8304esac
8305fi
8306ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8307if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8309$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008310else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8312$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008313fi
8314
8315 if test "x$ac_pt_PKG_CONFIG" = x; then
8316 PKG_CONFIG=""
8317 else
8318 case $cross_compiling:$ac_tool_warned in
8319yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008320{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8321$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008322ac_tool_warned=yes ;;
8323esac
8324 PKG_CONFIG=$ac_pt_PKG_CONFIG
8325 fi
8326else
8327 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8328fi
8329
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008330
8331# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8333$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008334
8335# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008336if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008337 withval=$with_system_expat;
8338fi
8339
8340
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8342$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008343
8344# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8346$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008347
8348# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008349if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008350 withval=$with_system_ffi;
8351fi
8352
8353
8354if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008355 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8356else
8357 LIBFFI_INCLUDEDIR=""
8358fi
8359
8360
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8362$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008363
Benjamin Peterson867475c2009-04-29 20:36:25 +00008364# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8366$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008367
8368# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008369if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008370 withval=$with_dbmliborder;
8371if test x$with_dbmliborder = xyes
8372then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008373as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008374else
8375 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8376 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8377 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008378 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008379 fi
8380 done
8381fi
8382fi
8383
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8385$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008386
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008387# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008388
8389
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8391$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008392
Martin v. Löwiseba40652007-08-30 20:10:57 +00008393# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008394if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008395 withval=$with_signal_module;
8396fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008397
8398
8399if test -z "$with_signal_module"
8400then with_signal_module="yes"
8401fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8403$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008404
8405if test "${with_signal_module}" = "yes"; then
8406 USE_SIGNAL_MODULE=""
8407 SIGNAL_OBJS=""
8408else
8409 USE_SIGNAL_MODULE="#"
8410 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8411fi
8412
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008413# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008414
Barry Warsawc0d24d82000-06-29 16:12:00 +00008415USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008416
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8418$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008419
Guido van Rossumec2f0731997-01-22 20:54:01 +00008420
Martin v. Löwiseba40652007-08-30 20:10:57 +00008421# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008422if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008423 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8425$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008426LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008427if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008428 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008429fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008430else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8432$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008433fi
8434
Martin v. Löwis11437992002-04-12 09:54:03 +00008435
8436# Templates for things AC_DEFINEd more than once.
8437# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008438
8439
Martin v. Löwis11437992002-04-12 09:54:03 +00008440
8441
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8443$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008444
Martin v. Löwiseba40652007-08-30 20:10:57 +00008445# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008446if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008447 withval=$with_threads;
8448fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008449
8450
Barry Warsawc0d24d82000-06-29 16:12:00 +00008451# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008452
Martin v. Löwiseba40652007-08-30 20:10:57 +00008453# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008454if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008455 withval=$with_thread; with_threads=$with_thread
8456fi
8457
Barry Warsawc0d24d82000-06-29 16:12:00 +00008458
8459if test -z "$with_threads"
8460then with_threads="yes"
8461fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8463$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00008464
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008465
Barry Warsawc0d24d82000-06-29 16:12:00 +00008466if test "$with_threads" = "no"
8467then
8468 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008469elif test "$ac_cv_pthread_is_default" = yes
8470then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008471 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008472
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008473 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008474 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008475
8476 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008477 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008478elif test "$ac_cv_kpthread" = "yes"
8479then
8480 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008481 if test "$ac_cv_cxx_thread" = "yes"; then
8482 CXX="$CXX -Kpthread"
8483 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008484 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008485
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008486 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008487 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008488elif test "$ac_cv_kthread" = "yes"
8489then
8490 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008491 if test "$ac_cv_cxx_thread" = "yes"; then
8492 CXX="$CXX -Kthread"
8493 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008494 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008495
8496 posix_threads=yes
8497 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008498elif test "$ac_cv_pthread" = "yes"
8499then
8500 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008501 if test "$ac_cv_cxx_thread" = "yes"; then
8502 CXX="$CXX -pthread"
8503 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008504 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008505
8506 posix_threads=yes
8507 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008508else
8509 if test ! -z "$with_threads" -a -d "$with_threads"
8510 then LDFLAGS="$LDFLAGS -L$with_threads"
8511 fi
8512 if test ! -z "$withval" -a -d "$withval"
8513 then LDFLAGS="$LDFLAGS -L$withval"
8514 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008515
8516 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008517 # define _POSIX_THREADS in unistd.h. Some apparently don't
8518 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8520$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008522/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008523
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008524#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008525#ifdef _POSIX_THREADS
8526yes
8527#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008528
8529_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008530if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008531 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008532 unistd_defines_pthreads=yes
8533else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008534 unistd_defines_pthreads=no
8535fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00008536rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008537
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8539$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008540
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008541 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008542
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008543 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8544if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8545 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008546
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008547 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008548
Martin v. Löwis11437992002-04-12 09:54:03 +00008549
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008550$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008551
8552 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008553 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008554else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008555
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008556 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8557if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8558 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008559
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008560 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008561
Martin v. Löwis11437992002-04-12 09:54:03 +00008562
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008563$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008564
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008565 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008566else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008567
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
8569$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008570
Martin v. Löwiseba40652007-08-30 20:10:57 +00008571# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008572if test "${with_pth+set}" = set; then :
8573 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8574$as_echo "$withval" >&6; }
8575 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008576
8577
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008578$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008579
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008580 LIBS="-lpth $LIBS"
8581 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008582else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8584$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008585
8586 # Just looking for pthread_create in libpthread is not enough:
8587 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8588 # So we really have to include pthread.h, and then link.
8589 _libs=$LIBS
8590 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8592$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008594/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008595#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008596
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008597void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008598int
8599main ()
8600{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008601
8602pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008603 ;
8604 return 0;
8605}
8606_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008607if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008608
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8610$as_echo "yes" >&6; }
8611 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008612
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008613 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008614 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008615else
Martin v. Löwis11437992002-04-12 09:54:03 +00008616
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008617 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008618 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8619if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8620 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008621
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008622 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008623 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008624else
Guido van Rossumad678af1998-10-02 14:42:15 +00008625
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008626 ac_fn_c_check_header_mongrel "$LINENO" "atheos/threads.h" "ac_cv_header_atheos_threads_h" "$ac_includes_default"
8627if test "x$ac_cv_header_atheos_threads_h" = x""yes; then :
8628 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008629
8630
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008631$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008632
8633 THREADOBJ="Python/thread.o"
8634else
8635
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008636 ac_fn_c_check_header_mongrel "$LINENO" "kernel/OS.h" "ac_cv_header_kernel_OS_h" "$ac_includes_default"
8637if test "x$ac_cv_header_kernel_OS_h" = x""yes; then :
8638 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008639
8640
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008641$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008642
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008643 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008644else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008645
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8647$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8648if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8649 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008650else
Martin v. Löwis11437992002-04-12 09:54:03 +00008651 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008652LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008655
Martin v. Löwiseba40652007-08-30 20:10:57 +00008656/* Override any GCC internal prototype to avoid an error.
8657 Use char because int might match the return type of a GCC
8658 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008659#ifdef __cplusplus
8660extern "C"
8661#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008662char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008663int
8664main ()
8665{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008666return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 ;
8668 return 0;
8669}
8670_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008671if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008672 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008673else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008674 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008675fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008676rm -f core conftest.err conftest.$ac_objext \
8677 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008678LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008679fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8681$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8682if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8683 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008684
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008685 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008686 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008687 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008688else
Greg Steinadf63d62000-07-05 10:38:09 +00008689
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8691$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8692if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8693 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008694else
Martin v. Löwis11437992002-04-12 09:54:03 +00008695 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008696LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008698/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008699
Martin v. Löwiseba40652007-08-30 20:10:57 +00008700/* Override any GCC internal prototype to avoid an error.
8701 Use char because int might match the return type of a GCC
8702 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008703#ifdef __cplusplus
8704extern "C"
8705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008706char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008707int
8708main ()
8709{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008710return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008711 ;
8712 return 0;
8713}
8714_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008715if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008716 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008717else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008718 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008719fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008720rm -f core conftest.err conftest.$ac_objext \
8721 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008722LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008723fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8725$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8726if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8727 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008728
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008729 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008730 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008731 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008732else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008733
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8735$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8736if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8737 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008738else
Martin v. Löwis11437992002-04-12 09:54:03 +00008739 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008740LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008743
Martin v. Löwiseba40652007-08-30 20:10:57 +00008744/* Override any GCC internal prototype to avoid an error.
8745 Use char because int might match the return type of a GCC
8746 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008747#ifdef __cplusplus
8748extern "C"
8749#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008750char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008751int
8752main ()
8753{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008754return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008755 ;
8756 return 0;
8757}
8758_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008759if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008760 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008762 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008763fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008764rm -f core conftest.err conftest.$ac_objext \
8765 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008766LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008767fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8769$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8770if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8771 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008772
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008773 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008774 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008775 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008776else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008777
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8779$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8780if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8781 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008782else
Martin v. Löwis11437992002-04-12 09:54:03 +00008783 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008784LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008787
Martin v. Löwiseba40652007-08-30 20:10:57 +00008788/* Override any GCC internal prototype to avoid an error.
8789 Use char because int might match the return type of a GCC
8790 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008791#ifdef __cplusplus
8792extern "C"
8793#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008794char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008795int
8796main ()
8797{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008798return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008799 ;
8800 return 0;
8801}
8802_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008803if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008804 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008805else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008806 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008807fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008808rm -f core conftest.err conftest.$ac_objext \
8809 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008810LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008811fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8813$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8814if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8815 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008816
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008817 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008818 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008819 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008820else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008821
Martin v. Löwis130fb172001-07-19 11:00:41 +00008822 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008823fi
8824
Guido van Rossum627b2d71993-12-24 10:39:16 +00008825
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008826fi
8827
Guido van Rossum0be3e491997-05-22 20:33:33 +00008828fi
8829
Guido van Rossum49545951997-12-02 19:28:29 +00008830fi
8831
Guido van Rossumb93a8621998-05-07 13:27:32 +00008832fi
8833
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008834
Michael W. Hudson54241132001-12-07 15:38:26 +00008835fi
8836
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008837
8838fi
8839
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008840fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008841rm -f core conftest.err conftest.$ac_objext \
8842 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008843fi
8844
Martin v. Löwis11437992002-04-12 09:54:03 +00008845fi
8846
8847
8848fi
8849
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008850
Michael W. Hudson54241132001-12-07 15:38:26 +00008851
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8853$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8854if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8855 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008856else
Martin v. Löwis11437992002-04-12 09:54:03 +00008857 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008858LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008860/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008861
Martin v. Löwiseba40652007-08-30 20:10:57 +00008862/* Override any GCC internal prototype to avoid an error.
8863 Use char because int might match the return type of a GCC
8864 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008865#ifdef __cplusplus
8866extern "C"
8867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008868char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008869int
8870main ()
8871{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008872return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008873 ;
8874 return 0;
8875}
8876_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008877if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008878 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008879else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008880 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008881fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008882rm -f core conftest.err conftest.$ac_objext \
8883 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008884LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008885fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8887$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8888if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8889 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008890
Martin v. Löwis130fb172001-07-19 11:00:41 +00008891 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008892 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008893 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008894fi
8895
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008896
Neal Norwitza978ab02002-11-02 16:58:05 +00008897 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8899$as_echo_n "checking for thr_create in -lthread... " >&6; }
8900if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8901 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008902else
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008904LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008907
Martin v. Löwiseba40652007-08-30 20:10:57 +00008908/* Override any GCC internal prototype to avoid an error.
8909 Use char because int might match the return type of a GCC
8910 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008911#ifdef __cplusplus
8912extern "C"
8913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008914char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008915int
8916main ()
8917{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008918return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 ;
8920 return 0;
8921}
8922_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008923if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008925else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008926 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008927fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008928rm -f core conftest.err conftest.$ac_objext \
8929 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008930LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008931fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8933$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8934if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8935 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008936
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008937 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008938 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008939 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008940fi
8941
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008942 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008943
Martin v. Löwis130fb172001-07-19 11:00:41 +00008944 if test "$USE_THREAD_MODULE" != "#"
8945 then
8946 # If the above checks didn't disable threads, (at least) OSF1
8947 # needs this '-threads' argument during linking.
8948 case $ac_sys_system in
8949 OSF1) LDLAST=-threads;;
8950 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008951 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008952fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008953
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008954if test "$posix_threads" = "yes"; then
8955 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008956
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008957$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008958
8959 fi
8960
8961 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8962 case $ac_sys_system/$ac_sys_release in
8963 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008964$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008965
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008966 ;;
8967 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008968$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008969
8970 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +00008971 AIX/5)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008972$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00008973
8974 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008975 esac
8976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8978$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8979 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8980 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008981else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008982 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008983 ac_cv_pthread_system_supported=no
8984else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008986/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008987#include <pthread.h>
8988 void *foo(void *parm) {
8989 return NULL;
8990 }
8991 main() {
8992 pthread_attr_t attr;
8993 pthread_t id;
8994 if (pthread_attr_init(&attr)) exit(-1);
8995 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8996 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8997 exit(0);
8998 }
8999_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009000if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009001 ac_cv_pthread_system_supported=yes
9002else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009003 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009004fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009005rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9006 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009007fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009008
Martin v. Löwiseba40652007-08-30 20:10:57 +00009009
Guido van Rossum627b2d71993-12-24 10:39:16 +00009010fi
9011
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9013$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009014 if test "$ac_cv_pthread_system_supported" = "yes"; then
9015
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009016$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009017
9018 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009019 for ac_func in pthread_sigmask
9020do :
9021 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
9022if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009023 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009024#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009025_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009026 case $ac_sys_system in
9027 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009028
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009029$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009030
9031 ;;
9032 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009033fi
9034done
9035
9036fi
9037
9038
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009039# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009040
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9042$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009043# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009044if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009045 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009046 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9048$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009049 ipv6=no
9050 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009051 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9052$as_echo "yes" >&6; }
9053 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009054
9055 ipv6=yes
9056 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009058else
Martin v. Löwis11437992002-04-12 09:54:03 +00009059
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009060 if test "$cross_compiling" = yes; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009061
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9063$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009064 ipv6=no
9065
9066else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009068/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009069 /* AF_INET6 available check */
9070#include <sys/types.h>
9071#include <sys/socket.h>
9072main()
9073{
9074 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9075 exit(1);
9076 else
9077 exit(0);
9078}
9079
Martin v. Löwis11437992002-04-12 09:54:03 +00009080_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009081if ac_fn_c_try_run "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009082
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9084$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009085 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009086
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009087else
Matthias Klosec511b472010-05-08 11:01:39 +00009088
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9090$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009091 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009092
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009093fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9095 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009096fi
9097
Martin v. Löwiseba40652007-08-30 20:10:57 +00009098
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009099if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9101$as_echo_n "checking if RFC2553 API is available... " >&6; }
9102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009103/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009104
9105 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009106#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009107int
9108main ()
9109{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009110struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009111 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009112 ;
9113 return 0;
9114}
Matthias Klosec511b472010-05-08 11:01:39 +00009115
Martin v. Löwis11437992002-04-12 09:54:03 +00009116_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009117if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009118
9119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009120$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009121 ipv6=yes
9122
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009123else
Matthias Klosec511b472010-05-08 11:01:39 +00009124
9125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009126$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009127 ipv6=no
9128
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009131fi
9132
9133if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009134 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009135
9136fi
9137
Martin v. Löwiseba40652007-08-30 20:10:57 +00009138fi
9139
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009140
9141ipv6type=unknown
9142ipv6lib=none
9143ipv6trylibc=no
9144
9145if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9147$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009148 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9149 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009150 case $i in
9151 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009153/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009154
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009155#include <netinet/in.h>
9156#ifdef IPV6_INRIA_VERSION
9157yes
9158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009159_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009161 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009162 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009163fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009164rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009165
9166 ;;
9167 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009169/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009170
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009171#include <netinet/in.h>
9172#ifdef __KAME__
9173yes
9174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009175_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009176if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009177 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009178 ipv6type=$i;
9179 ipv6lib=inet6
9180 ipv6libdir=/usr/local/v6/lib
9181 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009182fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009183rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009184
9185 ;;
9186 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009188/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009189
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009190#include <features.h>
9191#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9192yes
9193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009194_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009195if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009196 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009197 ipv6type=$i;
9198 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009199fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009200rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009201
9202 ;;
9203 linux-inet6)
9204 if test -d /usr/inet6; then
9205 ipv6type=$i
9206 ipv6lib=inet6
9207 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009208 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009209 fi
9210 ;;
9211 solaris)
9212 if test -f /etc/netconfig; then
9213 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
9214 ipv6type=$i
9215 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009216 fi
9217 fi
9218 ;;
9219 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009221/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009222
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009223#include <sys/param.h>
9224#ifdef _TOSHIBA_INET6
9225yes
9226#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009227_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009228if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009229 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009230 ipv6type=$i;
9231 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009232 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009233fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009234rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009235
9236 ;;
9237 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009239/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009240
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009241#include </usr/local/v6/include/sys/v6config.h>
9242#ifdef __V6D__
9243yes
9244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009245_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009246if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009247 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009248 ipv6type=$i;
9249 ipv6lib=v6;
9250 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009251 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009252fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009253rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009254
9255 ;;
9256 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009258/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009259
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009260#include <sys/param.h>
9261#ifdef _ZETA_MINAMI_INET6
9262yes
9263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009264_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009265if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009266 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009267 ipv6type=$i;
9268 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009269 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009270fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009271rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009272
9273 ;;
9274 esac
9275 if test "$ipv6type" != "unknown"; then
9276 break
9277 fi
9278 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9280$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009281fi
9282
9283if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9284 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9285 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9286 echo "using lib$ipv6lib"
9287 else
9288 if test $ipv6trylibc = "yes"; then
9289 echo "using libc"
9290 else
9291 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9292 echo "You need to fetch lib$ipv6lib.a from appropriate"
9293 echo 'ipv6 kit and compile beforehand.'
9294 exit 1
9295 fi
9296 fi
9297fi
9298
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9300$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009302/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009303
9304 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009305int
9306main ()
9307{
9308FSIORefNum fRef = 0
9309 ;
9310 return 0;
9311}
9312_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009313if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009314 ]
9315else
9316
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009317
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009318$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009319
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9321$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009322
9323fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9325
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009326# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9328$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009329
Martin v. Löwiseba40652007-08-30 20:10:57 +00009330# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009331if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009332 withval=$with_doc_strings;
9333fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009334
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009335
9336if test -z "$with_doc_strings"
9337then with_doc_strings="yes"
9338fi
9339if test "$with_doc_strings" != "no"
9340then
9341
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009342$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009343
9344fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9346$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009347
Neil Schemenauera35c6882001-02-27 04:45:05 +00009348# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9350$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009351
Martin v. Löwiseba40652007-08-30 20:10:57 +00009352# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009353if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009354 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009355if test "$withval" != no
9356then
9357
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009358$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009359
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9361$as_echo "yes" >&6; }
9362else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9363$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009364fi
9365else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9367$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009368fi
9369
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009370
9371# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9373$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009374
Martin v. Löwiseba40652007-08-30 20:10:57 +00009375# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009376if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009377 withval=$with_pymalloc;
9378fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009379
Neil Schemenauera35c6882001-02-27 04:45:05 +00009380
Neil Schemenauer16c22972002-03-22 15:34:49 +00009381if test -z "$with_pymalloc"
9382then with_pymalloc="yes"
9383fi
9384if test "$with_pymalloc" != "no"
9385then
Martin v. Löwis11437992002-04-12 09:54:03 +00009386
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009387$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009388
9389fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9391$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009392
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009393# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9395$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009396
9397# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009398if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009399 withval=$with_valgrind;
9400else
9401 with_valgrind=no
9402fi
9403
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9405$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009406if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009407 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9408if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009409
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009410$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009411
9412else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009413 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009414
9415fi
9416
9417
9418fi
9419
Barry Warsawef82cd72000-06-30 16:21:01 +00009420# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9422$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009423
Martin v. Löwiseba40652007-08-30 20:10:57 +00009424# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009425if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009426 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009427if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009428then
9429
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009430$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009431
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9433$as_echo "yes" >&6; }
9434else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9435$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009436fi
9437else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9439$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009440fi
9441
Barry Warsawef82cd72000-06-30 16:21:01 +00009442
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009443# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009444
Guido van Rossum98935bf2001-09-05 19:13:16 +00009445DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009446
Guido van Rossume97ee181999-12-20 21:27:22 +00009447# the dlopen() function means we might want to use dynload_shlib.o. some
9448# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009449for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009450do :
9451 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9452if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009454#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009455_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009456
Guido van Rossume97ee181999-12-20 21:27:22 +00009457fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009458done
Guido van Rossume97ee181999-12-20 21:27:22 +00009459
Michael W. Hudson54241132001-12-07 15:38:26 +00009460
Guido van Rossume97ee181999-12-20 21:27:22 +00009461# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9462# loading of modules.
9463
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9465$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009466if test -z "$DYNLOADFILE"
9467then
9468 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009469 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9470 if test "$ac_cv_func_dlopen" = yes
9471 then DYNLOADFILE="dynload_shlib.o"
9472 else DYNLOADFILE="dynload_aix.o"
9473 fi
9474 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009475 BeOS*) DYNLOADFILE="dynload_beos.o";;
9476 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +00009477 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9478 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009479 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009480 *)
9481 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9482 # out any dynamic loading
9483 if test "$ac_cv_func_dlopen" = yes
9484 then DYNLOADFILE="dynload_shlib.o"
9485 else DYNLOADFILE="dynload_stub.o"
9486 fi
9487 ;;
9488 esac
9489fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9491$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009492if test "$DYNLOADFILE" != "dynload_stub.o"
9493then
Martin v. Löwis11437992002-04-12 09:54:03 +00009494
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009495$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009496
9497fi
9498
Neil Schemenauer4e425612001-06-19 15:44:15 +00009499# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9500
Michael W. Hudson54241132001-12-07 15:38:26 +00009501
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9503$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009504if test -z "$MACHDEP_OBJS"
9505then
Jack Jansene578a632001-08-15 01:27:14 +00009506 MACHDEP_OBJS=$extra_machdep_objs
9507else
9508 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009509fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9511$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009512
Guido van Rossum627b2d71993-12-24 10:39:16 +00009513# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +00009514for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9515 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009516 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009517 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +00009518 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009519 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009520 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +00009521 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9522 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +00009523 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009524 setlocale setregid setreuid setresuid setresgid \
9525 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +00009526 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009527 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +00009528 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009529do :
9530 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9531ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9532eval as_val=\$$as_ac_var
9533 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009534 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009535#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009536_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009537
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009538fi
9539done
9540
Michael W. Hudson54241132001-12-07 15:38:26 +00009541
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009542# For some functions, having a definition is not sufficient, since
9543# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9545$as_echo_n "checking for chroot... " >&6; }
9546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009547/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009548#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009549int
9550main ()
9551{
9552void *x=chroot
9553 ;
9554 return 0;
9555}
9556_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009557if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009558
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009559$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009560
Matthias Klosec511b472010-05-08 11:01:39 +00009561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009562$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009563else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9565$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009566
9567fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9570$as_echo_n "checking for link... " >&6; }
9571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009572/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009573#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009574int
9575main ()
9576{
9577void *x=link
9578 ;
9579 return 0;
9580}
9581_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009582if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009583
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009584$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009585
Matthias Klosec511b472010-05-08 11:01:39 +00009586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009587$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009588else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9590$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009591
9592fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9595$as_echo_n "checking for symlink... " >&6; }
9596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009597/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009598#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009599int
9600main ()
9601{
9602void *x=symlink
9603 ;
9604 return 0;
9605}
9606_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009607if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009608
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009609$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009610
Matthias Klosec511b472010-05-08 11:01:39 +00009611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009612$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009613else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9615$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009616
9617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9620$as_echo_n "checking for fchdir... " >&6; }
9621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009622/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009623#include <unistd.h>
9624int
9625main ()
9626{
9627void *x=fchdir
9628 ;
9629 return 0;
9630}
9631_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009632if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009633
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009634$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009635
Matthias Klosec511b472010-05-08 11:01:39 +00009636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009637$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009638else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9640$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009641
9642fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9645$as_echo_n "checking for fsync... " >&6; }
9646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009647/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009648#include <unistd.h>
9649int
9650main ()
9651{
9652void *x=fsync
9653 ;
9654 return 0;
9655}
9656_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009657if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009658
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009659$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009660
Matthias Klosec511b472010-05-08 11:01:39 +00009661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009662$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009663else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9665$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009666
9667fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9670$as_echo_n "checking for fdatasync... " >&6; }
9671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009672/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009673#include <unistd.h>
9674int
9675main ()
9676{
9677void *x=fdatasync
9678 ;
9679 return 0;
9680}
9681_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009682if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009683
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009684$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009685
Matthias Klosec511b472010-05-08 11:01:39 +00009686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009687$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009688else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9690$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009691
9692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9695$as_echo_n "checking for epoll... " >&6; }
9696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009697/* end confdefs.h. */
9698#include <sys/epoll.h>
9699int
9700main ()
9701{
9702void *x=epoll_create
9703 ;
9704 return 0;
9705}
9706_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009707if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009708
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009709$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009710
Matthias Klosec511b472010-05-08 11:01:39 +00009711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009712$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009713else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9715$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009716
9717fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9720$as_echo_n "checking for kqueue... " >&6; }
9721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009722/* end confdefs.h. */
9723
9724#include <sys/types.h>
9725#include <sys/event.h>
9726
9727int
9728main ()
9729{
9730int x=kqueue()
9731 ;
9732 return 0;
9733}
9734_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009735if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009736
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009737$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009738
Matthias Klosec511b472010-05-08 11:01:39 +00009739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009740$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009741else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9743$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009744
9745fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009747# On some systems (eg. FreeBSD 5), we would find a definition of the
9748# functions ctermid_r, setgroups in the library, but no prototype
9749# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9750# address to avoid compiler warnings and potential miscompilations
9751# because of the missing prototypes.
9752
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9754$as_echo_n "checking for ctermid_r... " >&6; }
9755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009756/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009757
9758#include "confdefs.h"
9759#include <stdio.h>
9760
Martin v. Löwisd5843682002-11-21 20:41:28 +00009761int
9762main ()
9763{
9764void* p = ctermid_r
9765 ;
9766 return 0;
9767}
9768_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009769if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009770
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009771$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009772
Matthias Klosec511b472010-05-08 11:01:39 +00009773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009774$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009775else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9777$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009778
9779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9781
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
9783$as_echo_n "checking for flock... " >&6; }
9784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009785/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009786
9787#include "confdefs.h"
9788#include <sys/file.h>
9789
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009790int
9791main ()
9792{
9793void* p = flock
9794 ;
9795 return 0;
9796}
9797_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009798if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009799
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009800$as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009801
Matthias Klosec511b472010-05-08 11:01:39 +00009802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009803$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009804else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9806$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009807
9808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9810
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9812$as_echo_n "checking for getpagesize... " >&6; }
9813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009814/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009815
9816#include "confdefs.h"
9817#include <unistd.h>
9818
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009819int
9820main ()
9821{
9822void* p = getpagesize
9823 ;
9824 return 0;
9825}
9826_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009827if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009828
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009829$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009830
Matthias Klosec511b472010-05-08 11:01:39 +00009831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009832$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009833else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9835$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009836
9837fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009839
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009840for ac_prog in true
9841do
9842 # Extract the first word of "$ac_prog", so it can be a program name with args.
9843set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9845$as_echo_n "checking for $ac_word... " >&6; }
9846if test "${ac_cv_prog_TRUE+set}" = set; then :
9847 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009848else
9849 if test -n "$TRUE"; then
9850 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9851else
9852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9853for as_dir in $PATH
9854do
9855 IFS=$as_save_IFS
9856 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009857 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00009858 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 +00009859 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009860 $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 +00009861 break 2
9862 fi
9863done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009864 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00009865IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009866
9867fi
9868fi
9869TRUE=$ac_cv_prog_TRUE
9870if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9872$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009873else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9875$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009876fi
9877
Martin v. Löwiseba40652007-08-30 20:10:57 +00009878
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009879 test -n "$TRUE" && break
9880done
9881test -n "$TRUE" || TRUE="/bin/true"
9882
9883
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9885$as_echo_n "checking for inet_aton in -lc... " >&6; }
9886if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9887 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009888else
9889 ac_check_lib_save_LIBS=$LIBS
9890LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009892/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009893
Martin v. Löwiseba40652007-08-30 20:10:57 +00009894/* Override any GCC internal prototype to avoid an error.
9895 Use char because int might match the return type of a GCC
9896 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009897#ifdef __cplusplus
9898extern "C"
9899#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009900char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009901int
9902main ()
9903{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009904return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009905 ;
9906 return 0;
9907}
9908_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009909if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009910 ac_cv_lib_c_inet_aton=yes
9911else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009912 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009913fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009914rm -f core conftest.err conftest.$ac_objext \
9915 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009916LIBS=$ac_check_lib_save_LIBS
9917fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9919$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9920if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009921 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009922else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9924$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9925if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9926 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009927else
9928 ac_check_lib_save_LIBS=$LIBS
9929LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009931/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009932
Martin v. Löwiseba40652007-08-30 20:10:57 +00009933/* Override any GCC internal prototype to avoid an error.
9934 Use char because int might match the return type of a GCC
9935 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009936#ifdef __cplusplus
9937extern "C"
9938#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009939char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009940int
9941main ()
9942{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009943return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009944 ;
9945 return 0;
9946}
9947_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009948if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009949 ac_cv_lib_resolv_inet_aton=yes
9950else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009951 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009952fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009953rm -f core conftest.err conftest.$ac_objext \
9954 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009955LIBS=$ac_check_lib_save_LIBS
9956fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9958$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9959if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009960 cat >>confdefs.h <<_ACEOF
9961#define HAVE_LIBRESOLV 1
9962_ACEOF
9963
9964 LIBS="-lresolv $LIBS"
9965
9966fi
9967
9968
9969fi
9970
9971
Martin v. Löwisa51d5c82007-12-04 08:37:59 +00009972# On Tru64, chflags seems to be present, but calling it will
9973# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9975$as_echo_n "checking for chflags... " >&6; }
9976if test "${ac_cv_have_chflags+set}" = set; then :
9977 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00009978else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009979 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +00009980 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +00009981else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +00009983/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +00009984[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +00009985#include <sys/stat.h>
9986#include <unistd.h>
9987int main(int argc, char*argv[])
9988{
9989 if(chflags(argv[0], 0) != 0)
9990 return 1;
9991 return 0;
9992}
Gregory P. Smith49437c22009-11-02 01:38:35 +00009993]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +00009994_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009995if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00009996 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009997else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009998 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009999fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010000rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10001 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010002fi
10003
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010004
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010005fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10007$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010008if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010009 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
10010if test "x$ac_cv_func_chflags" = x""yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010011 ac_cv_have_chflags="yes"
10012else
10013 ac_cv_have_chflags="no"
10014fi
10015
10016fi
10017if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010018
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010019$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010020
10021fi
10022
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10024$as_echo_n "checking for lchflags... " >&6; }
10025if test "${ac_cv_have_lchflags+set}" = set; then :
10026 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010028 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010029 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010030else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010032/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000010033[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010034#include <sys/stat.h>
10035#include <unistd.h>
10036int main(int argc, char*argv[])
10037{
10038 if(lchflags(argv[0], 0) != 0)
10039 return 1;
10040 return 0;
10041}
Gregory P. Smith49437c22009-11-02 01:38:35 +000010042]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010043_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010044if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010045 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010046else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010047 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010048fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10050 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010051fi
10052
10053
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010054fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10056$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010057if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010058 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
10059if test "x$ac_cv_func_lchflags" = x""yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010060 ac_cv_have_lchflags="yes"
10061else
10062 ac_cv_have_lchflags="no"
10063fi
10064
10065fi
10066if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010067
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010068$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010069
10070fi
10071
Ronald Oussorenf8752642006-07-06 10:13:35 +000010072case $ac_sys_system/$ac_sys_release in
10073Darwin/*)
10074 _CUR_CFLAGS="${CFLAGS}"
10075 _CUR_LDFLAGS="${LDFLAGS}"
10076 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10077 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10078 ;;
10079esac
10080
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10082$as_echo_n "checking for inflateCopy in -lz... " >&6; }
10083if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
10084 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010085else
10086 ac_check_lib_save_LIBS=$LIBS
10087LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010089/* end confdefs.h. */
10090
Martin v. Löwiseba40652007-08-30 20:10:57 +000010091/* Override any GCC internal prototype to avoid an error.
10092 Use char because int might match the return type of a GCC
10093 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010094#ifdef __cplusplus
10095extern "C"
10096#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010097char inflateCopy ();
10098int
10099main ()
10100{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010101return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010102 ;
10103 return 0;
10104}
10105_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010106if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010107 ac_cv_lib_z_inflateCopy=yes
10108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010109 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010110fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010111rm -f core conftest.err conftest.$ac_objext \
10112 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010113LIBS=$ac_check_lib_save_LIBS
10114fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10116$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
10117if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010118
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010119$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010120
10121fi
10122
10123
Ronald Oussorenf8752642006-07-06 10:13:35 +000010124case $ac_sys_system/$ac_sys_release in
10125Darwin/*)
10126 CFLAGS="${_CUR_CFLAGS}"
10127 LDFLAGS="${_CUR_LDFLAGS}"
10128 ;;
10129esac
10130
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10132$as_echo_n "checking for hstrerror... " >&6; }
10133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010134/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010135
10136#include "confdefs.h"
10137#include <netdb.h>
10138
Martin v. Löwise9416172003-05-03 10:12:45 +000010139int
10140main ()
10141{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010142void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010143 ;
10144 return 0;
10145}
10146_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010147if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010148
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010149$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010150
Matthias Klosec511b472010-05-08 11:01:39 +000010151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010152$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010153else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10155$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010156
10157fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010158rm -f core conftest.err conftest.$ac_objext \
10159 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010160
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10162$as_echo_n "checking for inet_aton... " >&6; }
10163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010164/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010165
10166#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000010167#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010168#include <sys/socket.h>
10169#include <netinet/in.h>
10170#include <arpa/inet.h>
10171
Martin v. Löwise9416172003-05-03 10:12:45 +000010172int
10173main ()
10174{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010175void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010176 ;
10177 return 0;
10178}
10179_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010180if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010181
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010182$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010183
Matthias Klosec511b472010-05-08 11:01:39 +000010184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010185$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010186else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10188$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010189
10190fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010191rm -f core conftest.err conftest.$ac_objext \
10192 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010193
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10195$as_echo_n "checking for inet_pton... " >&6; }
10196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010197/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010198
10199#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010200#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010201#include <sys/socket.h>
10202#include <netinet/in.h>
10203#include <arpa/inet.h>
10204
Martin v. Löwise9416172003-05-03 10:12:45 +000010205int
10206main ()
10207{
10208void* p = inet_pton
10209 ;
10210 return 0;
10211}
10212_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010213if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010214
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010215$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010216
Matthias Klosec511b472010-05-08 11:01:39 +000010217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010218$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010219else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10221$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010222
10223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010225
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010226# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10228$as_echo_n "checking for setgroups... " >&6; }
10229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010230/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010231
10232#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010233#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010234#ifdef HAVE_GRP_H
10235#include <grp.h>
10236#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010237
Martin v. Löwisd5843682002-11-21 20:41:28 +000010238int
10239main ()
10240{
10241void* p = setgroups
10242 ;
10243 return 0;
10244}
10245_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010246if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010247
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010248$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010249
Matthias Klosec511b472010-05-08 11:01:39 +000010250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010251$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010252else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10254$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010255
10256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010258
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010259# check for openpty and forkpty
10260
10261for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010262do :
10263 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10264if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010266#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010267_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010268
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010269else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10271$as_echo_n "checking for openpty in -lutil... " >&6; }
10272if test "${ac_cv_lib_util_openpty+set}" = set; then :
10273 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010274else
Martin v. Löwis11437992002-04-12 09:54:03 +000010275 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010276LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010279
Martin v. Löwiseba40652007-08-30 20:10:57 +000010280/* Override any GCC internal prototype to avoid an error.
10281 Use char because int might match the return type of a GCC
10282 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010283#ifdef __cplusplus
10284extern "C"
10285#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010286char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010287int
10288main ()
10289{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010290return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 ;
10292 return 0;
10293}
10294_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010295if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010297else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010298 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010299fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010300rm -f core conftest.err conftest.$ac_objext \
10301 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010302LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010303fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10305$as_echo "$ac_cv_lib_util_openpty" >&6; }
10306if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10307 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010308 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010309else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10311$as_echo_n "checking for openpty in -lbsd... " >&6; }
10312if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10313 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010314else
10315 ac_check_lib_save_LIBS=$LIBS
10316LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010318/* end confdefs.h. */
10319
Martin v. Löwiseba40652007-08-30 20:10:57 +000010320/* Override any GCC internal prototype to avoid an error.
10321 Use char because int might match the return type of a GCC
10322 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010323#ifdef __cplusplus
10324extern "C"
10325#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010326char openpty ();
10327int
10328main ()
10329{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010330return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010331 ;
10332 return 0;
10333}
10334_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010335if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010336 ac_cv_lib_bsd_openpty=yes
10337else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010338 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010339fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010340rm -f core conftest.err conftest.$ac_objext \
10341 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010342LIBS=$ac_check_lib_save_LIBS
10343fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10345$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10346if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10347 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010348 LIBS="$LIBS -lbsd"
10349fi
10350
10351
10352fi
10353
Fred Drake8cef4cf2000-06-28 16:40:38 +000010354
10355fi
10356done
10357
10358for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010359do :
10360 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10361if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010362 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010363#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010364_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010365
Fred Drake8cef4cf2000-06-28 16:40:38 +000010366else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10368$as_echo_n "checking for forkpty in -lutil... " >&6; }
10369if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10370 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010371else
Martin v. Löwis11437992002-04-12 09:54:03 +000010372 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010373LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010375/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010376
Martin v. Löwiseba40652007-08-30 20:10:57 +000010377/* Override any GCC internal prototype to avoid an error.
10378 Use char because int might match the return type of a GCC
10379 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010380#ifdef __cplusplus
10381extern "C"
10382#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010383char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010384int
10385main ()
10386{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010387return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 ;
10389 return 0;
10390}
10391_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010392if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010393 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010394else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010395 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010396fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010397rm -f core conftest.err conftest.$ac_objext \
10398 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010399LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010400fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10402$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10403if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10404 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010405 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010406else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10408$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10409if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10410 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010411else
10412 ac_check_lib_save_LIBS=$LIBS
10413LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010415/* end confdefs.h. */
10416
Martin v. Löwiseba40652007-08-30 20:10:57 +000010417/* Override any GCC internal prototype to avoid an error.
10418 Use char because int might match the return type of a GCC
10419 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010420#ifdef __cplusplus
10421extern "C"
10422#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010423char forkpty ();
10424int
10425main ()
10426{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010427return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010428 ;
10429 return 0;
10430}
10431_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010432if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010433 ac_cv_lib_bsd_forkpty=yes
10434else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010435 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010436fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010437rm -f core conftest.err conftest.$ac_objext \
10438 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010439LIBS=$ac_check_lib_save_LIBS
10440fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10442$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10443if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10444 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010445 LIBS="$LIBS -lbsd"
10446fi
10447
10448
10449fi
10450
Fred Drake8cef4cf2000-06-28 16:40:38 +000010451
10452fi
10453done
10454
Jack Jansendd19cf82001-12-06 22:36:17 +000010455
Brett Cannonaa5778d2008-03-18 04:09:00 +000010456# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000010457for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010458do :
10459 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10460if test "x$ac_cv_func_memmove" = x""yes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000010461 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010462#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000010463_ACEOF
10464
10465fi
10466done
10467
10468
Michael W. Hudson54241132001-12-07 15:38:26 +000010469# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010470for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010471do :
10472 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10473ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10474eval as_val=\$$as_ac_var
10475 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010476 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010477#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010478_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010479
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010480fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010481done
10482
Michael W. Hudson54241132001-12-07 15:38:26 +000010483
Brett Cannonaa5778d2008-03-18 04:09:00 +000010484for ac_func in dup2 getcwd strdup
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010485do :
10486 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10487ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10488eval as_val=\$$as_ac_var
10489 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010490 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010491#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010492_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010493
Martin v. Löwis1142de32002-03-29 16:28:31 +000010494else
Martin v. Löwiseba40652007-08-30 20:10:57 +000010495 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010496 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010497 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
10498 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010499esac
10500
Martin v. Löwis1142de32002-03-29 16:28:31 +000010501fi
10502done
10503
10504
10505for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010506do :
10507 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10508if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010509 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010510#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010511_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010513/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010514#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010515int
10516main ()
10517{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010518getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010519 ;
10520 return 0;
10521}
10522_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010523if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010524
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010525$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010526
Guido van Rossum627b2d71993-12-24 10:39:16 +000010527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010529
Guido van Rossum627b2d71993-12-24 10:39:16 +000010530fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010531done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010532
Jack Jansen150753c2003-03-29 22:07:47 +000010533for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010534do :
10535 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10536if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010537 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010538#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010539_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010541/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010542#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010543int
10544main ()
10545{
10546setpgrp(0,0);
10547 ;
10548 return 0;
10549}
10550_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010551if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010552
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010553$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010554
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010555fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010557
10558fi
10559done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010560
Thomas Wouters3a584202000-08-05 23:28:51 +000010561for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010562do :
10563 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10564if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010565 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010566#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010567_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010569/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010570#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010571int
10572main ()
10573{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010574gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010575 ;
10576 return 0;
10577}
10578_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010579if ac_fn_c_try_compile "$LINENO"; then :
10580
Guido van Rossum627b2d71993-12-24 10:39:16 +000010581else
Skip Montanaro6dead952003-09-25 14:50:04 +000010582
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010583$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010584
Martin v. Löwis11437992002-04-12 09:54:03 +000010585
Guido van Rossum627b2d71993-12-24 10:39:16 +000010586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010588
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010589fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010590done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010591
Michael W. Hudson54241132001-12-07 15:38:26 +000010592
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10594$as_echo_n "checking for major... " >&6; }
10595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010596/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010597
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010598#if defined(MAJOR_IN_MKDEV)
10599#include <sys/mkdev.h>
10600#elif defined(MAJOR_IN_SYSMACROS)
10601#include <sys/sysmacros.h>
10602#else
10603#include <sys/types.h>
10604#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010605
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010606int
10607main ()
10608{
10609
10610 makedev(major(0),minor(0));
10611
10612 ;
10613 return 0;
10614}
10615_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010616if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010617
10618
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010619$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010620
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10622$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010623
10624else
Skip Montanaro6dead952003-09-25 14:50:04 +000010625
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10627$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010628
10629fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010630rm -f core conftest.err conftest.$ac_objext \
10631 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010632
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010633# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010634# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10636$as_echo_n "checking for getaddrinfo... " >&6; }
10637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010638/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010639
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010640#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010641#include <sys/socket.h>
10642#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010643#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010644
Martin v. Löwis11437992002-04-12 09:54:03 +000010645int
10646main ()
10647{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010648getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010649 ;
10650 return 0;
10651}
10652_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010653if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010654 have_getaddrinfo=yes
10655else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010656 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010657fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010658rm -f core conftest.err conftest.$ac_objext \
10659 conftest$ac_exeext conftest.$ac_ext
10660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10661$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010662if test $have_getaddrinfo = yes
10663then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10665$as_echo_n "checking getaddrinfo bug... " >&6; }
10666 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10667 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010668else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010669 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010670 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010671else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010673/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010674
10675#include <sys/types.h>
10676#include <netdb.h>
10677#include <string.h>
10678#include <sys/socket.h>
10679#include <netinet/in.h>
10680
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010681int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010682{
10683 int passive, gaierr, inet4 = 0, inet6 = 0;
10684 struct addrinfo hints, *ai, *aitop;
10685 char straddr[INET6_ADDRSTRLEN], strport[16];
10686
10687 for (passive = 0; passive <= 1; passive++) {
10688 memset(&hints, 0, sizeof(hints));
10689 hints.ai_family = AF_UNSPEC;
10690 hints.ai_flags = passive ? AI_PASSIVE : 0;
10691 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010692 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010693 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10694 (void)gai_strerror(gaierr);
10695 goto bad;
10696 }
10697 for (ai = aitop; ai; ai = ai->ai_next) {
10698 if (ai->ai_addr == NULL ||
10699 ai->ai_addrlen == 0 ||
10700 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10701 straddr, sizeof(straddr), strport, sizeof(strport),
10702 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10703 goto bad;
10704 }
10705 switch (ai->ai_family) {
10706 case AF_INET:
10707 if (strcmp(strport, "54321") != 0) {
10708 goto bad;
10709 }
10710 if (passive) {
10711 if (strcmp(straddr, "0.0.0.0") != 0) {
10712 goto bad;
10713 }
10714 } else {
10715 if (strcmp(straddr, "127.0.0.1") != 0) {
10716 goto bad;
10717 }
10718 }
10719 inet4++;
10720 break;
10721 case AF_INET6:
10722 if (strcmp(strport, "54321") != 0) {
10723 goto bad;
10724 }
10725 if (passive) {
10726 if (strcmp(straddr, "::") != 0) {
10727 goto bad;
10728 }
10729 } else {
10730 if (strcmp(straddr, "::1") != 0) {
10731 goto bad;
10732 }
10733 }
10734 inet6++;
10735 break;
10736 case AF_UNSPEC:
10737 goto bad;
10738 break;
10739 default:
10740 /* another family support? */
10741 break;
10742 }
10743 }
10744 }
10745
10746 if (!(inet4 == 0 || inet4 == 2))
10747 goto bad;
10748 if (!(inet6 == 0 || inet6 == 2))
10749 goto bad;
10750
10751 if (aitop)
10752 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010753 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010754
10755 bad:
10756 if (aitop)
10757 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010758 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010759}
10760
Martin v. Löwis11437992002-04-12 09:54:03 +000010761_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010762if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010763 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010764else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010765 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010766fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10768 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010769fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010770
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010771fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010772
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010773fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010774
Mark Dickinson0ef0b912009-12-31 21:11:48 +000010775if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010776then
10777 if test $ipv6 = yes
10778 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010779 echo 'Fatal: You must get working getaddrinfo() function.'
10780 echo ' or you can specify "--disable-ipv6"'.
10781 exit 1
10782 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010783else
Martin v. Löwis11437992002-04-12 09:54:03 +000010784
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010785$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010786
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010787fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010788for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010789do :
10790 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10791if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010792 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010793#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010794_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010795
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010796fi
10797done
10798
Michael W. Hudson54241132001-12-07 15:38:26 +000010799
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010800# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10802$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10803if test "${ac_cv_header_time+set}" = set; then :
10804 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010805else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010807/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010808#include <sys/types.h>
10809#include <sys/time.h>
10810#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010811
Martin v. Löwis11437992002-04-12 09:54:03 +000010812int
10813main ()
10814{
10815if ((struct tm *) 0)
10816return 0;
10817 ;
10818 return 0;
10819}
10820_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010821if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010822 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010823else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010824 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010827fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10829$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010830if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010831
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010832$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010833
10834fi
10835
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10837$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10838if test "${ac_cv_struct_tm+set}" = set; then :
10839 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010840else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010842/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010843#include <sys/types.h>
10844#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010845
Martin v. Löwis11437992002-04-12 09:54:03 +000010846int
10847main ()
10848{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010849struct tm tm;
10850 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010851 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010852 ;
10853 return 0;
10854}
10855_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010856if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010857 ac_cv_struct_tm=time.h
10858else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010859 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010860fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010862fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10864$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010865if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010866
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010867$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010868
10869fi
10870
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010871ac_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 +000010872#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010873
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010874"
10875if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010876
10877cat >>confdefs.h <<_ACEOF
10878#define HAVE_STRUCT_TM_TM_ZONE 1
10879_ACEOF
10880
10881
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010882fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010883
Martin v. Löwis11437992002-04-12 09:54:03 +000010884if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10885
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010886$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010887
10888else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010889 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10890"
10891if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10892 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000010893else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010894 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000010895fi
10896
Martin v. Löwiseba40652007-08-30 20:10:57 +000010897cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010898#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000010899_ACEOF
10900
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10902$as_echo_n "checking for tzname... " >&6; }
10903if test "${ac_cv_var_tzname+set}" = set; then :
10904 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000010905else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010907/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010908#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000010909#if !HAVE_DECL_TZNAME
10910extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010912
Martin v. Löwis11437992002-04-12 09:54:03 +000010913int
10914main ()
10915{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010916return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010917 ;
10918 return 0;
10919}
10920_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010921if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010922 ac_cv_var_tzname=yes
10923else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010924 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010925fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010926rm -f core conftest.err conftest.$ac_objext \
10927 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010928fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10930$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010931 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010932
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010933$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010934
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010935 fi
10936fi
10937
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010938ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10939if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010940
10941cat >>confdefs.h <<_ACEOF
10942#define HAVE_STRUCT_STAT_ST_RDEV 1
10943_ACEOF
10944
10945
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010946fi
10947
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010948ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10949if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010950
Martin v. Löwis11437992002-04-12 09:54:03 +000010951cat >>confdefs.h <<_ACEOF
10952#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10953_ACEOF
10954
10955
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010956fi
10957
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010958ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10959if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010960
10961cat >>confdefs.h <<_ACEOF
10962#define HAVE_STRUCT_STAT_ST_FLAGS 1
10963_ACEOF
10964
10965
10966fi
10967
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010968ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10969if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010970
10971cat >>confdefs.h <<_ACEOF
10972#define HAVE_STRUCT_STAT_ST_GEN 1
10973_ACEOF
10974
10975
10976fi
10977
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010978ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10979if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010980
10981cat >>confdefs.h <<_ACEOF
10982#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10983_ACEOF
10984
10985
10986fi
10987
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010988ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10989if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010990
Martin v. Löwis11437992002-04-12 09:54:03 +000010991cat >>confdefs.h <<_ACEOF
10992#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10993_ACEOF
10994
10995
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010996$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010997
10998else
Martin v. Löwiseba40652007-08-30 20:10:57 +000010999 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011000 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011001 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11002 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011003esac
11004
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011005fi
11006
Michael W. Hudson54241132001-12-07 15:38:26 +000011007
Martin v. Löwis11437992002-04-12 09:54:03 +000011008
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11010$as_echo_n "checking for time.h that defines altzone... " >&6; }
11011if test "${ac_cv_header_time_altzone+set}" = set; then :
11012 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011013else
Matthias Klosec511b472010-05-08 11:01:39 +000011014
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011016/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011017#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011018int
11019main ()
11020{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011021return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011022 ;
11023 return 0;
11024}
11025_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011026if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011027 ac_cv_header_time_altzone=yes
11028else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011029 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011032
Martin v. Löwiseba40652007-08-30 20:10:57 +000011033fi
11034
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11036$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011037if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011038
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011039$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011040
11041fi
11042
Guido van Rossumda88dad1995-01-26 00:46:29 +000011043was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11045$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011047/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011048
11049#include <sys/types.h>
11050#include <sys/select.h>
11051#include <sys/time.h>
11052
Martin v. Löwis11437992002-04-12 09:54:03 +000011053int
11054main ()
11055{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011056;
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 ;
11058 return 0;
11059}
11060_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011061if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011062
11063
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011064$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011065
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011066 was_it_defined=yes
11067
Martin v. Löwiseba40652007-08-30 20:10:57 +000011068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11071$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011072
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11074$as_echo_n "checking for addrinfo... " >&6; }
11075if test "${ac_cv_struct_addrinfo+set}" = set; then :
11076 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011079/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011080#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011081int
11082main ()
11083{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011084struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011085 ;
11086 return 0;
11087}
11088_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011089if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011090 ac_cv_struct_addrinfo=yes
11091else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011092 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11095fi
11096
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11098$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011099if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011100
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011101$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011102
11103fi
11104
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11106$as_echo_n "checking for sockaddr_storage... " >&6; }
11107if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
11108 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011109else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011111/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011112
11113# include <sys/types.h>
11114# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011115int
11116main ()
11117{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011118struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011119 ;
11120 return 0;
11121}
11122_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011123if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011124 ac_cv_struct_sockaddr_storage=yes
11125else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011126 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11129fi
11130
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11132$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011133if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011134
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011135$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011136
11137fi
11138
Guido van Rossum627b2d71993-12-24 10:39:16 +000011139# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011140
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11142$as_echo_n "checking whether char is unsigned... " >&6; }
11143if test "${ac_cv_c_char_unsigned+set}" = set; then :
11144 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011145else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011148$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011149int
11150main ()
11151{
11152static int test_array [1 - 2 * !(((char) -1) < 0)];
11153test_array [0] = 0
11154
11155 ;
11156 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011157}
Martin v. Löwis11437992002-04-12 09:54:03 +000011158_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011159if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011160 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011161else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011162 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011163fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011165fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11167$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011168if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011169 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011170
11171fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011172
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11174$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11175if test "${ac_cv_c_const+set}" = set; then :
11176 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011177else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011179/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011180
Martin v. Löwis11437992002-04-12 09:54:03 +000011181int
11182main ()
11183{
11184/* FIXME: Include the comments suggested by Paul. */
11185#ifndef __cplusplus
11186 /* Ultrix mips cc rejects this. */
11187 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000011188 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011189 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011190 char const *const *pcpcc;
11191 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011192 /* NEC SVR4.0.2 mips cc rejects this. */
11193 struct point {int x, y;};
11194 static struct point const zero = {0,0};
11195 /* AIX XL C 1.02.0.0 rejects this.
11196 It does not let you subtract one const X* pointer from another in
11197 an arm of an if-expression whose if-part is not a constant
11198 expression */
11199 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011200 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011201 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011202 ++pcpcc;
11203 ppc = (char**) pcpcc;
11204 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011205 { /* SCO 3.2v4 cc rejects this. */
11206 char *t;
11207 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011208
Martin v. Löwis11437992002-04-12 09:54:03 +000011209 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011210 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011211 }
11212 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11213 int x[] = {25, 17};
11214 const int *foo = &x[0];
11215 ++foo;
11216 }
11217 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11218 typedef const int *iptr;
11219 iptr p = 0;
11220 ++p;
11221 }
11222 { /* AIX XL C 1.02.0.0 rejects this saying
11223 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11224 struct s { int j; const int *ap[3]; };
11225 struct s *b; b->j = 5;
11226 }
11227 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11228 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011229 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011230 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011231 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011232#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011233
Martin v. Löwis11437992002-04-12 09:54:03 +000011234 ;
11235 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011236}
Martin v. Löwis11437992002-04-12 09:54:03 +000011237_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011238if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011239 ac_cv_c_const=yes
11240else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011241 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011244fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11246$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011247if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011248
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011249$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011250
11251fi
11252
Michael W. Hudson54241132001-12-07 15:38:26 +000011253
Guido van Rossumda88dad1995-01-26 00:46:29 +000011254works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11256$as_echo_n "checking for working volatile... " >&6; }
11257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011258/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011259
Martin v. Löwis11437992002-04-12 09:54:03 +000011260int
11261main ()
11262{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011263volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 ;
11265 return 0;
11266}
11267_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011268if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011269 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011270else
Skip Montanaro6dead952003-09-25 14:50:04 +000011271
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011272$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011273
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011274
Guido van Rossum627b2d71993-12-24 10:39:16 +000011275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11278$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011279
Guido van Rossumda88dad1995-01-26 00:46:29 +000011280works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11282$as_echo_n "checking for working signed char... " >&6; }
11283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011284/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011285
Martin v. Löwis11437992002-04-12 09:54:03 +000011286int
11287main ()
11288{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011289signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011290 ;
11291 return 0;
11292}
11293_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011294if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011295 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011296else
Skip Montanaro6dead952003-09-25 14:50:04 +000011297
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011298$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011299
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011300
Guido van Rossum7f43da71994-08-01 12:15:30 +000011301fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11304$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011305
Guido van Rossumda88dad1995-01-26 00:46:29 +000011306have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11308$as_echo_n "checking for prototypes... " >&6; }
11309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011310/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011311int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011312int
11313main ()
11314{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011315return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011316 ;
11317 return 0;
11318}
11319_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011320if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011321
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011322$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011323
Matthias Klosec511b472010-05-08 11:01:39 +000011324 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11328$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011329
Guido van Rossumda88dad1995-01-26 00:46:29 +000011330works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11332$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011334/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011335
11336#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011337int foo(int x, ...) {
11338 va_list va;
11339 va_start(va, x);
11340 va_arg(va, int);
11341 va_arg(va, char *);
11342 va_arg(va, double);
11343 return 0;
11344}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011345
Martin v. Löwis11437992002-04-12 09:54:03 +000011346int
11347main ()
11348{
Guido van Rossum90eea071996-08-30 20:58:57 +000011349return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011350 ;
11351 return 0;
11352}
11353_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011354if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011355
11356
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011357$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011358
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011359 works=yes
11360
Guido van Rossum627b2d71993-12-24 10:39:16 +000011361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11364$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011365
Martin v. Löwisd6320502004-08-12 13:45:08 +000011366# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11368$as_echo_n "checking for socketpair... " >&6; }
11369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011370/* end confdefs.h. */
11371
11372#include <sys/types.h>
11373#include <sys/socket.h>
11374
11375int
11376main ()
11377{
11378void *x=socketpair
11379 ;
11380 return 0;
11381}
11382_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011383if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011384
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011385$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011386
Matthias Klosec511b472010-05-08 11:01:39 +000011387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011388$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11391$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011392
11393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011395
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011396# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11398$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011400/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011401#include <sys/types.h>
11402#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011403int
11404main ()
11405{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011406struct sockaddr x;
11407x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011408 ;
11409 return 0;
11410}
11411_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011412if ac_fn_c_try_compile "$LINENO"; then :
11413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11414$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011415
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011416$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011417
11418else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11420$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011421
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011424
Guido van Rossumda88dad1995-01-26 00:46:29 +000011425va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11427$as_echo_n "checking whether va_list is an array... " >&6; }
11428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011429/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011430
11431#ifdef HAVE_STDARG_PROTOTYPES
11432#include <stdarg.h>
11433#else
11434#include <varargs.h>
11435#endif
11436
Martin v. Löwis11437992002-04-12 09:54:03 +000011437int
11438main ()
11439{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011440va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011441 ;
11442 return 0;
11443}
11444_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011445if ac_fn_c_try_compile "$LINENO"; then :
11446
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011447else
Skip Montanaro6dead952003-09-25 14:50:04 +000011448
Martin v. Löwis11437992002-04-12 09:54:03 +000011449
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011450$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011451
Guido van Rossumda88dad1995-01-26 00:46:29 +000011452 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011453
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011454fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11457$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011458
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011459# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011460
11461
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011462ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11463if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011464
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011465 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011466
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11468$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011469 OLD_CFLAGS=$CFLAGS
11470 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011472/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011473
11474# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011475
Martin v. Löwis11437992002-04-12 09:54:03 +000011476int
11477main ()
11478{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011479
11480 char *name;
11481 struct hostent *he, *res;
11482 char buffer[2048];
11483 int buflen = 2048;
11484 int h_errnop;
11485
11486 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011487
11488 ;
11489 return 0;
11490}
11491_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011492if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011493
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011494 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011495
Martin v. Löwis11437992002-04-12 09:54:03 +000011496
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011497$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011498
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11500$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011501
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011502else
Skip Montanaro6dead952003-09-25 14:50:04 +000011503
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11505$as_echo "no" >&6; }
11506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11507$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011509/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011510
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011511# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011512
Martin v. Löwis11437992002-04-12 09:54:03 +000011513int
11514main ()
11515{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011516
11517 char *name;
11518 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000011519 char buffer[2048];
11520 int buflen = 2048;
11521 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011522
Matthias Klosec511b472010-05-08 11:01:39 +000011523 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011524
11525 ;
11526 return 0;
11527}
11528_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011529if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011530
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011531 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011532
Martin v. Löwis11437992002-04-12 09:54:03 +000011533
Matthias Klosec511b472010-05-08 11:01:39 +000011534$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011535
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11537$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011538
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011539else
Skip Montanaro6dead952003-09-25 14:50:04 +000011540
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11542$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11544$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11546/* end confdefs.h. */
11547
11548# include <netdb.h>
11549
11550int
11551main ()
11552{
11553
11554 char *name;
11555 struct hostent *he;
11556 struct hostent_data data;
11557
11558 (void) gethostbyname_r(name, he, &data);
11559
11560 ;
11561 return 0;
11562}
11563_ACEOF
11564if ac_fn_c_try_compile "$LINENO"; then :
11565
11566 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11567
11568
11569$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11570
11571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11572$as_echo "yes" >&6; }
11573
11574else
11575
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11577$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011578
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011581
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011584
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011587 CFLAGS=$OLD_CFLAGS
11588
11589else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011590
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011591 for ac_func in gethostbyname
11592do :
11593 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11594if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011595 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011596#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011597_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011598
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011599fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011600done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011601
Michael W. Hudson54241132001-12-07 15:38:26 +000011602
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011603fi
11604
Michael W. Hudson54241132001-12-07 15:38:26 +000011605
11606
11607
11608
11609
11610
Guido van Rossum627b2d71993-12-24 10:39:16 +000011611# checks for system services
11612# (none yet)
11613
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011614# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011615ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11616if test "x$ac_cv_func___fpu_control" = x""yes; then :
11617
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011618else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11620$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11621if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11622 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011623else
Martin v. Löwis11437992002-04-12 09:54:03 +000011624 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011625LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011628
Martin v. Löwiseba40652007-08-30 20:10:57 +000011629/* Override any GCC internal prototype to avoid an error.
11630 Use char because int might match the return type of a GCC
11631 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011632#ifdef __cplusplus
11633extern "C"
11634#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011635char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011636int
11637main ()
11638{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011639return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011640 ;
11641 return 0;
11642}
11643_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011644if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011645 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011646else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011647 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011648fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011649rm -f core conftest.err conftest.$ac_objext \
11650 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011651LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011652fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11654$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11655if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011656 cat >>confdefs.h <<_ACEOF
11657#define HAVE_LIBIEEE 1
11658_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011659
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011660 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011661
Guido van Rossum627b2d71993-12-24 10:39:16 +000011662fi
11663
Michael W. Hudson54241132001-12-07 15:38:26 +000011664
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011665fi
11666
Michael W. Hudson54241132001-12-07 15:38:26 +000011667
Guido van Rossum7f253911997-05-09 02:42:48 +000011668# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11670$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011671
Martin v. Löwiseba40652007-08-30 20:10:57 +000011672# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011673if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011674 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011675if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011676then
11677
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011678$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011679
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11681$as_echo "yes" >&6; }
11682else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11683$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011684fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011685else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11687$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011688fi
11689
Guido van Rossum7f253911997-05-09 02:42:48 +000011690
Guido van Rossum7f43da71994-08-01 12:15:30 +000011691# check for --with-libm=...
11692
Guido van Rossum563e7081996-09-10 18:20:48 +000011693case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011694Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011695BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011696*) LIBM=-lm
11697esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11699$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011700
Martin v. Löwiseba40652007-08-30 20:10:57 +000011701# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011702if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011703 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011704if test "$withval" = no
11705then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11707$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011708elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011709then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11711$as_echo "set LIBM=\"$withval\"" >&6; }
11712else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011713fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011714else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11716$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011717fi
11718
Guido van Rossum7f43da71994-08-01 12:15:30 +000011719
11720# check for --with-libc=...
11721
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11723$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011724
Martin v. Löwiseba40652007-08-30 20:10:57 +000011725# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011726if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011727 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011728if test "$withval" = no
11729then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11731$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011732elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011733then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11735$as_echo "set LIBC=\"$withval\"" >&6; }
11736else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011737fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011738else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11740$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011741fi
11742
Guido van Rossum7f43da71994-08-01 12:15:30 +000011743
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011744# **************************************************
11745# * Check for various properties of floating point *
11746# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000011747
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11749$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11750if test "${ac_cv_little_endian_double+set}" = set; then :
11751 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011752else
11753
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011754if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011755 ac_cv_little_endian_double=no
11756else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011758/* end confdefs.h. */
11759
11760#include <string.h>
11761int main() {
11762 double x = 9006104071832581.0;
11763 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11764 return 0;
11765 else
11766 return 1;
11767}
11768
11769_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011770if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011771 ac_cv_little_endian_double=yes
11772else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011773 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011774fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011775rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11776 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011777fi
11778
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011779fi
11780
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11782$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011783if test "$ac_cv_little_endian_double" = yes
11784then
11785
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011786$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011787
11788fi
11789
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11791$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11792if test "${ac_cv_big_endian_double+set}" = set; then :
11793 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011794else
11795
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011796if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011797 ac_cv_big_endian_double=no
11798else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011800/* end confdefs.h. */
11801
11802#include <string.h>
11803int main() {
11804 double x = 9006104071832581.0;
11805 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11806 return 0;
11807 else
11808 return 1;
11809}
11810
11811_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011812if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011813 ac_cv_big_endian_double=yes
11814else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011815 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11818 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011819fi
11820
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011821fi
11822
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11824$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011825if test "$ac_cv_big_endian_double" = yes
11826then
11827
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011828$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011829
11830fi
11831
11832# Some ARM platforms use a mixed-endian representation for doubles.
11833# While Python doesn't currently have full support for these platforms
11834# (see e.g., issue 1762561), we can at least make sure that float <-> string
11835# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11837$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11838if test "${ac_cv_mixed_endian_double+set}" = set; then :
11839 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011840else
11841
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011842if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011843 ac_cv_mixed_endian_double=no
11844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011846/* end confdefs.h. */
11847
11848#include <string.h>
11849int main() {
11850 double x = 9006104071832581.0;
11851 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11852 return 0;
11853 else
11854 return 1;
11855}
11856
11857_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011858if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011859 ac_cv_mixed_endian_double=yes
11860else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011861 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011862fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11864 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011865fi
11866
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011867fi
11868
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11870$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011871if test "$ac_cv_mixed_endian_double" = yes
11872then
11873
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011874$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011875
11876fi
11877
11878# The short float repr introduced in Python 3.1 requires the
11879# correctly-rounded string <-> double conversion functions from
11880# Python/dtoa.c, which in turn require that the FPU uses 53-bit
11881# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000011882# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011883# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000011884
11885# This inline assembler syntax may also work for suncc and icc,
11886# so we try it on all platforms.
11887
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11889$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011891/* end confdefs.h. */
11892
11893int
11894main ()
11895{
11896
Mark Dickinsona548dee2009-11-15 13:12:43 +000011897 unsigned short cw;
11898 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11899 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011900
11901 ;
11902 return 0;
11903}
11904_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011905if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011906 have_gcc_asm_for_x87=yes
11907else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011908 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011909fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11912$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000011913if test "$have_gcc_asm_for_x87" = yes
11914then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011915
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011916$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011917
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011918fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000011919
Mark Dickinson04b27232009-01-04 12:29:36 +000011920# Detect whether system arithmetic is subject to x87-style double
11921# rounding issues. The result of this test has little meaning on non
11922# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11923# mode is round-to-nearest and double rounding issues are present, and
11924# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11926$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000011927# $BASECFLAGS may affect the result
11928ac_save_cc="$CC"
11929CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011930if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000011931 ac_cv_x87_double_rounding=no
11932else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000011934/* end confdefs.h. */
11935
11936#include <stdlib.h>
11937#include <math.h>
11938int main() {
11939 volatile double x, y, z;
11940 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11941 x = 0.99999999999999989; /* 1-2**-53 */
11942 y = 1./x;
11943 if (y != 1.)
11944 exit(0);
11945 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11946 x = 1e16;
11947 y = 2.99999;
11948 z = x + y;
11949 if (z != 1e16+4.)
11950 exit(0);
11951 /* both tests show evidence of double rounding */
11952 exit(1);
11953}
11954
11955_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011956if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000011957 ac_cv_x87_double_rounding=no
11958else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011959 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000011960fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000011963fi
11964
Mark Dickinson99abd142009-10-24 13:44:16 +000011965CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11967$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000011968if test "$ac_cv_x87_double_rounding" = yes
11969then
11970
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011971$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000011972
11973fi
11974
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011975# ************************************
11976# * Check for mathematical functions *
11977# ************************************
11978
11979LIBS_SAVE=$LIBS
11980LIBS="$LIBS $LIBM"
11981
Mark Dickinson265d7382008-04-21 22:32:24 +000011982# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11983# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11985$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11986if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11987 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000011988else
11989
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011990if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000011991 ac_cv_tanh_preserves_zero_sign=no
11992else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000011994/* end confdefs.h. */
11995
11996#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000011997#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000011998int main() {
11999 /* return 0 if either negative zeros don't exist
12000 on this platform or if negative zeros exist
12001 and tanh(-0.) == -0. */
12002 if (atan2(0., -1.) == atan2(-0., -1.) ||
12003 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12004 else exit(1);
12005}
12006
12007_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012008if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012009 ac_cv_tanh_preserves_zero_sign=yes
12010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012011 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012012fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012013rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12014 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012015fi
12016
Mark Dickinson265d7382008-04-21 22:32:24 +000012017fi
12018
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12020$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012021if test "$ac_cv_tanh_preserves_zero_sign" = yes
12022then
12023
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012024$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012025
12026fi
12027
Mark Dickinson65898e02009-09-05 10:27:00 +000012028for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012029do :
12030 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12031ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12032eval as_val=\$$as_ac_var
12033 if test "x$as_val" = x""yes; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012034 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012035#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012036_ACEOF
12037
12038fi
12039done
12040
Mark Dickinson65898e02009-09-05 10:27:00 +000012041for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012042do :
12043 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12044ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12045eval as_val=\$$as_ac_var
12046 if test "x$as_val" = x""yes; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012047 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012048#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012049_ACEOF
12050
12051fi
12052done
12053
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012054ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12055"
12056if test "x$ac_cv_have_decl_isinf" = x""yes; then :
12057 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012058else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012059 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012060fi
12061
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012062cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012063#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012064_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012065ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12066"
12067if test "x$ac_cv_have_decl_isnan" = x""yes; then :
12068 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012069else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012070 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012071fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012072
12073cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012074#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012075_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012076ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12077"
12078if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
12079 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012080else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012081 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012082fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012083
12084cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012085#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012086_ACEOF
12087
12088
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012089LIBS=$LIBS_SAVE
12090
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012091# For multiprocessing module, check that sem_open
12092# actually works. For FreeBSD versions <= 7.2,
12093# the kernel module that provides POSIX semaphores
12094# isn't loaded by default, so an attempt to call
12095# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12097$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
12098if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
12099 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012100else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012101 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012102 ac_cv_posix_semaphores_enabled=yes
12103else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012105/* end confdefs.h. */
12106
12107#include <unistd.h>
12108#include <fcntl.h>
12109#include <stdio.h>
12110#include <semaphore.h>
12111#include <sys/stat.h>
12112
12113int main(void) {
12114 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12115 if (a == SEM_FAILED) {
12116 perror("sem_open");
12117 return 1;
12118 }
12119 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012120 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012121 return 0;
12122}
12123
12124_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012125if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012126 ac_cv_posix_semaphores_enabled=yes
12127else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012128 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012129fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12131 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012132fi
12133
12134
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012135fi
12136
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12138$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012139if test $ac_cv_posix_semaphores_enabled = no
12140then
12141
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012142$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012143
12144fi
12145
12146# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12148$as_echo_n "checking for broken sem_getvalue... " >&6; }
12149if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
12150 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012151else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012152 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012153 ac_cv_broken_sem_getvalue=yes
12154else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012156/* end confdefs.h. */
12157
12158#include <unistd.h>
12159#include <fcntl.h>
12160#include <stdio.h>
12161#include <semaphore.h>
12162#include <sys/stat.h>
12163
12164int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012165 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012166 int count;
12167 int res;
12168 if(a==SEM_FAILED){
12169 perror("sem_open");
12170 return 1;
12171
12172 }
12173 res = sem_getvalue(a, &count);
12174 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012175 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012176 return res==-1 ? 1 : 0;
12177}
12178
12179_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012180if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012181 ac_cv_broken_sem_getvalue=no
12182else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012183 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012184fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12186 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012187fi
12188
12189
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012190fi
12191
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12193$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012194if test $ac_cv_broken_sem_getvalue = yes
12195then
12196
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012197$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012198
12199fi
12200
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012201# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12203$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012204# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012205if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012206 enableval=$enable_big_digits; case $enable_big_digits in
12207yes)
12208 enable_big_digits=30 ;;
12209no)
12210 enable_big_digits=15 ;;
1221115|30)
12212 ;;
12213*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012214 as_fn_error "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012215esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12217$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012218
12219cat >>confdefs.h <<_ACEOF
12220#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12221_ACEOF
12222
12223
12224else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12226$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012227fi
12228
12229
Guido van Rossumef2255b2000-03-10 22:30:29 +000012230# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012231ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12232if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012233
12234
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012235$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012236
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012237 wchar_h="yes"
12238
Guido van Rossumef2255b2000-03-10 22:30:29 +000012239else
Martin v. Löwis11437992002-04-12 09:54:03 +000012240 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012241
12242fi
12243
Michael W. Hudson54241132001-12-07 15:38:26 +000012244
Martin v. Löwis11437992002-04-12 09:54:03 +000012245
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012246# determine wchar_t size
12247if test "$wchar_h" = yes
12248then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012249 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012250# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12251# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12252# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12254$as_echo_n "checking size of wchar_t... " >&6; }
12255if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12256 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012257else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012258 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12259"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012260
Martin v. Löwis11437992002-04-12 09:54:03 +000012261else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012262 if test "$ac_cv_type_wchar_t" = yes; then
12263 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12264$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12265{ as_fn_set_status 77
12266as_fn_error "cannot compute sizeof (wchar_t)
12267See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012268 else
12269 ac_cv_sizeof_wchar_t=0
12270 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012272
Martin v. Löwis11437992002-04-12 09:54:03 +000012273fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12275$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012276
12277
12278
Martin v. Löwis11437992002-04-12 09:54:03 +000012279cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012280#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012281_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012282
Michael W. Hudson54241132001-12-07 15:38:26 +000012283
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012284fi
12285
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12287$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012288have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012290/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012291
12292#include <tcl.h>
12293#if TCL_UTF_MAX != 6
12294# error "NOT UCS4_TCL"
12295#endif
12296int
12297main ()
12298{
12299
12300 ;
12301 return 0;
12302}
12303_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012304if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012305
12306
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012307$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012308
12309 have_ucs4_tcl=yes
12310
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012311fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12314$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012315
Skip Montanaro6dead952003-09-25 14:50:04 +000012316# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012317if test "$wchar_h" = yes
12318then
12319 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12321$as_echo_n "checking whether wchar_t is signed... " >&6; }
12322 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12323 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012324else
12325
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012326 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012327 ac_cv_wchar_t_signed=yes
12328else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012330/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012331
12332 #include <wchar.h>
12333 int main()
12334 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000012335 /* Success: exit code 0 */
12336 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012337 }
12338
12339_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012340if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012341 ac_cv_wchar_t_signed=yes
12342else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012343 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012344fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012345rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12346 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012347fi
12348
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012349fi
12350
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12352$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012353fi
12354
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
12356$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012357# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012358if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012359 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012360else
12361 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000012362fi
12363
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012364
12365if test $enable_unicode = yes
12366then
Martin v. Löwisfd917792001-06-27 20:22:04 +000012367 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012368 case "$have_ucs4_tcl" in
12369 yes) enable_unicode="ucs4"
12370 ;;
12371 *) enable_unicode="ucs2"
12372 ;;
12373 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012374fi
12375
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012376
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012377case "$enable_unicode" in
12378ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012379 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012380
12381 ;;
12382ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012383 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012384
12385 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012386*) as_fn_error "invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." "$LINENO" 5 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012387esac
12388
Michael W. Hudson54241132001-12-07 15:38:26 +000012389
Martin v. Löwis11437992002-04-12 09:54:03 +000012390
12391
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012392if test "$enable_unicode" = "no"
12393then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012394 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
12396$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012397else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012398 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000012399
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012400$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012401
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012402
12403 # wchar_t is only usable if it maps to an unsigned type
12404 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012405 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012406 then
12407 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012408
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012409$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012410
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012411 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012412
12413 elif test "$ac_cv_sizeof_short" = "$unicode_size"
12414 then
12415 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012416 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012417
12418 elif test "$ac_cv_sizeof_long" = "$unicode_size"
12419 then
12420 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012421 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012422
12423 else
12424 PY_UNICODE_TYPE="no type found"
12425 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12427$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012428fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012429
12430# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12432$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12433if test "${ac_cv_c_bigendian+set}" = set; then :
12434 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012435else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012436 ac_cv_c_bigendian=unknown
12437 # See if we're dealing with a universal compiler.
12438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12439/* end confdefs.h. */
12440#ifndef __APPLE_CC__
12441 not a universal capable compiler
12442 #endif
12443 typedef int dummy;
12444
Skip Montanaro6dead952003-09-25 14:50:04 +000012445_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012446if ac_fn_c_try_compile "$LINENO"; then :
12447
12448 # Check for potential -arch flags. It is not universal unless
12449 # there are at least two -arch flags with different values.
12450 ac_arch=
12451 ac_prev=
12452 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12453 if test -n "$ac_prev"; then
12454 case $ac_word in
12455 i?86 | x86_64 | ppc | ppc64)
12456 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12457 ac_arch=$ac_word
12458 else
12459 ac_cv_c_bigendian=universal
12460 break
12461 fi
12462 ;;
12463 esac
12464 ac_prev=
12465 elif test "x$ac_word" = "x-arch"; then
12466 ac_prev=arch
12467 fi
12468 done
12469fi
12470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12471 if test $ac_cv_c_bigendian = unknown; then
12472 # See if sys/param.h defines the BYTE_ORDER macro.
12473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012474/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012475#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012476 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012477
Martin v. Löwis11437992002-04-12 09:54:03 +000012478int
12479main ()
12480{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012481#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12482 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12483 && LITTLE_ENDIAN)
12484 bogus endian macros
12485 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012486
12487 ;
12488 return 0;
12489}
12490_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012491if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012492 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012494/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012495#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012496 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012497
Martin v. Löwis11437992002-04-12 09:54:03 +000012498int
12499main ()
12500{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012501#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012502 not big endian
12503 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012504
12505 ;
12506 return 0;
12507}
12508_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012509if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012510 ac_cv_c_bigendian=yes
12511else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012512 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012515fi
12516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12517 fi
12518 if test $ac_cv_c_bigendian = unknown; then
12519 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012521/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012522#include <limits.h>
12523
Martin v. Löwis11437992002-04-12 09:54:03 +000012524int
12525main ()
12526{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012527#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12528 bogus endian macros
12529 #endif
12530
Martin v. Löwis11437992002-04-12 09:54:03 +000012531 ;
12532 return 0;
12533}
12534_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012535if ac_fn_c_try_compile "$LINENO"; then :
12536 # It does; now see whether it defined to _BIG_ENDIAN or not.
12537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12538/* end confdefs.h. */
12539#include <limits.h>
12540
12541int
12542main ()
12543{
12544#ifndef _BIG_ENDIAN
12545 not big endian
12546 #endif
12547
12548 ;
12549 return 0;
12550}
12551_ACEOF
12552if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012553 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012554else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012555 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012556fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12558fi
12559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12560 fi
12561 if test $ac_cv_c_bigendian = unknown; then
12562 # Compile a test program.
12563 if test "$cross_compiling" = yes; then :
12564 # Try to guess by grepping values from an object file.
12565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12566/* end confdefs.h. */
12567short int ascii_mm[] =
12568 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12569 short int ascii_ii[] =
12570 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12571 int use_ascii (int i) {
12572 return ascii_mm[i] + ascii_ii[i];
12573 }
12574 short int ebcdic_ii[] =
12575 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12576 short int ebcdic_mm[] =
12577 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12578 int use_ebcdic (int i) {
12579 return ebcdic_mm[i] + ebcdic_ii[i];
12580 }
12581 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012582
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012583int
12584main ()
12585{
12586return use_ascii (foo) == use_ebcdic (foo);
12587 ;
12588 return 0;
12589}
12590_ACEOF
12591if ac_fn_c_try_compile "$LINENO"; then :
12592 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12593 ac_cv_c_bigendian=yes
12594 fi
12595 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12596 if test "$ac_cv_c_bigendian" = unknown; then
12597 ac_cv_c_bigendian=no
12598 else
12599 # finding both strings is unlikely to happen, but who knows?
12600 ac_cv_c_bigendian=unknown
12601 fi
12602 fi
12603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012605else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012607/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012608$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012609int
12610main ()
12611{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012612
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012613 /* Are we little or big endian? From Harbison&Steele. */
12614 union
12615 {
12616 long int l;
12617 char c[sizeof (long int)];
12618 } u;
12619 u.l = 1;
12620 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012621
12622 ;
12623 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012624}
Martin v. Löwis11437992002-04-12 09:54:03 +000012625_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012626if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012627 ac_cv_c_bigendian=no
12628else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012629 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012630fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012631rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12632 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012634
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012635 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012636fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12638$as_echo "$ac_cv_c_bigendian" >&6; }
12639 case $ac_cv_c_bigendian in #(
12640 yes)
12641 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12642;; #(
12643 no)
12644 ;; #(
12645 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012646
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012647$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012648
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012649 ;; #(
12650 *)
12651 as_fn_error "unknown endianness
12652 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12653 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012654
Michael W. Hudson54241132001-12-07 15:38:26 +000012655
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012656# Check whether right shifting a negative integer extends the sign bit
12657# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12659$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12660if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12661 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012662else
Martin v. Löwis11437992002-04-12 09:54:03 +000012663
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012664if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012665 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012666else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012668/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012669
12670int main()
12671{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012672 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012673}
12674
Martin v. Löwis11437992002-04-12 09:54:03 +000012675_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012676if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012677 ac_cv_rshift_extends_sign=yes
12678else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012679 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012680fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012681rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12682 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012683fi
12684
Martin v. Löwiseba40652007-08-30 20:10:57 +000012685fi
12686
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12688$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012689if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012690then
Martin v. Löwis11437992002-04-12 09:54:03 +000012691
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012692$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012693
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012694fi
12695
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012696# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12698$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12699if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12700 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012701else
Martin v. Löwis11437992002-04-12 09:54:03 +000012702
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012704/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012705#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012706int
12707main ()
12708{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012709
12710 FILE *f = fopen("/dev/null", "r");
12711 flockfile(f);
12712 getc_unlocked(f);
12713 funlockfile(f);
12714
Martin v. Löwis11437992002-04-12 09:54:03 +000012715 ;
12716 return 0;
12717}
12718_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012719if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012720 ac_cv_have_getc_unlocked=yes
12721else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012722 ac_cv_have_getc_unlocked=no
12723fi
12724rm -f core conftest.err conftest.$ac_objext \
12725 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012727
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12729$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012730if test "$ac_cv_have_getc_unlocked" = yes
12731then
Martin v. Löwis11437992002-04-12 09:54:03 +000012732
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012733$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012734
12735fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012736
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012737# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012738# save the value of LIBS so we don't actually link Python with readline
12739LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012740
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012741# On some systems we need to link readline to a termcap compatible
12742# library. NOTE: Keep the precedence of listed libraries synchronised
12743# with setup.py.
12744py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12746$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012747for py_libtermcap in "" ncursesw ncurses curses termcap; do
12748 if test -z "$py_libtermcap"; then
12749 READLINE_LIBS="-lreadline"
12750 else
12751 READLINE_LIBS="-lreadline -l$py_libtermcap"
12752 fi
12753 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012755/* end confdefs.h. */
12756
Martin v. Löwiseba40652007-08-30 20:10:57 +000012757/* Override any GCC internal prototype to avoid an error.
12758 Use char because int might match the return type of a GCC
12759 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012760#ifdef __cplusplus
12761extern "C"
12762#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012763char readline ();
12764int
12765main ()
12766{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012767return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012768 ;
12769 return 0;
12770}
12771_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012772if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012773 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012774fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012775rm -f core conftest.err conftest.$ac_objext \
12776 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012777 if test $py_cv_lib_readline = yes; then
12778 break
12779 fi
12780done
12781# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12782#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000012783if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12785$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012786else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12788$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012789
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012790$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012791
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012792fi
12793
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012794# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12796$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12797if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12798 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012799else
12800 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012801LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012803/* end confdefs.h. */
12804
Martin v. Löwiseba40652007-08-30 20:10:57 +000012805/* Override any GCC internal prototype to avoid an error.
12806 Use char because int might match the return type of a GCC
12807 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012808#ifdef __cplusplus
12809extern "C"
12810#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012811char rl_callback_handler_install ();
12812int
12813main ()
12814{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012815return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012816 ;
12817 return 0;
12818}
12819_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012820if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012821 ac_cv_lib_readline_rl_callback_handler_install=yes
12822else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012823 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012824fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012825rm -f core conftest.err conftest.$ac_objext \
12826 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012827LIBS=$ac_check_lib_save_LIBS
12828fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12830$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12831if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012832
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012833$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012834
12835fi
12836
12837
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012838# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012840/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012841#include <readline/readline.h>
12842_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012843if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012844 have_readline=yes
12845else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012846 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000012847
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012848fi
12849rm -f conftest.err conftest.$ac_ext
12850if test $have_readline = yes
12851then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012853/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012854#include <readline/readline.h>
12855
12856_ACEOF
12857if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012858 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012859
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012860$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012861
12862fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012863rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012864
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012866/* end confdefs.h. */
12867#include <readline/readline.h>
12868
12869_ACEOF
12870if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012871 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012872
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012873$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012874
12875fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012876rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012877
12878fi
12879
Martin v. Löwis0daad592001-09-30 21:09:59 +000012880# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12882$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12883if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12884 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012885else
Martin v. Löwis11437992002-04-12 09:54:03 +000012886 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012887LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012890
Martin v. Löwiseba40652007-08-30 20:10:57 +000012891/* Override any GCC internal prototype to avoid an error.
12892 Use char because int might match the return type of a GCC
12893 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012894#ifdef __cplusplus
12895extern "C"
12896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012897char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012898int
12899main ()
12900{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012901return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012902 ;
12903 return 0;
12904}
12905_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012906if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012907 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012908else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012909 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012910fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012911rm -f core conftest.err conftest.$ac_objext \
12912 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012913LIBS=$ac_check_lib_save_LIBS
12914fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12916$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12917if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012918
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012919$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012920
Martin v. Löwis0daad592001-09-30 21:09:59 +000012921fi
12922
Michael W. Hudson54241132001-12-07 15:38:26 +000012923
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012924# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12926$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12927if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12928 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012929else
12930 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012931LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012933/* end confdefs.h. */
12934
12935/* Override any GCC internal prototype to avoid an error.
12936 Use char because int might match the return type of a GCC
12937 builtin and then its argument prototype would still apply. */
12938#ifdef __cplusplus
12939extern "C"
12940#endif
12941char rl_completion_display_matches_hook ();
12942int
12943main ()
12944{
12945return rl_completion_display_matches_hook ();
12946 ;
12947 return 0;
12948}
12949_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012950if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012951 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12952else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012953 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012954fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012955rm -f core conftest.err conftest.$ac_objext \
12956 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012957LIBS=$ac_check_lib_save_LIBS
12958fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12960$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12961if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012962
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012963$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012964
12965fi
12966
12967
Martin v. Löwis0daad592001-09-30 21:09:59 +000012968# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12970$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12971if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12972 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012973else
Martin v. Löwis11437992002-04-12 09:54:03 +000012974 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012975LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012977/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012978
Martin v. Löwiseba40652007-08-30 20:10:57 +000012979/* Override any GCC internal prototype to avoid an error.
12980 Use char because int might match the return type of a GCC
12981 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012982#ifdef __cplusplus
12983extern "C"
12984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012985char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012986int
12987main ()
12988{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012989return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012990 ;
12991 return 0;
12992}
12993_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012994if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012995 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012996else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012997 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012998fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012999rm -f core conftest.err conftest.$ac_objext \
13000 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013001LIBS=$ac_check_lib_save_LIBS
13002fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13004$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
13005if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013006
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013007$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013008
Guido van Rossum353ae582001-07-10 16:45:32 +000013009fi
13010
Jack Jansendd19cf82001-12-06 22:36:17 +000013011
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013012# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013014/* end confdefs.h. */
13015#include <readline/readline.h>
13016_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013017if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013018 have_readline=yes
13019else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013020 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013021
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013022fi
13023rm -f conftest.err conftest.$ac_ext
13024if test $have_readline = yes
13025then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013027/* end confdefs.h. */
13028#include <readline/readline.h>
13029
13030_ACEOF
13031if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013032 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013033
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013034$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013035
13036fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013037rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013038
13039fi
13040
Martin v. Löwis82bca632006-02-10 20:49:30 +000013041# End of readline checks: restore LIBS
13042LIBS=$LIBS_no_readline
13043
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13045$as_echo_n "checking for broken nice()... " >&6; }
13046if test "${ac_cv_broken_nice+set}" = set; then :
13047 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013048else
Martin v. Löwis11437992002-04-12 09:54:03 +000013049
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013050if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013051 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013052else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013054/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013055
13056int main()
13057{
13058 int val1 = nice(1);
13059 if (val1 != -1 && val1 == nice(2))
13060 exit(0);
13061 exit(1);
13062}
13063
Martin v. Löwis11437992002-04-12 09:54:03 +000013064_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013065if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013066 ac_cv_broken_nice=yes
13067else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013068 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013069fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13071 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013072fi
13073
Martin v. Löwiseba40652007-08-30 20:10:57 +000013074fi
13075
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13077$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013078if test "$ac_cv_broken_nice" = yes
13079then
Martin v. Löwis11437992002-04-12 09:54:03 +000013080
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013081$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013082
13083fi
13084
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13086$as_echo_n "checking for broken poll()... " >&6; }
13087if test "${ac_cv_broken_poll+set}" = set; then :
13088 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013089else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013090 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013091 ac_cv_broken_poll=no
13092else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013094/* end confdefs.h. */
13095
13096#include <poll.h>
13097
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013098int main()
13099{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013100 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013101 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013102
13103 close (42);
13104
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013105 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013106 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013107 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013108 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013109 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013110 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013111 return 1;
13112}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013113
13114_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013115if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013116 ac_cv_broken_poll=yes
13117else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013118 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013119fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013120rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13121 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013123
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013124fi
13125
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13127$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013128if test "$ac_cv_broken_poll" = yes
13129then
13130
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013131$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013132
13133fi
13134
Brett Cannon43802422005-02-10 20:48:03 +000013135# 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 +000013136# (which is not required by ISO C or UNIX spec) and/or if we support
13137# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013138ac_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 +000013139#include <$ac_cv_struct_tm>
13140
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013141"
13142if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013143
13144cat >>confdefs.h <<_ACEOF
13145#define HAVE_STRUCT_TM_TM_ZONE 1
13146_ACEOF
13147
13148
13149fi
13150
13151if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13152
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013153$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013154
13155else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013156 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13157"
13158if test "x$ac_cv_have_decl_tzname" = x""yes; then :
13159 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013160else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013161 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013162fi
13163
Martin v. Löwiseba40652007-08-30 20:10:57 +000013164cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013165#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013166_ACEOF
13167
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13169$as_echo_n "checking for tzname... " >&6; }
13170if test "${ac_cv_var_tzname+set}" = set; then :
13171 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013172else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013174/* end confdefs.h. */
13175#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013176#if !HAVE_DECL_TZNAME
13177extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013178#endif
13179
13180int
13181main ()
13182{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013183return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013184 ;
13185 return 0;
13186}
13187_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013188if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013189 ac_cv_var_tzname=yes
13190else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013191 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013192fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013193rm -f core conftest.err conftest.$ac_objext \
13194 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013195fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13197$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013198 if test $ac_cv_var_tzname = yes; then
13199
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013200$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013201
13202 fi
13203fi
13204
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013205
Martin v. Löwis1d459062005-03-14 21:23:33 +000013206# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13208$as_echo_n "checking for working tzset()... " >&6; }
13209if test "${ac_cv_working_tzset+set}" = set; then :
13210 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013211else
13212
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013213if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013214 ac_cv_working_tzset=no
13215else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013217/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013218
13219#include <stdlib.h>
13220#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013221#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013222
13223#if HAVE_TZNAME
13224extern char *tzname[];
13225#endif
13226
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013227int main()
13228{
Brett Cannon18367812003-09-19 00:59:16 +000013229 /* Note that we need to ensure that not only does tzset(3)
13230 do 'something' with localtime, but it works as documented
13231 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013232 This includes making sure that tzname is set properly if
13233 tm->tm_zone does not exist since it is the alternative way
13234 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013235
13236 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013237 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013238 */
13239
Martin v. Löwis1d459062005-03-14 21:23:33 +000013240 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013241 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13242
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013243 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013244 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013245 if (localtime(&groundhogday)->tm_hour != 0)
13246 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013247#if HAVE_TZNAME
13248 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13249 if (strcmp(tzname[0], "UTC") ||
13250 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13251 exit(1);
13252#endif
Brett Cannon18367812003-09-19 00:59:16 +000013253
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013254 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013255 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013256 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013257 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013258#if HAVE_TZNAME
13259 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13260 exit(1);
13261#endif
Brett Cannon18367812003-09-19 00:59:16 +000013262
13263 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13264 tzset();
13265 if (localtime(&groundhogday)->tm_hour != 11)
13266 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013267#if HAVE_TZNAME
13268 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13269 exit(1);
13270#endif
13271
13272#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013273 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13274 exit(1);
13275 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13276 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013277#endif
Brett Cannon18367812003-09-19 00:59:16 +000013278
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013279 exit(0);
13280}
13281
13282_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013283if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013284 ac_cv_working_tzset=yes
13285else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013286 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013287fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13289 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013290fi
13291
Martin v. Löwiseba40652007-08-30 20:10:57 +000013292fi
13293
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13295$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013296if test "$ac_cv_working_tzset" = yes
13297then
13298
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013299$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013300
13301fi
13302
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013303# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13305$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13306if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13307 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013308else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013310/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013311#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013312int
13313main ()
13314{
13315
13316struct stat st;
13317st.st_mtim.tv_nsec = 1;
13318
13319 ;
13320 return 0;
13321}
13322_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013323if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013324 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013325else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013326 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13329fi
13330
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13332$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013333if test "$ac_cv_stat_tv_nsec" = yes
13334then
13335
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013336$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013337
13338fi
13339
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013340# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13342$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13343if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13344 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013345else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013347/* end confdefs.h. */
13348#include <sys/stat.h>
13349int
13350main ()
13351{
13352
13353struct stat st;
13354st.st_mtimespec.tv_nsec = 1;
13355
13356 ;
13357 return 0;
13358}
13359_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013360if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013361 ac_cv_stat_tv_nsec2=yes
13362else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013363 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013364fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13366fi
13367
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13369$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013370if test "$ac_cv_stat_tv_nsec2" = yes
13371then
13372
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013373$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013374
13375fi
13376
Jack Jansen666b1e72001-10-31 12:11:48 +000013377# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13379$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13380if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13381 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013382else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013384/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013385#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013386int
13387main ()
13388{
Jack Jansen666b1e72001-10-31 12:11:48 +000013389
13390 int rtn;
13391 rtn = mvwdelch(0,0,0);
13392
Martin v. Löwis11437992002-04-12 09:54:03 +000013393 ;
13394 return 0;
13395}
13396_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013397if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013398 ac_cv_mvwdelch_is_expression=yes
13399else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013400 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13403fi
13404
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13406$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013407
13408if test "$ac_cv_mvwdelch_is_expression" = yes
13409then
Martin v. Löwis11437992002-04-12 09:54:03 +000013410
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013411$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013412
13413fi
13414
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13416$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13417if test "${ac_cv_window_has_flags+set}" = set; then :
13418 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013419else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013421/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013422#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013423int
13424main ()
13425{
Jack Jansen666b1e72001-10-31 12:11:48 +000013426
13427 WINDOW *w;
13428 w->_flags = 0;
13429
Martin v. Löwis11437992002-04-12 09:54:03 +000013430 ;
13431 return 0;
13432}
13433_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013434if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013435 ac_cv_window_has_flags=yes
13436else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013437 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13440fi
13441
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13443$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013444
Jack Jansen666b1e72001-10-31 12:11:48 +000013445
13446if test "$ac_cv_window_has_flags" = yes
13447then
Martin v. Löwis11437992002-04-12 09:54:03 +000013448
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013449$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013450
13451fi
13452
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13454$as_echo_n "checking for is_term_resized... " >&6; }
13455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013456/* end confdefs.h. */
13457#include <curses.h>
13458int
13459main ()
13460{
13461void *x=is_term_resized
13462 ;
13463 return 0;
13464}
13465_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013466if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013467
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013468$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013469
Matthias Klosec511b472010-05-08 11:01:39 +000013470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013471$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013472else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13474$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013475
13476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13478
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13480$as_echo_n "checking for resize_term... " >&6; }
13481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013482/* end confdefs.h. */
13483#include <curses.h>
13484int
13485main ()
13486{
13487void *x=resize_term
13488 ;
13489 return 0;
13490}
13491_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013492if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013493
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013494$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013495
Matthias Klosec511b472010-05-08 11:01:39 +000013496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013497$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013498else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13500$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013501
13502fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13504
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13506$as_echo_n "checking for resizeterm... " >&6; }
13507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013508/* end confdefs.h. */
13509#include <curses.h>
13510int
13511main ()
13512{
13513void *x=resizeterm
13514 ;
13515 return 0;
13516}
13517_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013518if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013519
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013520$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013521
Matthias Klosec511b472010-05-08 11:01:39 +000013522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013523$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013524else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13526$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013527
13528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13530
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13532$as_echo_n "checking for /dev/ptmx... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013533
13534if test -r /dev/ptmx
13535then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13537$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013538
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013539$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013540
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013541else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13543$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013544fi
13545
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13547$as_echo_n "checking for /dev/ptc... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013548
13549if test -r /dev/ptc
13550then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13552$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013553
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013554$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013555
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013556else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13558$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013559fi
13560
Mark Dickinson82864d12009-11-15 16:18:58 +000013561if test "$have_long_long" = yes
13562then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13564$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13565 if test "${ac_cv_have_long_long_format+set}" = set; then :
13566 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000013567else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013568 if test "$cross_compiling" = yes; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013569 ac_cv_have_long_long_format=no
13570else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013572/* end confdefs.h. */
13573
13574 #include <stdio.h>
13575 #include <stddef.h>
13576 #include <string.h>
13577
13578 #ifdef HAVE_SYS_TYPES_H
13579 #include <sys/types.h>
13580 #endif
13581
13582 int main()
13583 {
13584 char buffer[256];
13585
13586 if (sprintf(buffer, "%lld", (long long)123) < 0)
13587 return 1;
13588 if (strcmp(buffer, "123"))
13589 return 1;
13590
13591 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13592 return 1;
13593 if (strcmp(buffer, "-123"))
13594 return 1;
13595
13596 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13597 return 1;
13598 if (strcmp(buffer, "123"))
13599 return 1;
13600
13601 return 0;
13602 }
13603
13604_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013605if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013606 ac_cv_have_long_long_format=yes
13607else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013608 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000013609fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013610rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13611 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013612fi
13613
13614
Mark Dickinson82864d12009-11-15 16:18:58 +000013615fi
13616
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13618$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000013619fi
13620
Mark Dickinson5ce84742009-12-31 20:48:04 +000013621if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000013622then
13623
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013624$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000013625
13626fi
13627
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000013628if test $ac_sys_system = Darwin
13629then
13630 LIBS="$LIBS -framework CoreFoundation"
13631fi
13632
Mark Dickinson82864d12009-11-15 16:18:58 +000013633
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13635$as_echo_n "checking for %zd printf() format support... " >&6; }
13636if test "${ac_cv_have_size_t_format+set}" = set; then :
13637 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013638else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013639 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013640 ac_cv_have_size_t_format="cross -- assuming yes"
13641
Brett Cannon09d12362006-05-11 05:11:33 +000013642else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000013644/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013645
Brett Cannon09d12362006-05-11 05:11:33 +000013646#include <stdio.h>
13647#include <stddef.h>
13648#include <string.h>
13649
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013650#ifdef HAVE_SYS_TYPES_H
13651#include <sys/types.h>
13652#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013653
13654#ifdef HAVE_SSIZE_T
13655typedef ssize_t Py_ssize_t;
13656#elif SIZEOF_VOID_P == SIZEOF_LONG
13657typedef long Py_ssize_t;
13658#else
13659typedef int Py_ssize_t;
13660#endif
Brett Cannon09d12362006-05-11 05:11:33 +000013661
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013662int main()
13663{
13664 char buffer[256];
13665
Brett Cannon09d12362006-05-11 05:11:33 +000013666 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13667 return 1;
13668
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013669 if (strcmp(buffer, "123"))
13670 return 1;
13671
13672 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13673 return 1;
13674
13675 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000013676 return 1;
13677
13678 return 0;
13679}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013680
Brett Cannon09d12362006-05-11 05:11:33 +000013681_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013682if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013683 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013684else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013685 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013686fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13688 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013689fi
13690
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013691fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13693$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013694if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013695
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013696$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013697
13698fi
13699
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013700ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013701#ifdef HAVE_SYS_TYPES_H
13702#include <sys/types.h>
13703#endif
13704#ifdef HAVE_SYS_SOCKET_H
13705#include <sys/socket.h>
13706#endif
13707
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013708"
13709if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013710
Martin v. Löwis11437992002-04-12 09:54:03 +000013711else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013712
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013713$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013714
13715fi
13716
Michael W. Hudson54241132001-12-07 15:38:26 +000013717
Michael W. Hudson54241132001-12-07 15:38:26 +000013718
13719
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013720for h in `(cd $srcdir;echo Python/thread_*.h)`
13721do
13722 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13723done
13724
Michael W. Hudson54241132001-12-07 15:38:26 +000013725
Neal Norwitzd24499d2005-12-18 21:36:39 +000013726SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13728$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013729for dir in $SRCDIRS; do
13730 if test ! -d $dir; then
13731 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013732 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013733done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13735$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013736
Guido van Rossum627b2d71993-12-24 10:39:16 +000013737# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000013738ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013739
Martin v. Löwis11437992002-04-12 09:54:03 +000013740cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013741# This file is a shell script that caches the results of configure
13742# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013743# scripts and configure runs, see configure's option --config-cache.
13744# It is not useful on other systems. If it contains results you don't
13745# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013746#
Martin v. Löwis11437992002-04-12 09:54:03 +000013747# config.status only pays attention to the cache file if you give it
13748# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013749#
Skip Montanaro6dead952003-09-25 14:50:04 +000013750# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013751# loading this file, other *unset* `ac_cv_foo' will be assigned the
13752# following values.
13753
13754_ACEOF
13755
Guido van Rossumf78abae1997-01-21 22:02:36 +000013756# The following way of writing the cache mishandles newlines in values,
13757# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013758# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013759# Ultrix sh set writes to stderr and can't be redirected directly,
13760# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013761(
13762 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13763 eval ac_val=\$$ac_var
13764 case $ac_val in #(
13765 *${as_nl}*)
13766 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013767 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13768$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013769 esac
13770 case $ac_var in #(
13771 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013772 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13773 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013774 esac ;;
13775 esac
13776 done
13777
Martin v. Löwis11437992002-04-12 09:54:03 +000013778 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000013779 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13780 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013781 # `set' does not quote correctly, so add quotes: double-quote
13782 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013783 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013784 "s/'/'\\\\''/g;
13785 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013786 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013787 *)
13788 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013789 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013790 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013791 esac |
13792 sort
13793) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013794 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000013795 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013796 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000013797 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013798 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13799 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000013800 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13801 :end' >>confcache
13802if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13803 if test -w "$cache_file"; then
13804 test "x$cache_file" != "x/dev/null" &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013805 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13806$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013808 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013809 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13810$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013811 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013812fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013813rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013814
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013815test "x$prefix" = xNONE && prefix=$ac_default_prefix
13816# Let make expand exec_prefix.
13817test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013818
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013819DEFS=-DHAVE_CONFIG_H
13820
Skip Montanaro6dead952003-09-25 14:50:04 +000013821ac_libobjs=
13822ac_ltlibobjs=
13823for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13824 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013825 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013826 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000013827 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13828 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013829 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13830 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013831done
13832LIBOBJS=$ac_libobjs
13833
13834LTLIBOBJS=$ac_ltlibobjs
13835
13836
Martin v. Löwis11437992002-04-12 09:54:03 +000013837
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013838
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013839: ${CONFIG_STATUS=./config.status}
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013840ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013841ac_clean_files_save=$ac_clean_files
13842ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013843{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13844$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13845as_write_fail=0
13846cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013847#! $SHELL
13848# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013849# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013850# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013851# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013852
Martin v. Löwis11437992002-04-12 09:54:03 +000013853debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013854ac_cs_recheck=false
13855ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013856
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013857SHELL=\${CONFIG_SHELL-$SHELL}
13858export SHELL
13859_ASEOF
13860cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13861## -------------------- ##
13862## M4sh Initialization. ##
13863## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013864
Martin v. Löwiseba40652007-08-30 20:10:57 +000013865# Be more Bourne compatible
13866DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013867if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013868 emulate sh
13869 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013870 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013871 # is contrary to our usage. Disable this feature.
13872 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013873 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000013874else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013875 case `(set -o) 2>/dev/null` in #(
13876 *posix*) :
13877 set -o posix ;; #(
13878 *) :
13879 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013880esac
Martin v. Löwis11437992002-04-12 09:54:03 +000013881fi
Michael W. Hudson54241132001-12-07 15:38:26 +000013882
Skip Montanaro6dead952003-09-25 14:50:04 +000013883
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013884as_nl='
13885'
13886export as_nl
13887# Printing a long string crashes Solaris 7 /usr/bin/printf.
13888as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13889as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13890as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13891# Prefer a ksh shell builtin over an external printf program on Solaris,
13892# but without wasting forks for bash or zsh.
13893if test -z "$BASH_VERSION$ZSH_VERSION" \
13894 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13895 as_echo='print -r --'
13896 as_echo_n='print -rn --'
13897elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13898 as_echo='printf %s\n'
13899 as_echo_n='printf %s'
13900else
13901 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13902 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13903 as_echo_n='/usr/ucb/echo -n'
13904 else
13905 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13906 as_echo_n_body='eval
13907 arg=$1;
13908 case $arg in #(
13909 *"$as_nl"*)
13910 expr "X$arg" : "X\\(.*\\)$as_nl";
13911 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13912 esac;
13913 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13914 '
13915 export as_echo_n_body
13916 as_echo_n='sh -c $as_echo_n_body as_echo'
13917 fi
13918 export as_echo_body
13919 as_echo='sh -c $as_echo_body as_echo'
13920fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013921
13922# The user is always right.
13923if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013924 PATH_SEPARATOR=:
13925 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13926 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13927 PATH_SEPARATOR=';'
13928 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013929fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013930
Martin v. Löwiseba40652007-08-30 20:10:57 +000013931
13932# IFS
13933# We need space, tab and new line, in precisely that order. Quoting is
13934# there to prevent editors from complaining about space-tab.
13935# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13936# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013937IFS=" "" $as_nl"
13938
13939# Find who we are. Look in the path if we contain no directory separator.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013940case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000013941 *[\\/]* ) as_myself=$0 ;;
13942 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013943for as_dir in $PATH
13944do
13945 IFS=$as_save_IFS
13946 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013947 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13948 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000013949IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013950
Martin v. Löwiseba40652007-08-30 20:10:57 +000013951 ;;
13952esac
13953# We did not find ourselves, most probably we were run as `sh COMMAND'
13954# in which case we are not to be found in the path.
13955if test "x$as_myself" = x; then
13956 as_myself=$0
13957fi
13958if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013959 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13960 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013961fi
13962
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013963# Unset variables that we do not need and which cause bugs (e.g. in
13964# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13965# suppresses any "Segmentation fault" message there. '((' could
13966# trigger a bug in pdksh 5.2.14.
13967for as_var in BASH_ENV ENV MAIL MAILPATH
13968do eval test x\${$as_var+set} = xset \
13969 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013970done
13971PS1='$ '
13972PS2='> '
13973PS4='+ '
13974
13975# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013976LC_ALL=C
13977export LC_ALL
13978LANGUAGE=C
13979export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000013980
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013981# CDPATH.
13982(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13983
13984
13985# as_fn_error ERROR [LINENO LOG_FD]
13986# ---------------------------------
13987# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13988# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13989# script with status $?, using 1 if that was 0.
13990as_fn_error ()
13991{
13992 as_status=$?; test $as_status -eq 0 && as_status=1
13993 if test "$3"; then
13994 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13995 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
13996 fi
13997 $as_echo "$as_me: error: $1" >&2
13998 as_fn_exit $as_status
13999} # as_fn_error
14000
14001
14002# as_fn_set_status STATUS
14003# -----------------------
14004# Set $? to STATUS, without forking.
14005as_fn_set_status ()
14006{
14007 return $1
14008} # as_fn_set_status
14009
14010# as_fn_exit STATUS
14011# -----------------
14012# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14013as_fn_exit ()
14014{
14015 set +e
14016 as_fn_set_status $1
14017 exit $1
14018} # as_fn_exit
14019
14020# as_fn_unset VAR
14021# ---------------
14022# Portably unset VAR.
14023as_fn_unset ()
14024{
14025 { eval $1=; unset $1;}
14026}
14027as_unset=as_fn_unset
14028# as_fn_append VAR VALUE
14029# ----------------------
14030# Append the text in VALUE to the end of the definition contained in VAR. Take
14031# advantage of any shell optimizations that allow amortized linear growth over
14032# repeated appends, instead of the typical quadratic growth present in naive
14033# implementations.
14034if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14035 eval 'as_fn_append ()
14036 {
14037 eval $1+=\$2
14038 }'
14039else
14040 as_fn_append ()
14041 {
14042 eval $1=\$$1\$2
14043 }
14044fi # as_fn_append
14045
14046# as_fn_arith ARG...
14047# ------------------
14048# Perform arithmetic evaluation on the ARGs, and store the result in the
14049# global $as_val. Take advantage of shells that can avoid forks. The arguments
14050# must be portable across $(()) and expr.
14051if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14052 eval 'as_fn_arith ()
14053 {
14054 as_val=$(( $* ))
14055 }'
14056else
14057 as_fn_arith ()
14058 {
14059 as_val=`expr "$@" || test $? -eq 1`
14060 }
14061fi # as_fn_arith
14062
14063
Martin v. Löwiseba40652007-08-30 20:10:57 +000014064if expr a : '\(a\)' >/dev/null 2>&1 &&
14065 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14066 as_expr=expr
14067else
14068 as_expr=false
14069fi
14070
14071if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14072 as_basename=basename
14073else
14074 as_basename=false
14075fi
14076
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014077if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14078 as_dirname=dirname
14079else
14080 as_dirname=false
14081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014082
Martin v. Löwiseba40652007-08-30 20:10:57 +000014083as_me=`$as_basename -- "$0" ||
14084$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14085 X"$0" : 'X\(//\)$' \| \
14086 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014087$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014088 sed '/^.*\/\([^/][^/]*\)\/*$/{
14089 s//\1/
14090 q
14091 }
14092 /^X\/\(\/\/\)$/{
14093 s//\1/
14094 q
14095 }
14096 /^X\/\(\/\).*/{
14097 s//\1/
14098 q
14099 }
14100 s/.*/./; q'`
14101
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014102# Avoid depending upon Character Ranges.
14103as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14104as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14105as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14106as_cr_digits='0123456789'
14107as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014108
14109ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014110case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014111-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014112 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014113 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014114 xy) ECHO_C='\c';;
14115 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14116 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014117 esac;;
14118*)
14119 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014120esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014121
Martin v. Löwis11437992002-04-12 09:54:03 +000014122rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014123if test -d conf$$.dir; then
14124 rm -f conf$$.dir/conf$$.file
14125else
14126 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014127 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014128fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014129if (echo >conf$$.file) 2>/dev/null; then
14130 if ln -s conf$$.file conf$$ 2>/dev/null; then
14131 as_ln_s='ln -s'
14132 # ... but there are two gotchas:
14133 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14134 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14135 # In both cases, we have to default to `cp -p'.
14136 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14137 as_ln_s='cp -p'
14138 elif ln conf$$.file conf$$ 2>/dev/null; then
14139 as_ln_s=ln
14140 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014141 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014142 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014143else
14144 as_ln_s='cp -p'
14145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014146rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14147rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014148
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014149
14150# as_fn_mkdir_p
14151# -------------
14152# Create "$as_dir" as a directory, including parents if necessary.
14153as_fn_mkdir_p ()
14154{
14155
14156 case $as_dir in #(
14157 -*) as_dir=./$as_dir;;
14158 esac
14159 test -d "$as_dir" || eval $as_mkdir_p || {
14160 as_dirs=
14161 while :; do
14162 case $as_dir in #(
14163 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14164 *) as_qdir=$as_dir;;
14165 esac
14166 as_dirs="'$as_qdir' $as_dirs"
14167 as_dir=`$as_dirname -- "$as_dir" ||
14168$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14169 X"$as_dir" : 'X\(//\)[^/]' \| \
14170 X"$as_dir" : 'X\(//\)$' \| \
14171 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14172$as_echo X"$as_dir" |
14173 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14174 s//\1/
14175 q
14176 }
14177 /^X\(\/\/\)[^/].*/{
14178 s//\1/
14179 q
14180 }
14181 /^X\(\/\/\)$/{
14182 s//\1/
14183 q
14184 }
14185 /^X\(\/\).*/{
14186 s//\1/
14187 q
14188 }
14189 s/.*/./; q'`
14190 test -d "$as_dir" && break
14191 done
14192 test -z "$as_dirs" || eval "mkdir $as_dirs"
14193 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
14194
14195
14196} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014197if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014198 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014199else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014200 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014201 as_mkdir_p=false
14202fi
14203
Martin v. Löwiseba40652007-08-30 20:10:57 +000014204if test -x / >/dev/null 2>&1; then
14205 as_test_x='test -x'
14206else
14207 if ls -dL / >/dev/null 2>&1; then
14208 as_ls_L_option=L
14209 else
14210 as_ls_L_option=
14211 fi
14212 as_test_x='
14213 eval sh -c '\''
14214 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014215 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000014216 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014217 case $1 in #(
14218 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014219 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014220 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014221 ???[sx]*):;;*)false;;esac;fi
14222 '\'' sh
14223 '
14224fi
14225as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014226
14227# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014228as_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 +000014229
14230# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014232
14233
Martin v. Löwis11437992002-04-12 09:54:03 +000014234exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014235## ----------------------------------- ##
14236## Main body of $CONFIG_STATUS script. ##
14237## ----------------------------------- ##
14238_ASEOF
14239test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014240
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014241cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14242# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014243# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000014244# values after options handling.
14245ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000014246This file was extended by python $as_me 2.7, which was
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014247generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014248
14249 CONFIG_FILES = $CONFIG_FILES
14250 CONFIG_HEADERS = $CONFIG_HEADERS
14251 CONFIG_LINKS = $CONFIG_LINKS
14252 CONFIG_COMMANDS = $CONFIG_COMMANDS
14253 $ $0 $@
14254
Martin v. Löwiseba40652007-08-30 20:10:57 +000014255on `(hostname || uname -n) 2>/dev/null | sed 1q`
14256"
14257
Martin v. Löwis11437992002-04-12 09:54:03 +000014258_ACEOF
14259
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014260case $ac_config_files in *"
14261"*) set x $ac_config_files; shift; ac_config_files=$*;;
14262esac
14263
14264case $ac_config_headers in *"
14265"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14266esac
14267
14268
14269cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014270# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000014271config_files="$ac_config_files"
14272config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014273
Martin v. Löwiseba40652007-08-30 20:10:57 +000014274_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014275
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014276cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014277ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014278\`$as_me' instantiates files and other configuration actions
14279from templates according to the current configuration. Unless the files
14280and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014281
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014282Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014283
14284 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000014285 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014286 --config print configuration, then exit
14287 -q, --quiet, --silent
14288 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014289 -d, --debug don't remove temporary files
14290 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014291 --file=FILE[:TEMPLATE]
14292 instantiate the configuration file FILE
14293 --header=FILE[:TEMPLATE]
14294 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014295
14296Configuration files:
14297$config_files
14298
14299Configuration headers:
14300$config_headers
14301
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014302Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000014303
Martin v. Löwiseba40652007-08-30 20:10:57 +000014304_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014305cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14306ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014307ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000014308python config.status 2.7
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014309configured by $0, generated by GNU Autoconf 2.65,
14310 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014311
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014312Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014313This config.status script is free software; the Free Software Foundation
14314gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000014315
14316ac_pwd='$ac_pwd'
14317srcdir='$srcdir'
14318INSTALL='$INSTALL'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014319test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014320_ACEOF
14321
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014322cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14323# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014324ac_need_defaults=:
14325while test $# != 0
14326do
14327 case $1 in
14328 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014329 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14330 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014331 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014332 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014333 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014334 ac_option=$1
14335 ac_optarg=$2
14336 ac_shift=shift
14337 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 esac
14339
Skip Montanaro6dead952003-09-25 14:50:04 +000014340 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014341 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014342 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14343 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014344 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014345 $as_echo "$ac_cs_version"; exit ;;
14346 --config | --confi | --conf | --con | --co | --c )
14347 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014348 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014349 debug=: ;;
14350 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014351 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014352 case $ac_optarg in
14353 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14354 esac
14355 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014356 ac_need_defaults=false;;
14357 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014358 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014359 case $ac_optarg in
14360 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14361 esac
14362 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014363 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014364 --he | --h)
14365 # Conflict between --help and --header
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014366 as_fn_error "ambiguous option: \`$1'
14367Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014368 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014369 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014370 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14371 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14372 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014373
14374 # This is an error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014375 -*) as_fn_error "unrecognized option: \`$1'
14376Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014377
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014378 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014379 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014380
14381 esac
14382 shift
14383done
14384
Skip Montanaro6dead952003-09-25 14:50:04 +000014385ac_configure_extra_args=
14386
14387if $ac_cs_silent; then
14388 exec 6>/dev/null
14389 ac_configure_extra_args="$ac_configure_extra_args --silent"
14390fi
14391
14392_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014393cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014394if \$ac_cs_recheck; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014395 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14396 shift
14397 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14398 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014399 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014400 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014401fi
14402
Martin v. Löwis11437992002-04-12 09:54:03 +000014403_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014404cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014405exec 5>>config.log
14406{
14407 echo
14408 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14409## Running $as_me. ##
14410_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014411 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014412} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014413
Martin v. Löwiseba40652007-08-30 20:10:57 +000014414_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014415cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014416_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014417
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014418cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014419
14420# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014421for ac_config_target in $ac_config_targets
14422do
Martin v. Löwiseba40652007-08-30 20:10:57 +000014423 case $ac_config_target in
14424 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14425 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14426 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
14427 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000014428 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14429 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014430 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14431 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014432 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014433
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014434 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014435 esac
14436done
14437
Martin v. Löwiseba40652007-08-30 20:10:57 +000014438
Martin v. Löwis11437992002-04-12 09:54:03 +000014439# If the user did not use the arguments to specify the items to instantiate,
14440# then the envvar interface is used. Set only those that are not.
14441# We use the long form for the default assignment because of an extremely
14442# bizarre bug on SunOS 4.1.3.
14443if $ac_need_defaults; then
14444 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14445 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14446fi
14447
Skip Montanaro6dead952003-09-25 14:50:04 +000014448# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000014449# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014450# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014451# Hook for its removal unless debugging.
14452# Note that there is a small window in which the directory will not be cleaned:
14453# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014454$debug ||
14455{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014456 tmp=
14457 trap 'exit_status=$?
14458 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14459' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014460 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014461}
Martin v. Löwis11437992002-04-12 09:54:03 +000014462# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014463
Martin v. Löwis11437992002-04-12 09:54:03 +000014464{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014465 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014466 test -n "$tmp" && test -d "$tmp"
14467} ||
14468{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014469 tmp=./conf$$-$RANDOM
14470 (umask 077 && mkdir "$tmp")
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014471} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014472
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014473# Set up the scripts for CONFIG_FILES section.
14474# No need to generate them if there are no CONFIG_FILES.
14475# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014476if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014477
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014478
14479ac_cr=`echo X | tr X '\015'`
14480# On cygwin, bash can eat \r inside `` if the user requested igncr.
14481# But we know of no other shell where ac_cr would be empty at this
14482# point, so we can use a bashism as a fallback.
14483if test "x$ac_cr" = x; then
14484 eval ac_cr=\$\'\\r\'
14485fi
14486ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14487if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14488 ac_cs_awk_cr='\r'
14489else
14490 ac_cs_awk_cr=$ac_cr
14491fi
14492
14493echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014494_ACEOF
14495
Martin v. Löwiseba40652007-08-30 20:10:57 +000014496
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014497{
14498 echo "cat >conf$$subs.awk <<_ACEOF" &&
14499 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14500 echo "_ACEOF"
14501} >conf$$subs.sh ||
14502 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14503ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014504ac_delim='%!_!# '
14505for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014506 . ./conf$$subs.sh ||
14507 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014508
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014509 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14510 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014511 break
14512 elif $ac_last_try; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014513 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014514 else
14515 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014516 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014517done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014518rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000014519
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014520cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14521cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000014522_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014523sed -n '
14524h
14525s/^/S["/; s/!.*/"]=/
14526p
14527g
14528s/^[^!]*!//
14529:repl
14530t repl
14531s/'"$ac_delim"'$//
14532t delim
14533:nl
14534h
14535s/\(.\{148\}\)..*/\1/
14536t more1
14537s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14538p
14539n
14540b repl
14541:more1
14542s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14543p
14544g
14545s/.\{148\}//
14546t nl
14547:delim
14548h
14549s/\(.\{148\}\)..*/\1/
14550t more2
14551s/["\\]/\\&/g; s/^/"/; s/$/"/
14552p
14553b
14554:more2
14555s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14556p
14557g
14558s/.\{148\}//
14559t delim
14560' <conf$$subs.awk | sed '
14561/^[^""]/{
14562 N
14563 s/\n//
14564}
14565' >>$CONFIG_STATUS || ac_write_fail=1
14566rm -f conf$$subs.awk
14567cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14568_ACAWK
14569cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14570 for (key in S) S_is_set[key] = 1
14571 FS = ""
14572
14573}
14574{
14575 line = $ 0
14576 nfields = split(line, field, "@")
14577 substed = 0
14578 len = length(field[1])
14579 for (i = 2; i < nfields; i++) {
14580 key = field[i]
14581 keylen = length(key)
14582 if (S_is_set[key]) {
14583 value = S[key]
14584 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14585 len += length(value) + length(field[++i])
14586 substed = 1
14587 } else
14588 len += 1 + keylen
14589 }
14590
14591 print line
14592}
14593
14594_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000014595_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014596cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14597if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14598 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14599else
14600 cat
14601fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14602 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014603_ACEOF
14604
Martin v. Löwiseba40652007-08-30 20:10:57 +000014605# VPATH may cause trouble with some makes, so we remove $(srcdir),
14606# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14607# trailing colons and then remove the whole line if VPATH becomes empty
14608# (actually we leave an empty line to preserve line numbers).
14609if test "x$srcdir" = x.; then
14610 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14611s/:*\$(srcdir):*/:/
14612s/:*\${srcdir}:*/:/
14613s/:*@srcdir@:*/:/
14614s/^\([^=]*=[ ]*\):*/\1/
14615s/:*$//
14616s/^[^=]*=[ ]*$//
14617}'
14618fi
14619
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014620cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014621fi # test -n "$CONFIG_FILES"
14622
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014623# Set up the scripts for CONFIG_HEADERS section.
14624# No need to generate them if there are no CONFIG_HEADERS.
14625# This happens for instance with `./config.status Makefile'.
14626if test -n "$CONFIG_HEADERS"; then
14627cat >"$tmp/defines.awk" <<\_ACAWK ||
14628BEGIN {
14629_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014630
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014631# Transform confdefs.h into an awk script `defines.awk', embedded as
14632# here-document in config.status, that substitutes the proper values into
14633# config.h.in to produce config.h.
14634
14635# Create a delimiter string that does not exist in confdefs.h, to ease
14636# handling of long lines.
14637ac_delim='%!_!# '
14638for ac_last_try in false false :; do
14639 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14640 if test -z "$ac_t"; then
14641 break
14642 elif $ac_last_try; then
14643 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14644 else
14645 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14646 fi
14647done
14648
14649# For the awk script, D is an array of macro values keyed by name,
14650# likewise P contains macro parameters if any. Preserve backslash
14651# newline sequences.
14652
14653ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14654sed -n '
14655s/.\{148\}/&'"$ac_delim"'/g
14656t rset
14657:rset
14658s/^[ ]*#[ ]*define[ ][ ]*/ /
14659t def
14660d
14661:def
14662s/\\$//
14663t bsnl
14664s/["\\]/\\&/g
14665s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14666D["\1"]=" \3"/p
14667s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14668d
14669:bsnl
14670s/["\\]/\\&/g
14671s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14672D["\1"]=" \3\\\\\\n"\\/p
14673t cont
14674s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14675t cont
14676d
14677:cont
14678n
14679s/.\{148\}/&'"$ac_delim"'/g
14680t clear
14681:clear
14682s/\\$//
14683t bsnlc
14684s/["\\]/\\&/g; s/^/"/; s/$/"/p
14685d
14686:bsnlc
14687s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14688b cont
14689' <confdefs.h | sed '
14690s/'"$ac_delim"'/"\\\
14691"/g' >>$CONFIG_STATUS || ac_write_fail=1
14692
14693cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14694 for (key in D) D_is_set[key] = 1
14695 FS = ""
14696}
14697/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14698 line = \$ 0
14699 split(line, arg, " ")
14700 if (arg[1] == "#") {
14701 defundef = arg[2]
14702 mac1 = arg[3]
14703 } else {
14704 defundef = substr(arg[1], 2)
14705 mac1 = arg[2]
14706 }
14707 split(mac1, mac2, "(") #)
14708 macro = mac2[1]
14709 prefix = substr(line, 1, index(line, defundef) - 1)
14710 if (D_is_set[macro]) {
14711 # Preserve the white space surrounding the "#".
14712 print prefix "define", macro P[macro] D[macro]
14713 next
14714 } else {
14715 # Replace #undef with comments. This is necessary, for example,
14716 # in the case of _POSIX_SOURCE, which is predefined and required
14717 # on some systems where configure will not decide to define it.
14718 if (defundef == "undef") {
14719 print "/*", prefix defundef, macro, "*/"
14720 next
14721 }
14722 }
14723}
14724{ print }
14725_ACAWK
14726_ACEOF
14727cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14728 as_fn_error "could not setup config headers machinery" "$LINENO" 5
14729fi # test -n "$CONFIG_HEADERS"
14730
14731
14732eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14733shift
14734for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000014735do
14736 case $ac_tag in
14737 :[FHLC]) ac_mode=$ac_tag; continue;;
14738 esac
14739 case $ac_mode$ac_tag in
14740 :[FHL]*:*);;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014741 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014742 :[FH]-) ac_tag=-:-;;
14743 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14744 esac
14745 ac_save_IFS=$IFS
14746 IFS=:
14747 set x $ac_tag
14748 IFS=$ac_save_IFS
14749 shift
14750 ac_file=$1
14751 shift
14752
14753 case $ac_mode in
14754 :L) ac_source=$1;;
14755 :[FH])
14756 ac_file_inputs=
14757 for ac_f
14758 do
14759 case $ac_f in
14760 -) ac_f="$tmp/stdin";;
14761 *) # Look for the file first in the build tree, then in the source tree
14762 # (if the path is not absolute). The absolute path cannot be DOS-style,
14763 # because $ac_f cannot contain `:'.
14764 test -f "$ac_f" ||
14765 case $ac_f in
14766 [\\/$]*) false;;
14767 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14768 esac ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014769 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014770 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014771 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14772 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014773 done
14774
14775 # Let's still pretend it is `configure' which instantiates (i.e., don't
14776 # use $as_me), people would be surprised to read:
14777 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014778 configure_input='Generated from '`
14779 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14780 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014781 if test x"$ac_file" != x-; then
14782 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014783 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14784$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014785 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014786 # Neutralize special characters interpreted by sed in replacement strings.
14787 case $configure_input in #(
14788 *\&* | *\|* | *\\* )
14789 ac_sed_conf_input=`$as_echo "$configure_input" |
14790 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14791 *) ac_sed_conf_input=$configure_input;;
14792 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014793
14794 case $ac_tag in
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014795 *:-:* | *:-) cat >"$tmp/stdin" \
14796 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014797 esac
14798 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014799 esac
14800
Martin v. Löwiseba40652007-08-30 20:10:57 +000014801 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014802$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014803 X"$ac_file" : 'X\(//\)[^/]' \| \
14804 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000014805 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014806$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014807 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14808 s//\1/
14809 q
14810 }
14811 /^X\(\/\/\)[^/].*/{
14812 s//\1/
14813 q
14814 }
14815 /^X\(\/\/\)$/{
14816 s//\1/
14817 q
14818 }
14819 /^X\(\/\).*/{
14820 s//\1/
14821 q
14822 }
14823 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014824 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014825 ac_builddir=.
14826
Martin v. Löwiseba40652007-08-30 20:10:57 +000014827case "$ac_dir" in
14828.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14829*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014830 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014831 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014832 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014833 case $ac_top_builddir_sub in
14834 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14835 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14836 esac ;;
14837esac
14838ac_abs_top_builddir=$ac_pwd
14839ac_abs_builddir=$ac_pwd$ac_dir_suffix
14840# for backward compatibility:
14841ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014842
14843case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014844 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014845 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014846 ac_top_srcdir=$ac_top_builddir_sub
14847 ac_abs_top_srcdir=$ac_pwd ;;
14848 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014849 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014850 ac_top_srcdir=$srcdir
14851 ac_abs_top_srcdir=$srcdir ;;
14852 *) # Relative name.
14853 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14854 ac_top_srcdir=$ac_top_build_prefix$srcdir
14855 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014856esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014857ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014858
Martin v. Löwis11437992002-04-12 09:54:03 +000014859
Martin v. Löwiseba40652007-08-30 20:10:57 +000014860 case $ac_mode in
14861 :F)
14862 #
14863 # CONFIG_FILE
14864 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014865
14866 case $INSTALL in
14867 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014868 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014869 esac
Brett Cannon19fab762007-06-02 03:02:29 +000014870_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014871
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014872cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014873# If the template does not know about datarootdir, expand it.
14874# FIXME: This hack should be removed a few years after 2.60.
14875ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014876ac_sed_dataroot='
14877/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000014878 p
14879 q
14880}
14881/@datadir@/p
14882/@docdir@/p
14883/@infodir@/p
14884/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014885/@mandir@/p'
14886case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014887*datarootdir*) ac_datarootdir_seen=yes;;
14888*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014889 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14890$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014891_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014892cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014893 ac_datarootdir_hack='
14894 s&@datadir@&$datadir&g
14895 s&@docdir@&$docdir&g
14896 s&@infodir@&$infodir&g
14897 s&@localedir@&$localedir&g
14898 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014899 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014900esac
14901_ACEOF
14902
14903# Neutralize VPATH when `$srcdir' = `.'.
14904# Shell code in configure.ac might set extrasub.
14905# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014906cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14907ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014908$extrasub
14909_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014910cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014911:t
14912/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014913s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000014914s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014915s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000014916s&@srcdir@&$ac_srcdir&;t t
14917s&@abs_srcdir@&$ac_abs_srcdir&;t t
14918s&@top_srcdir@&$ac_top_srcdir&;t t
14919s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14920s&@builddir@&$ac_builddir&;t t
14921s&@abs_builddir@&$ac_abs_builddir&;t t
14922s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14923s&@INSTALL@&$ac_INSTALL&;t t
14924$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014925"
14926eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
14927 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014928
Martin v. Löwiseba40652007-08-30 20:10:57 +000014929test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14930 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14931 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014933which seems to be undefined. Please make sure it is defined." >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014934$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014935which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014936
Martin v. Löwiseba40652007-08-30 20:10:57 +000014937 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014938 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014939 -) cat "$tmp/out" && rm -f "$tmp/out";;
14940 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14941 esac \
14942 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014943 ;;
14944 :H)
14945 #
14946 # CONFIG_HEADER
14947 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014948 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014949 {
14950 $as_echo "/* $configure_input */" \
14951 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14952 } >"$tmp/config.h" \
14953 || as_fn_error "could not create $ac_file" "$LINENO" 5
14954 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14955 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14956$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014957 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014958 rm -f "$ac_file"
14959 mv "$tmp/config.h" "$ac_file" \
14960 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014961 fi
14962 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014963 $as_echo "/* $configure_input */" \
14964 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
14965 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014966 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014967 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014968
Martin v. Löwiseba40652007-08-30 20:10:57 +000014969
14970 esac
14971
14972done # for ac_tag
14973
Guido van Rossum627b2d71993-12-24 10:39:16 +000014974
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014975as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014976_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014977ac_clean_files=$ac_clean_files_save
14978
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014979test $ac_write_fail = 0 ||
14980 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14981
Martin v. Löwis11437992002-04-12 09:54:03 +000014982
14983# configure is writing to config.log, and then calls config.status.
14984# config.status does its own redirection, appending to config.log.
14985# Unfortunately, on DOS this fails, as config.log is still kept open
14986# by configure, so config.status won't be able to write to it; its
14987# output is simply discarded. So we exec the FD to /dev/null,
14988# effectively closing config.log, so it can be properly (re)opened and
14989# appended to by config.status. When coming back to configure, we
14990# need to make the FD available again.
14991if test "$no_create" != yes; then
14992 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014993 ac_config_status_args=
14994 test "$silent" = yes &&
14995 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000014996 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000014997 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000014998 exec 5>>config.log
14999 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15000 # would make configure fail if this is the last instruction.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015001 $ac_cs_success || as_fn_exit $?
15002fi
15003if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15004 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15005$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015006fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015007
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015008
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015009echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015010if test ! -f Modules/Setup
15011then
15012 cp $srcdir/Modules/Setup.dist Modules/Setup
15013fi
15014
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015015echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015016if test ! -f Modules/Setup.local
15017then
15018 echo "# Edit this file for local setup changes" >Modules/Setup.local
15019fi
15020
15021echo "creating Makefile"
15022$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15023 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015024 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015025
15026case $ac_sys_system in
15027BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015028 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015029
15030 Support for BeOS is deprecated as of Python 2.6.
15031 See PEP 11 for the gory details.
15032 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015033$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015034
15035 Support for BeOS is deprecated as of Python 2.6.
15036 See PEP 11 for the gory details.
15037 " >&2;}
15038 ;;
15039*) ;;
15040esac
15041
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015042mv config.c Modules