blob: 04405454096f6a32a1a71e450ad1e1626258af22 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Peterson7497e912010-10-16 00:53:39 +00002# From configure.in Revision: 85556 .
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]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001391 Enable Unicode strings (default is ucs2)
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
Benjamin Peterson7497e912010-10-16 00:53:39 +00001937 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001938int
1939main ()
1940{
Benjamin Peterson7497e912010-10-16 00:53:39 +00001941static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001942test_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
Benjamin Peterson7497e912010-10-16 00:53:39 +00001952 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001953int
1954main ()
1955{
Benjamin Peterson7497e912010-10-16 00:53:39 +00001956static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001957 < ($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öwisb41afb52010-05-28 15:28:47 +00003034 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3035 # request to enable features supported by the standard as a request
3036 # to disable features not supported by the standard. The best way
3037 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3038 # entirely and define __EXTENSIONS__ instead.
3039 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003040 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003041 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3042 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003043 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003044 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003045 define_xopen_source=no;;
3046 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003047 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003048 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003049 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003050 # On FreeBSD 4, the math functions C89 does not cover are never defined
3051 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3052 FreeBSD/4.*)
3053 define_xopen_source=no;;
3054 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3055 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3056 # identifies itself as Darwin/7.*
3057 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3058 # disables platform specific features beyond repair.
3059 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3060 # has no effect, don't bother defining them
3061 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003062 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003063 Darwin/1[0-9].*)
3064 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003065 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3066 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3067 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003068 AIX/4)
3069 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003070 AIX/5)
3071 if test `uname -r` -eq 1; then
3072 define_xopen_source=no
3073 fi
3074 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003075 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3076 # defining NI_NUMERICHOST.
3077 QNX/6.3.2)
3078 define_xopen_source=no
3079 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003080
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003081esac
3082
3083if test $define_xopen_source = yes
3084then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003085
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003086$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003087
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003088
3089 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3090 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3091 # several APIs are not declared. Since this is also needed in some
3092 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003093
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003094$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003095
3096
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003097
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003098$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003099
3100
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003101fi
3102
Guido van Rossum91922671997-10-09 20:24:13 +00003103#
3104# SGI compilers allow the specification of the both the ABI and the
3105# ISA on the command line. Depending on the values of these switches,
3106# different and often incompatable code will be generated.
3107#
3108# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3109# thus supply support for various ABI/ISA combinations. The MACHDEP
3110# variable is also adjusted.
3111#
3112
3113if test ! -z "$SGI_ABI"
3114then
3115 CC="cc $SGI_ABI"
3116 LDFLAGS="$SGI_ABI $LDFLAGS"
3117 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3118fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3120$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003121
Jack Jansen83f898c2002-12-30 22:23:40 +00003122# And add extra plat-mac for darwin
3123
Jack Jansen7b59b422003-03-17 15:44:10 +00003124
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3126$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003127if test -z "$EXTRAPLATDIR"
3128then
3129 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003130 darwin)
3131 EXTRAPLATDIR="\$(PLATMACDIRS)"
3132 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3133 ;;
3134 *)
3135 EXTRAPLATDIR=""
3136 EXTRAMACHDEPPATH=""
3137 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003138 esac
3139fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3141$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003142
Jack Jansen6b08a402004-06-03 12:41:45 +00003143# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3144# it may influence the way we can build extensions, so distutils
3145# needs to check it
3146
Ronald Oussoren988117f2006-04-29 11:31:35 +00003147
Jack Jansen6b08a402004-06-03 12:41:45 +00003148CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003149EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003150
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3152$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003153ac_sys_machine=`uname -m`
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3155$as_echo "$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003156
Guido van Rossum627b2d71993-12-24 10:39:16 +00003157# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003158
3159# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3160# for debug/optimization stuff. BASECFLAGS is for flags that are required
3161# just to get things to compile and link. Users are free to override OPT
3162# when running configure or make. The build should not break if they do.
3163# BASECFLAGS should generally not be messed with, however.
3164
3165# XXX shouldn't some/most/all of this code be merged with the stuff later
3166# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3168$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003169
Martin v. Löwiseba40652007-08-30 20:10:57 +00003170# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003171if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003172 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003173 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003174 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003175 without_gcc=yes;;
3176 yes) CC=gcc
3177 without_gcc=no;;
3178 *) CC=$withval
3179 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003180 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003181else
Martin v. Löwis11437992002-04-12 09:54:03 +00003182
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003183 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003184 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003185 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003186 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003187 case $BE_HOST_CPU in
3188 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003189 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003190 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003191 BASECFLAGS="$BASECFLAGS -export pragma"
3192 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003193 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003194 ;;
3195 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003196 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003197 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003198 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003199 ;;
3200 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003201 as_fn_error "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003202 ;;
3203 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003204 AR="\$(srcdir)/Modules/ar_beos"
3205 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003206 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003207 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003208 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003209fi
3210
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3212$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003213
Guido van Rossum8b131c51995-03-09 14:10:13 +00003214# If the user switches compilers, we can't believe the cache
3215if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3216then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003217 as_fn_error "cached CC is different -- throw away $cache_file
3218(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003219fi
3220
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003221# If the user set CFLAGS, use this instead of the automatically
3222# determined setting
3223preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003224ac_ext=c
3225ac_cpp='$CPP $CPPFLAGS'
3226ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3227ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3228ac_compiler_gnu=$ac_cv_c_compiler_gnu
3229if test -n "$ac_tool_prefix"; then
3230 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3231set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3233$as_echo_n "checking for $ac_word... " >&6; }
3234if test "${ac_cv_prog_CC+set}" = set; then :
3235 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003236else
3237 if test -n "$CC"; then
3238 ac_cv_prog_CC="$CC" # Let the user override the test.
3239else
Martin v. Löwis11437992002-04-12 09:54:03 +00003240as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3241for as_dir in $PATH
3242do
3243 IFS=$as_save_IFS
3244 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003245 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003246 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 +00003247 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003248 $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 +00003249 break 2
3250 fi
3251done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003252 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003253IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003254
Jack Jansendd19cf82001-12-06 22:36:17 +00003255fi
3256fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003257CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003258if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3260$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003261else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3263$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003264fi
3265
Martin v. Löwiseba40652007-08-30 20:10:57 +00003266
Martin v. Löwis11437992002-04-12 09:54:03 +00003267fi
3268if test -z "$ac_cv_prog_CC"; then
3269 ac_ct_CC=$CC
3270 # Extract the first word of "gcc", so it can be a program name with args.
3271set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3273$as_echo_n "checking for $ac_word... " >&6; }
3274if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3275 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003276else
3277 if test -n "$ac_ct_CC"; then
3278 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3279else
3280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3281for as_dir in $PATH
3282do
3283 IFS=$as_save_IFS
3284 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003285 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003286 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 +00003287 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003288 $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 +00003289 break 2
3290 fi
3291done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003292 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003293IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003294
3295fi
3296fi
3297ac_ct_CC=$ac_cv_prog_ac_ct_CC
3298if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3300$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003301else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3303$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003304fi
3305
Martin v. Löwiseba40652007-08-30 20:10:57 +00003306 if test "x$ac_ct_CC" = x; then
3307 CC=""
3308 else
3309 case $cross_compiling:$ac_tool_warned in
3310yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003311{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3312$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003313ac_tool_warned=yes ;;
3314esac
3315 CC=$ac_ct_CC
3316 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003317else
3318 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003319fi
3320
Jack Jansendd19cf82001-12-06 22:36:17 +00003321if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003322 if test -n "$ac_tool_prefix"; then
3323 # 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 +00003324set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3326$as_echo_n "checking for $ac_word... " >&6; }
3327if test "${ac_cv_prog_CC+set}" = set; then :
3328 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003329else
3330 if test -n "$CC"; then
3331 ac_cv_prog_CC="$CC" # Let the user override the test.
3332else
Martin v. Löwis11437992002-04-12 09:54:03 +00003333as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3334for as_dir in $PATH
3335do
3336 IFS=$as_save_IFS
3337 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003338 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003339 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 +00003340 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003341 $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 +00003342 break 2
3343 fi
3344done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003345 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003346IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003347
3348fi
3349fi
3350CC=$ac_cv_prog_CC
3351if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3353$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003354else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3356$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003357fi
3358
Martin v. Löwiseba40652007-08-30 20:10:57 +00003359
Martin v. Löwis11437992002-04-12 09:54:03 +00003360 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003361fi
3362if test -z "$CC"; then
3363 # Extract the first word of "cc", so it can be a program name with args.
3364set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3366$as_echo_n "checking for $ac_word... " >&6; }
3367if test "${ac_cv_prog_CC+set}" = set; then :
3368 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003369else
3370 if test -n "$CC"; then
3371 ac_cv_prog_CC="$CC" # Let the user override the test.
3372else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003373 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3375for as_dir in $PATH
3376do
3377 IFS=$as_save_IFS
3378 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003379 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003380 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 +00003381 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3382 ac_prog_rejected=yes
3383 continue
3384 fi
3385 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003386 $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 +00003387 break 2
3388 fi
3389done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003390 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003391IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003392
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003393if test $ac_prog_rejected = yes; then
3394 # We found a bogon in the path, so make sure we never use it.
3395 set dummy $ac_cv_prog_CC
3396 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003397 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003398 # We chose a different compiler from the bogus one.
3399 # However, it has the same basename, so the bogon will be chosen
3400 # first if we set CC to just the basename; use the full file name.
3401 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003402 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003403 fi
3404fi
3405fi
3406fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003407CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003408if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3410$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003411else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3413$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003414fi
3415
Martin v. Löwiseba40652007-08-30 20:10:57 +00003416
Martin v. Löwis11437992002-04-12 09:54:03 +00003417fi
3418if test -z "$CC"; then
3419 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003420 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003421 do
3422 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3423set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3425$as_echo_n "checking for $ac_word... " >&6; }
3426if test "${ac_cv_prog_CC+set}" = set; then :
3427 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003428else
3429 if test -n "$CC"; then
3430 ac_cv_prog_CC="$CC" # Let the user override the test.
3431else
Martin v. Löwis11437992002-04-12 09:54:03 +00003432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3433for as_dir in $PATH
3434do
3435 IFS=$as_save_IFS
3436 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003437 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003438 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 +00003439 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003440 $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 +00003441 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003442 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003443done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003444 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003445IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003446
3447fi
3448fi
3449CC=$ac_cv_prog_CC
3450if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3452$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003453else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3455$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003456fi
3457
Martin v. Löwiseba40652007-08-30 20:10:57 +00003458
Martin v. Löwis11437992002-04-12 09:54:03 +00003459 test -n "$CC" && break
3460 done
3461fi
3462if test -z "$CC"; then
3463 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003464 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003465do
3466 # Extract the first word of "$ac_prog", so it can be a program name with args.
3467set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3469$as_echo_n "checking for $ac_word... " >&6; }
3470if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3471 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003472else
3473 if test -n "$ac_ct_CC"; then
3474 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3475else
3476as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3477for as_dir in $PATH
3478do
3479 IFS=$as_save_IFS
3480 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003481 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003482 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 +00003483 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003484 $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 +00003485 break 2
3486 fi
3487done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003488 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003489IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003490
Martin v. Löwis11437992002-04-12 09:54:03 +00003491fi
3492fi
3493ac_ct_CC=$ac_cv_prog_ac_ct_CC
3494if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3496$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003497else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3499$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003500fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003501
Martin v. Löwiseba40652007-08-30 20:10:57 +00003502
Martin v. Löwis11437992002-04-12 09:54:03 +00003503 test -n "$ac_ct_CC" && break
3504done
Michael W. Hudson54241132001-12-07 15:38:26 +00003505
Martin v. Löwiseba40652007-08-30 20:10:57 +00003506 if test "x$ac_ct_CC" = x; then
3507 CC=""
3508 else
3509 case $cross_compiling:$ac_tool_warned in
3510yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003511{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3512$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003513ac_tool_warned=yes ;;
3514esac
3515 CC=$ac_ct_CC
3516 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003517fi
3518
3519fi
3520
3521
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003522test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3523$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3524as_fn_error "no acceptable C compiler found in \$PATH
3525See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003526
3527# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003528$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3529set X $ac_compile
3530ac_compiler=$2
3531for ac_option in --version -v -V -qversion; do
3532 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003533case "(($ac_try" in
3534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3535 *) ac_try_echo=$ac_try;;
3536esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003537eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3538$as_echo "$ac_try_echo"; } >&5
3539 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003540 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003541 if test -s conftest.err; then
3542 sed '10a\
3543... rest of stderr output deleted ...
3544 10q' conftest.err >conftest.er1
3545 cat conftest.er1 >&5
3546 fi
3547 rm -f conftest.er1 conftest.err
3548 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3549 test $ac_status = 0; }
3550done
Martin v. Löwis11437992002-04-12 09:54:03 +00003551
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003553/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003554
Martin v. Löwis11437992002-04-12 09:54:03 +00003555int
3556main ()
3557{
3558
3559 ;
3560 return 0;
3561}
3562_ACEOF
3563ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003564ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003565# Try to create an executable without -o first, disregard a.out.
3566# It will help us diagnose broken compilers, and finding out an intuition
3567# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3569$as_echo_n "checking whether the C compiler works... " >&6; }
3570ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3571
3572# The possible output files:
3573ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3574
Martin v. Löwiseba40652007-08-30 20:10:57 +00003575ac_rmfiles=
3576for ac_file in $ac_files
3577do
3578 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003579 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003580 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3581 esac
3582done
3583rm -f $ac_rmfiles
3584
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003585if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003586case "(($ac_try" in
3587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3588 *) ac_try_echo=$ac_try;;
3589esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003590eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3591$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003592 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003594 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3595 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003596 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3597# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3598# in a Makefile. We should not override ac_cv_exeext if it was cached,
3599# so that the user can short-circuit this test for compilers unknown to
3600# Autoconf.
3601for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003602do
3603 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003604 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003605 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003606 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003607 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003608 # We found the default executable, but exeext='' is most
3609 # certainly right.
3610 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003611 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003612 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003613 then :; else
3614 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3615 fi
3616 # We set ac_cv_exeext here because the later test for it is not
3617 # safe: cross compilers may not add the suffix if given an `-o'
3618 # argument, so we may need to know it at that point already.
3619 # Even if this section looks crufty: it has the advantage of
3620 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003621 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003622 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003623 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 esac
3625done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003626test "$ac_cv_exeext" = no && ac_cv_exeext=
3627
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003628else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003629 ac_file=''
3630fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003631if test -z "$ac_file"; then :
3632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3633$as_echo "no" >&6; }
3634$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003635sed 's/^/| /' conftest.$ac_ext >&5
3636
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003637{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3639{ as_fn_set_status 77
3640as_fn_error "C compiler cannot create executables
3641See \`config.log' for more details." "$LINENO" 5; }; }
3642else
3643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3644$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003645fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3647$as_echo_n "checking for C compiler default output file name... " >&6; }
3648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3649$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003650ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003651
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003652rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003653ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3655$as_echo_n "checking for suffix of executables... " >&6; }
3656if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003657case "(($ac_try" in
3658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3659 *) ac_try_echo=$ac_try;;
3660esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3662$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003663 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003664 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003665 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3666 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003667 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3668# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3669# work properly (i.e., refer to `conftest.exe'), while it won't with
3670# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003671for ac_file in conftest.exe conftest conftest.*; do
3672 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003674 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003675 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003676 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003677 * ) break;;
3678 esac
3679done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003680else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003681 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3682$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3683as_fn_error "cannot compute suffix of executables: cannot compile and link
3684See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003685fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003686rm -f conftest conftest$ac_cv_exeext
3687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3688$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003689
3690rm -f conftest.$ac_ext
3691EXEEXT=$ac_cv_exeext
3692ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3694/* end confdefs.h. */
3695#include <stdio.h>
3696int
3697main ()
3698{
3699FILE *f = fopen ("conftest.out", "w");
3700 return ferror (f) || fclose (f) != 0;
3701
3702 ;
3703 return 0;
3704}
Skip Montanaro6dead952003-09-25 14:50:04 +00003705_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003706ac_clean_files="$ac_clean_files conftest.out"
3707# Check that the compiler produces executables we can run. If not, either
3708# the compiler is broken, or we cross compile.
3709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3710$as_echo_n "checking whether we are cross compiling... " >&6; }
3711if test "$cross_compiling" != yes; then
3712 { { ac_try="$ac_link"
3713case "(($ac_try" in
3714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3715 *) ac_try_echo=$ac_try;;
3716esac
3717eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3718$as_echo "$ac_try_echo"; } >&5
3719 (eval "$ac_link") 2>&5
3720 ac_status=$?
3721 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3722 test $ac_status = 0; }
3723 if { ac_try='./conftest$ac_cv_exeext'
3724 { { case "(($ac_try" in
3725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3726 *) ac_try_echo=$ac_try;;
3727esac
3728eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3729$as_echo "$ac_try_echo"; } >&5
3730 (eval "$ac_try") 2>&5
3731 ac_status=$?
3732 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3733 test $ac_status = 0; }; }; then
3734 cross_compiling=no
3735 else
3736 if test "$cross_compiling" = maybe; then
3737 cross_compiling=yes
3738 else
3739 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3740$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3741as_fn_error "cannot run C compiled programs.
3742If you meant to cross compile, use \`--host'.
3743See \`config.log' for more details." "$LINENO" 5; }
3744 fi
3745 fi
3746fi
3747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3748$as_echo "$cross_compiling" >&6; }
3749
3750rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3751ac_clean_files=$ac_clean_files_save
3752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3753$as_echo_n "checking for suffix of object files... " >&6; }
3754if test "${ac_cv_objext+set}" = set; then :
3755 $as_echo_n "(cached) " >&6
3756else
3757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003759
Martin v. Löwis11437992002-04-12 09:54:03 +00003760int
3761main ()
3762{
3763
3764 ;
3765 return 0;
3766}
3767_ACEOF
3768rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003769if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003770case "(($ac_try" in
3771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3772 *) ac_try_echo=$ac_try;;
3773esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3775$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003776 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003777 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003778 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3779 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003780 for ac_file in conftest.o conftest.obj conftest.*; do
3781 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003782 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003783 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003784 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3785 break;;
3786 esac
3787done
3788else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003789 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003790sed 's/^/| /' conftest.$ac_ext >&5
3791
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003792{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3793$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3794as_fn_error "cannot compute suffix of object files: cannot compile
3795See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003796fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003797rm -f conftest.$ac_cv_objext conftest.$ac_ext
3798fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3800$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003801OBJEXT=$ac_cv_objext
3802ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3804$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3805if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3806 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003807else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003810
Martin v. Löwis11437992002-04-12 09:54:03 +00003811int
3812main ()
3813{
3814#ifndef __GNUC__
3815 choke me
3816#endif
3817
3818 ;
3819 return 0;
3820}
3821_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003822if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003823 ac_compiler_gnu=yes
3824else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003825 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003828ac_cv_c_compiler_gnu=$ac_compiler_gnu
3829
3830fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3832$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3833if test $ac_compiler_gnu = yes; then
3834 GCC=yes
3835else
3836 GCC=
3837fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003838ac_test_CFLAGS=${CFLAGS+set}
3839ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3841$as_echo_n "checking whether $CC accepts -g... " >&6; }
3842if test "${ac_cv_prog_cc_g+set}" = set; then :
3843 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003844else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003845 ac_save_c_werror_flag=$ac_c_werror_flag
3846 ac_c_werror_flag=yes
3847 ac_cv_prog_cc_g=no
3848 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003851
Martin v. Löwis11437992002-04-12 09:54:03 +00003852int
3853main ()
3854{
3855
3856 ;
3857 return 0;
3858}
3859_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003860if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003861 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003862else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003863 CFLAGS=""
3864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003865/* end confdefs.h. */
3866
3867int
3868main ()
3869{
3870
3871 ;
3872 return 0;
3873}
3874_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003875if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003876
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003877else
3878 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00003879 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003881/* end confdefs.h. */
3882
3883int
3884main ()
3885{
3886
3887 ;
3888 return 0;
3889}
3890_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003891if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003892 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003895fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3899 ac_c_werror_flag=$ac_save_c_werror_flag
3900fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3902$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003903if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003904 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003905elif test $ac_cv_prog_cc_g = yes; then
3906 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003907 CFLAGS="-g -O2"
3908 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003909 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003910 fi
3911else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003912 if test "$GCC" = yes; then
3913 CFLAGS="-O2"
3914 else
3915 CFLAGS=
3916 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003917fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3919$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3920if test "${ac_cv_prog_cc_c89+set}" = set; then :
3921 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003922else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003923 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003924ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003926/* end confdefs.h. */
3927#include <stdarg.h>
3928#include <stdio.h>
3929#include <sys/types.h>
3930#include <sys/stat.h>
3931/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3932struct buf { int x; };
3933FILE * (*rcsopen) (struct buf *, struct stat *, int);
3934static char *e (p, i)
3935 char **p;
3936 int i;
3937{
3938 return p[i];
3939}
3940static char *f (char * (*g) (char **, int), char **p, ...)
3941{
3942 char *s;
3943 va_list v;
3944 va_start (v,p);
3945 s = g (p, va_arg (v,int));
3946 va_end (v);
3947 return s;
3948}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003949
3950/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3951 function prototypes and stuff, but not '\xHH' hex character constants.
3952 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003953 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003954 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3955 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003956 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003957int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3958
Martin v. Löwiseba40652007-08-30 20:10:57 +00003959/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3960 inside strings and character constants. */
3961#define FOO(x) 'x'
3962int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3963
Skip Montanaro6dead952003-09-25 14:50:04 +00003964int test (int i, double x);
3965struct s1 {int (*f) (int a);};
3966struct s2 {int (*f) (double a);};
3967int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3968int argc;
3969char **argv;
3970int
3971main ()
3972{
3973return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3974 ;
3975 return 0;
3976}
3977_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003978for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3979 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003980do
3981 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003982 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003983 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003985rm -f core conftest.err conftest.$ac_objext
3986 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003987done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003988rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003989CC=$ac_save_CC
3990
3991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003992# AC_CACHE_VAL
3993case "x$ac_cv_prog_cc_c89" in
3994 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3996$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003997 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3999$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004000 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004001 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4003$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004004esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004005if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004006
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004007fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004008
Martin v. Löwis11437992002-04-12 09:54:03 +00004009ac_ext=c
4010ac_cpp='$CPP $CPPFLAGS'
4011ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4012ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4013ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004014
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004015if test ! -z "$preset_cflags"
4016then
4017 CFLAGS=$preset_cflags
4018fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004019
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004020
4021
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4023$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004024
Martin v. Löwiseba40652007-08-30 20:10:57 +00004025# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004026if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004027 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004028
4029 case $withval in
4030 no) with_cxx_main=no
4031 MAINCC='$(CC)';;
4032 yes) with_cxx_main=yes
4033 MAINCC='$(CXX)';;
4034 *) with_cxx_main=yes
4035 MAINCC=$withval
4036 if test -z "$CXX"
4037 then
4038 CXX=$withval
4039 fi;;
4040 esac
4041else
4042
4043 with_cxx_main=no
4044 MAINCC='$(CC)'
4045
Martin v. Löwiseba40652007-08-30 20:10:57 +00004046fi
4047
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4049$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004050
4051preset_cxx="$CXX"
4052if test -z "$CXX"
4053then
4054 case "$CC" in
4055 gcc) # Extract the first word of "g++", so it can be a program name with args.
4056set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4058$as_echo_n "checking for $ac_word... " >&6; }
4059if test "${ac_cv_path_CXX+set}" = set; then :
4060 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004061else
4062 case $CXX in
4063 [\\/]* | ?:[\\/]*)
4064 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4065 ;;
4066 *)
4067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4068for as_dir in notfound
4069do
4070 IFS=$as_save_IFS
4071 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004072 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004073 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 +00004074 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004075 $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 +00004076 break 2
4077 fi
4078done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004079 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004080IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004081
4082 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4083 ;;
4084esac
4085fi
4086CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004087if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4089$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004090else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4092$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004094
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004095 ;;
4096 cc) # Extract the first word of "c++", so it can be a program name with args.
4097set dummy c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4099$as_echo_n "checking for $ac_word... " >&6; }
4100if test "${ac_cv_path_CXX+set}" = set; then :
4101 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004102else
4103 case $CXX in
4104 [\\/]* | ?:[\\/]*)
4105 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4106 ;;
4107 *)
4108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4109for as_dir in notfound
4110do
4111 IFS=$as_save_IFS
4112 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004113 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004114 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 +00004115 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004116 $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 +00004117 break 2
4118 fi
4119done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004120 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004121IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004122
4123 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4124 ;;
4125esac
4126fi
4127CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004128if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4130$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004131else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4133$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004135
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004136 ;;
4137 esac
4138 if test "$CXX" = "notfound"
4139 then
4140 CXX=""
4141 fi
4142fi
4143if test -z "$CXX"
4144then
4145 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4146do
4147 # Extract the first word of "$ac_prog", so it can be a program name with args.
4148set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4150$as_echo_n "checking for $ac_word... " >&6; }
4151if test "${ac_cv_prog_CXX+set}" = set; then :
4152 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004153else
4154 if test -n "$CXX"; then
4155 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4156else
4157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4158for as_dir in $PATH
4159do
4160 IFS=$as_save_IFS
4161 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004162 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004163 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 +00004164 ac_cv_prog_CXX="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004165 $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 +00004166 break 2
4167 fi
4168done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004169 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004170IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004171
4172fi
4173fi
4174CXX=$ac_cv_prog_CXX
4175if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4177$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004178else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4180$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004181fi
4182
Martin v. Löwiseba40652007-08-30 20:10:57 +00004183
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004184 test -n "$CXX" && break
4185done
4186test -n "$CXX" || CXX="notfound"
4187
4188 if test "$CXX" = "notfound"
4189 then
4190 CXX=""
4191 fi
4192fi
4193if test "$preset_cxx" != "$CXX"
4194then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004195 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004196
4197 By default, distutils will build C++ extension modules with \"$CXX\".
4198 If this is not intended, then set CXX on the configure command line.
4199 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004200$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004201
4202 By default, distutils will build C++ extension modules with \"$CXX\".
4203 If this is not intended, then set CXX on the configure command line.
4204 " >&2;}
4205fi
4206
4207
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004208# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004209
4210ac_ext=c
4211ac_cpp='$CPP $CPPFLAGS'
4212ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4213ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4214ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4216$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004217# On Suns, sometimes $CPP names a directory.
4218if test -n "$CPP" && test -d "$CPP"; then
4219 CPP=
4220fi
4221if test -z "$CPP"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004222 if test "${ac_cv_prog_CPP+set}" = set; then :
4223 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004224else
Martin v. Löwis11437992002-04-12 09:54:03 +00004225 # Double quotes because CPP needs to be expanded
4226 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4227 do
4228 ac_preproc_ok=false
4229for ac_c_preproc_warn_flag in '' yes
4230do
4231 # Use a header file that comes with gcc, so configuring glibc
4232 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004233 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4234 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004235 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004236 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004238/* end confdefs.h. */
4239#ifdef __STDC__
4240# include <limits.h>
4241#else
4242# include <assert.h>
4243#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004244 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004245_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004246if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004247
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004248else
Martin v. Löwis11437992002-04-12 09:54:03 +00004249 # Broken: fails on valid input.
4250continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004251fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004252rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004253
Martin v. Löwiseba40652007-08-30 20:10:57 +00004254 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004255 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004258#include <ac_nonexistent.h>
4259_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004260if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 # Broken: success on invalid input.
4262continue
4263else
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 # Passes both tests.
4265ac_preproc_ok=:
4266break
4267fi
4268rm -f conftest.err conftest.$ac_ext
4269
4270done
4271# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4272rm -f conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004273if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004274 break
4275fi
4276
4277 done
4278 ac_cv_prog_CPP=$CPP
4279
4280fi
4281 CPP=$ac_cv_prog_CPP
4282else
4283 ac_cv_prog_CPP=$CPP
4284fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4286$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004287ac_preproc_ok=false
4288for ac_c_preproc_warn_flag in '' yes
4289do
4290 # Use a header file that comes with gcc, so configuring glibc
4291 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004292 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4293 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004294 # On the NeXT, cc -E runs the code through the compiler's parser,
4295 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004297/* end confdefs.h. */
4298#ifdef __STDC__
4299# include <limits.h>
4300#else
4301# include <assert.h>
4302#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004303 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004304_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004305if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004306
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004307else
Martin v. Löwis11437992002-04-12 09:54:03 +00004308 # Broken: fails on valid input.
4309continue
4310fi
4311rm -f conftest.err conftest.$ac_ext
4312
Martin v. Löwiseba40652007-08-30 20:10:57 +00004313 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004314 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004316/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004317#include <ac_nonexistent.h>
4318_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004319if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004320 # Broken: success on invalid input.
4321continue
4322else
Martin v. Löwis11437992002-04-12 09:54:03 +00004323 # Passes both tests.
4324ac_preproc_ok=:
4325break
4326fi
4327rm -f conftest.err conftest.$ac_ext
4328
4329done
4330# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4331rm -f conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004332if $ac_preproc_ok; then :
4333
Martin v. Löwis11437992002-04-12 09:54:03 +00004334else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004335 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4336$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4337as_fn_error "C preprocessor \"$CPP\" fails sanity check
4338See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004339fi
4340
4341ac_ext=c
4342ac_cpp='$CPP $CPPFLAGS'
4343ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4344ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4345ac_compiler_gnu=$ac_cv_c_compiler_gnu
4346
4347
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4349$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4350if test "${ac_cv_path_GREP+set}" = set; then :
4351 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004352else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004353 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004354 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004355 # Loop through the user's path and test for each of PROGNAME-LIST
4356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004357for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4358do
4359 IFS=$as_save_IFS
4360 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004361 for ac_prog in grep ggrep; do
4362 for ac_exec_ext in '' $ac_executable_extensions; do
4363 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4364 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4365# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004366 # Check for GNU $ac_path_GREP
4367case `"$ac_path_GREP" --version 2>&1` in
4368*GNU*)
4369 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4370*)
4371 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004372 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004373 while :
4374 do
4375 cat "conftest.in" "conftest.in" >"conftest.tmp"
4376 mv "conftest.tmp" "conftest.in"
4377 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004378 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004379 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4380 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004381 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004382 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4383 # Best one so far, save it but keep looking for a better one
4384 ac_cv_path_GREP="$ac_path_GREP"
4385 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004386 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004387 # 10*(2^10) chars as input seems more than enough
4388 test $ac_count -gt 10 && break
4389 done
4390 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4391esac
4392
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004393 $ac_path_GREP_found && break 3
4394 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004395 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004396 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004397IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004398 if test -z "$ac_cv_path_GREP"; then
4399 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4400 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004401else
4402 ac_cv_path_GREP=$GREP
4403fi
4404
Martin v. Löwiseba40652007-08-30 20:10:57 +00004405fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4407$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004408 GREP="$ac_cv_path_GREP"
4409
4410
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4412$as_echo_n "checking for egrep... " >&6; }
4413if test "${ac_cv_path_EGREP+set}" = set; then :
4414 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004415else
4416 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4417 then ac_cv_path_EGREP="$GREP -E"
4418 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004419 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004420 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004421 # Loop through the user's path and test for each of PROGNAME-LIST
4422 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004423for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4424do
4425 IFS=$as_save_IFS
4426 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004427 for ac_prog in egrep; do
4428 for ac_exec_ext in '' $ac_executable_extensions; do
4429 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4430 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4431# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004432 # Check for GNU $ac_path_EGREP
4433case `"$ac_path_EGREP" --version 2>&1` in
4434*GNU*)
4435 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4436*)
4437 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004438 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004439 while :
4440 do
4441 cat "conftest.in" "conftest.in" >"conftest.tmp"
4442 mv "conftest.tmp" "conftest.in"
4443 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004444 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004445 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4446 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004447 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004448 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4449 # Best one so far, save it but keep looking for a better one
4450 ac_cv_path_EGREP="$ac_path_EGREP"
4451 ac_path_EGREP_max=$ac_count
4452 fi
4453 # 10*(2^10) chars as input seems more than enough
4454 test $ac_count -gt 10 && break
4455 done
4456 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4457esac
4458
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004459 $ac_path_EGREP_found && break 3
4460 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004461 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004462 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004463IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004464 if test -z "$ac_cv_path_EGREP"; then
4465 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4466 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004467else
4468 ac_cv_path_EGREP=$EGREP
4469fi
4470
Martin v. Löwiseba40652007-08-30 20:10:57 +00004471 fi
4472fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4474$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004475 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004476
4477
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4479$as_echo_n "checking for ANSI C header files... " >&6; }
4480if test "${ac_cv_header_stdc+set}" = set; then :
4481 $as_echo_n "(cached) " >&6
4482else
4483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004484/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004485#include <stdlib.h>
4486#include <stdarg.h>
4487#include <string.h>
4488#include <float.h>
4489
4490int
4491main ()
4492{
4493
4494 ;
4495 return 0;
4496}
4497_ACEOF
4498if ac_fn_c_try_compile "$LINENO"; then :
4499 ac_cv_header_stdc=yes
4500else
4501 ac_cv_header_stdc=no
4502fi
4503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4504
4505if test $ac_cv_header_stdc = yes; then
4506 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4508/* end confdefs.h. */
4509#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004510
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004511_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004513 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004514
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004515else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004516 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004517fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004518rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004519
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004520fi
4521
4522if test $ac_cv_header_stdc = yes; then
4523 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4525/* end confdefs.h. */
4526#include <stdlib.h>
4527
4528_ACEOF
4529if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4530 $EGREP "free" >/dev/null 2>&1; then :
4531
4532else
4533 ac_cv_header_stdc=no
4534fi
4535rm -f conftest*
4536
4537fi
4538
4539if test $ac_cv_header_stdc = yes; then
4540 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4541 if test "$cross_compiling" = yes; then :
4542 :
4543else
4544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4545/* end confdefs.h. */
4546#include <ctype.h>
4547#include <stdlib.h>
4548#if ((' ' & 0x0FF) == 0x020)
4549# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4550# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4551#else
4552# define ISLOWER(c) \
4553 (('a' <= (c) && (c) <= 'i') \
4554 || ('j' <= (c) && (c) <= 'r') \
4555 || ('s' <= (c) && (c) <= 'z'))
4556# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4557#endif
4558
4559#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4560int
4561main ()
4562{
4563 int i;
4564 for (i = 0; i < 256; i++)
4565 if (XOR (islower (i), ISLOWER (i))
4566 || toupper (i) != TOUPPER (i))
4567 return 2;
4568 return 0;
4569}
4570_ACEOF
4571if ac_fn_c_try_run "$LINENO"; then :
4572
4573else
4574 ac_cv_header_stdc=no
4575fi
4576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4577 conftest.$ac_objext conftest.beam conftest.$ac_ext
4578fi
4579
4580fi
4581fi
4582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4583$as_echo "$ac_cv_header_stdc" >&6; }
4584if test $ac_cv_header_stdc = yes; then
4585
4586$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4587
4588fi
4589
4590# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4591for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4592 inttypes.h stdint.h unistd.h
4593do :
4594 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4595ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4596"
4597eval as_val=\$$as_ac_Header
4598 if test "x$as_val" = x""yes; then :
4599 cat >>confdefs.h <<_ACEOF
4600#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4601_ACEOF
4602
4603fi
4604
4605done
4606
4607
4608
4609 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4610if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4611 MINIX=yes
4612else
4613 MINIX=
4614fi
4615
4616
4617 if test "$MINIX" = yes; then
4618
4619$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4620
4621
4622$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4623
4624
4625$as_echo "#define _MINIX 1" >>confdefs.h
4626
4627 fi
4628
4629
4630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4631$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4632if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4633 $as_echo_n "(cached) " >&6
4634else
4635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4636/* end confdefs.h. */
4637
4638# define __EXTENSIONS__ 1
4639 $ac_includes_default
4640int
4641main ()
4642{
4643
4644 ;
4645 return 0;
4646}
4647_ACEOF
4648if ac_fn_c_try_compile "$LINENO"; then :
4649 ac_cv_safe_to_define___extensions__=yes
4650else
4651 ac_cv_safe_to_define___extensions__=no
4652fi
4653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4654fi
4655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4656$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4657 test $ac_cv_safe_to_define___extensions__ = yes &&
4658 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4659
4660 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4661
4662 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4663
4664 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4665
4666 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4667
4668
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004669
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004670# Check for unsupported systems
4671case $ac_sys_system/$ac_sys_release in
4672atheos*|Linux*/1*)
4673 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4674 echo See README for details.
4675 exit 1;;
4676esac
4677
4678
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4680$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004681
4682# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004683if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004684 withval=$with_suffix;
4685 case $withval in
4686 no) EXEEXT=;;
4687 yes) EXEEXT=.exe;;
4688 *) EXEEXT=$withval;;
4689 esac
4690fi
4691
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4693$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004694
4695# Test whether we're running on a non-case-sensitive system, in which
4696# case we give a warning if no ext is given
4697
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4699$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004700if test ! -d CaseSensitiveTestDir; then
4701mkdir CaseSensitiveTestDir
4702fi
4703
4704if test -d casesensitivetestdir
4705then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4707$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004708 BUILDEXEEXT=.exe
4709else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4711$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004712 BUILDEXEEXT=$EXEEXT
4713fi
4714rmdir CaseSensitiveTestDir
4715
4716case $MACHDEP in
4717bsdos*)
4718 case $CC in
4719 gcc) CC="$CC -D_HAVE_BSDI";;
4720 esac;;
4721esac
4722
4723case $ac_sys_system in
4724hp*|HP*)
4725 case $CC in
4726 cc|*/cc) CC="$CC -Ae";;
4727 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004728SunOS*)
4729 # Some functions have a prototype only with that define, e.g. confstr
4730
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004731$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004732
4733 ;;
4734esac
4735
4736
4737
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4739$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004740if test -z "$LIBRARY"
4741then
4742 LIBRARY='libpython$(VERSION).a'
4743fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4745$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004746
4747# LDLIBRARY is the name of the library to link against (as opposed to the
4748# name of the library into which to insert object files). BLDLIBRARY is also
4749# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4750# is blank as the main program is not linked directly against LDLIBRARY.
4751# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4752# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4753# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4754# DLLLIBRARY is the shared (i.e., DLL) library.
4755#
4756# RUNSHARED is used to run shared python without installed libraries
4757#
4758# INSTSONAME is the name of the shared library that will be use to install
4759# on the system - some systems like version suffix, others don't
4760
4761
4762
4763
4764
4765
4766LDLIBRARY="$LIBRARY"
4767BLDLIBRARY='$(LDLIBRARY)'
4768INSTSONAME='$(LDLIBRARY)'
4769DLLLIBRARY=''
4770LDLIBRARYDIR=''
4771RUNSHARED=''
4772
4773# LINKCC is the command that links the python executable -- default is $(CC).
4774# If CXX is set, and if it is needed to link a main function that was
4775# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4776# python might then depend on the C++ runtime
4777# This is altered for AIX in order to build the export list before
4778# linking.
4779
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4781$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004782if test -z "$LINKCC"
4783then
4784 LINKCC='$(PURIFY) $(MAINCC)'
4785 case $ac_sys_system in
4786 AIX*)
4787 exp_extra="\"\""
4788 if test $ac_sys_release -ge 5 -o \
4789 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4790 exp_extra="."
4791 fi
4792 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004793 QNX*)
4794 # qcc must be used because the other compilers do not
4795 # support -N.
4796 LINKCC=qcc;;
4797 esac
4798fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4800$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004801
4802# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4803# make sure we default having it set to "no": this is used by
4804# distutils.unixccompiler to know if it should add --enable-new-dtags
4805# to linker command lines, and failing to detect GNU ld simply results
4806# in the same bahaviour as before.
4807
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4809$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004810ac_prog=ld
4811if test "$GCC" = yes; then
4812 ac_prog=`$CC -print-prog-name=ld`
4813fi
4814case `"$ac_prog" -V 2>&1 < /dev/null` in
4815 *GNU*)
4816 GNULD=yes;;
4817 *)
4818 GNULD=no;;
4819esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4821$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004822
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4824$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004825# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004826if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004827 enableval=$enable_shared;
4828fi
4829
4830
4831if test -z "$enable_shared"
4832then
4833 case $ac_sys_system in
4834 CYGWIN* | atheos*)
4835 enable_shared="yes";;
4836 *)
4837 enable_shared="no";;
4838 esac
4839fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4841$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004842
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4844$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004845# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004846if test "${enable_profiling+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004847 enableval=$enable_profiling; ac_save_cc="$CC"
4848 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004849 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004850 ac_enable_profiling="no"
4851else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004853/* end confdefs.h. */
4854int main() { return 0; }
4855_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004856if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004857 ac_enable_profiling="yes"
4858else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004859 ac_enable_profiling="no"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004860fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004861rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4862 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004863fi
4864
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004865 CC="$ac_save_cc"
4866fi
4867
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4869$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004870
4871case "$ac_enable_profiling" in
4872 "yes")
4873 BASECFLAGS="-pg $BASECFLAGS"
4874 LDFLAGS="-pg $LDFLAGS"
4875 ;;
4876esac
4877
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4879$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004880
4881# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4882# library that we build, but we do not want to link against it (we
4883# will find it with a -framework option). For this reason there is an
4884# extra variable BLDLIBRARY against which Python and the extension
4885# modules are linked, BLDLIBRARY. This is normally the same as
4886# LDLIBRARY, but empty for MacOSX framework builds.
4887if test "$enable_framework"
4888then
4889 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4890 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4891 BLDLIBRARY=''
4892else
4893 BLDLIBRARY='$(LDLIBRARY)'
4894fi
4895
4896# Other platforms follow
4897if test $enable_shared = "yes"; then
4898
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004899$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004900
4901 case $ac_sys_system in
4902 BeOS*)
4903 LDLIBRARY='libpython$(VERSION).so'
4904 ;;
4905 CYGWIN*)
4906 LDLIBRARY='libpython$(VERSION).dll.a'
4907 DLLLIBRARY='libpython$(VERSION).dll'
4908 ;;
4909 SunOS*)
4910 LDLIBRARY='libpython$(VERSION).so'
4911 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4912 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4913 INSTSONAME="$LDLIBRARY".$SOVERSION
4914 ;;
4915 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4916 LDLIBRARY='libpython$(VERSION).so'
4917 BLDLIBRARY='-L. -lpython$(VERSION)'
4918 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4919 case $ac_sys_system in
4920 FreeBSD*)
4921 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4922 ;;
4923 esac
4924 INSTSONAME="$LDLIBRARY".$SOVERSION
4925 ;;
4926 hp*|HP*)
4927 case `uname -m` in
4928 ia64)
4929 LDLIBRARY='libpython$(VERSION).so'
4930 ;;
4931 *)
4932 LDLIBRARY='libpython$(VERSION).sl'
4933 ;;
4934 esac
4935 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4936 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4937 ;;
4938 OSF*)
4939 LDLIBRARY='libpython$(VERSION).so'
4940 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4941 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4942 ;;
4943 atheos*)
4944 LDLIBRARY='libpython$(VERSION).so'
4945 BLDLIBRARY='-L. -lpython$(VERSION)'
4946 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4947 ;;
4948 Darwin*)
4949 LDLIBRARY='libpython$(VERSION).dylib'
4950 BLDLIBRARY='-L. -lpython$(VERSION)'
4951 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4952 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00004953 AIX*)
4954 LDLIBRARY='libpython$(VERSION).so'
4955 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4956 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004957
4958 esac
4959else # shared is disabled
4960 case $ac_sys_system in
4961 CYGWIN*)
4962 BLDLIBRARY='$(LIBRARY)'
4963 LDLIBRARY='libpython$(VERSION).dll.a'
4964 ;;
4965 esac
4966fi
4967
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4969$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004970
4971if test -n "$ac_tool_prefix"; then
4972 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4973set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4975$as_echo_n "checking for $ac_word... " >&6; }
4976if test "${ac_cv_prog_RANLIB+set}" = set; then :
4977 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004978else
4979 if test -n "$RANLIB"; then
4980 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4981else
4982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4983for as_dir in $PATH
4984do
4985 IFS=$as_save_IFS
4986 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004987 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004988 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4989 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004990 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004991 break 2
4992 fi
4993done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004994 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004995IFS=$as_save_IFS
4996
4997fi
4998fi
4999RANLIB=$ac_cv_prog_RANLIB
5000if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5002$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5005$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005006fi
5007
5008
5009fi
5010if test -z "$ac_cv_prog_RANLIB"; then
5011 ac_ct_RANLIB=$RANLIB
5012 # Extract the first word of "ranlib", so it can be a program name with args.
5013set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5015$as_echo_n "checking for $ac_word... " >&6; }
5016if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5017 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005018else
5019 if test -n "$ac_ct_RANLIB"; then
5020 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5021else
5022as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5023for as_dir in $PATH
5024do
5025 IFS=$as_save_IFS
5026 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005027 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005028 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5029 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005030 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005031 break 2
5032 fi
5033done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005034 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005035IFS=$as_save_IFS
5036
5037fi
5038fi
5039ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5040if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5042$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005043else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5045$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005046fi
5047
5048 if test "x$ac_ct_RANLIB" = x; then
5049 RANLIB=":"
5050 else
5051 case $cross_compiling:$ac_tool_warned in
5052yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005053{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5054$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005055ac_tool_warned=yes ;;
5056esac
5057 RANLIB=$ac_ct_RANLIB
5058 fi
5059else
5060 RANLIB="$ac_cv_prog_RANLIB"
5061fi
5062
5063
5064for ac_prog in ar aal
5065do
5066 # Extract the first word of "$ac_prog", so it can be a program name with args.
5067set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5069$as_echo_n "checking for $ac_word... " >&6; }
5070if test "${ac_cv_prog_AR+set}" = set; then :
5071 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005072else
5073 if test -n "$AR"; then
5074 ac_cv_prog_AR="$AR" # Let the user override the test.
5075else
5076as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5077for as_dir in $PATH
5078do
5079 IFS=$as_save_IFS
5080 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005081 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005082 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5083 ac_cv_prog_AR="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005085 break 2
5086 fi
5087done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005088 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005089IFS=$as_save_IFS
5090
5091fi
5092fi
5093AR=$ac_cv_prog_AR
5094if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5096$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005097else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5099$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005100fi
5101
5102
5103 test -n "$AR" && break
5104done
5105test -n "$AR" || AR="ar"
5106
5107
5108# tweak ARFLAGS only if the user didn't set it on the command line
5109
5110if test -z "$ARFLAGS"
5111then
5112 ARFLAGS="rc"
5113fi
5114
5115
5116# Extract the first word of "svnversion", so it can be a program name with args.
5117set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5119$as_echo_n "checking for $ac_word... " >&6; }
5120if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5121 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005122else
5123 if test -n "$SVNVERSION"; then
5124 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5125else
5126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5127for as_dir in $PATH
5128do
5129 IFS=$as_save_IFS
5130 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005131 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005132 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5133 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005134 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005135 break 2
5136 fi
5137done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005138 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005139IFS=$as_save_IFS
5140
5141 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5142fi
5143fi
5144SVNVERSION=$ac_cv_prog_SVNVERSION
5145if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5147$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005148else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5150$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005151fi
5152
5153
5154if test $SVNVERSION = found
5155then
5156 SVNVERSION="svnversion \$(srcdir)"
5157else
5158 SVNVERSION="echo Unversioned directory"
5159fi
5160
5161case $MACHDEP in
5162bsdos*|hp*|HP*)
5163 # install -d does not work on BSDI or HP-UX
5164 if test -z "$INSTALL"
5165 then
5166 INSTALL="${srcdir}/install-sh -c"
5167 fi
5168esac
5169ac_aux_dir=
5170for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005171 for ac_t in install-sh install.sh shtool; do
5172 if test -f "$ac_dir/$ac_t"; then
5173 ac_aux_dir=$ac_dir
5174 ac_install_sh="$ac_aux_dir/$ac_t -c"
5175 break 2
5176 fi
5177 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005178done
5179if test -z "$ac_aux_dir"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005180 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005181fi
5182
5183# These three variables are undocumented and unsupported,
5184# and are intended to be withdrawn in a future Autoconf release.
5185# They can cause serious problems if a builder's source tree is in a directory
5186# whose full name contains unusual characters.
5187ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5188ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5189ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5190
5191
5192# Find a good install program. We prefer a C program (faster),
5193# so one script is as good as another. But avoid the broken or
5194# incompatible versions:
5195# SysV /etc/install, /usr/sbin/install
5196# SunOS /usr/etc/install
5197# IRIX /sbin/install
5198# AIX /bin/install
5199# AmigaOS /C/install, which installs bootblocks on floppy discs
5200# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5201# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5202# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5203# OS/2's system install, which has a completely different semantic
5204# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005205# Reject install programs that cannot install multiple files.
5206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5207$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005208if test -z "$INSTALL"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005209if test "${ac_cv_path_install+set}" = set; then :
5210 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005211else
5212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5213for as_dir in $PATH
5214do
5215 IFS=$as_save_IFS
5216 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005217 # Account for people who put trailing slashes in PATH elements.
5218case $as_dir/ in #((
5219 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005220 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005221 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005222 /usr/ucb/* ) ;;
5223 *)
5224 # OSF1 and SCO ODT 3.0 have their own names for install.
5225 # Don't use installbsd from OSF since it installs stuff as root
5226 # by default.
5227 for ac_prog in ginstall scoinst install; do
5228 for ac_exec_ext in '' $ac_executable_extensions; do
5229 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5230 if test $ac_prog = install &&
5231 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5232 # AIX install. It has an incompatible calling convention.
5233 :
5234 elif test $ac_prog = install &&
5235 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5236 # program-specific install script used by HP pwplus--don't use.
5237 :
5238 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005239 rm -rf conftest.one conftest.two conftest.dir
5240 echo one > conftest.one
5241 echo two > conftest.two
5242 mkdir conftest.dir
5243 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5244 test -s conftest.one && test -s conftest.two &&
5245 test -s conftest.dir/conftest.one &&
5246 test -s conftest.dir/conftest.two
5247 then
5248 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5249 break 3
5250 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005251 fi
5252 fi
5253 done
5254 done
5255 ;;
5256esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005257
5258 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005259IFS=$as_save_IFS
5260
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005261rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005262
5263fi
5264 if test "${ac_cv_path_install+set}" = set; then
5265 INSTALL=$ac_cv_path_install
5266 else
5267 # As a last resort, use the slow shell script. Don't cache a
5268 # value for INSTALL within a source directory, because that will
5269 # break other packages using the cache if that directory is
5270 # removed, or if the value is a relative name.
5271 INSTALL=$ac_install_sh
5272 fi
5273fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5275$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005276
5277# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5278# It thinks the first close brace ends the variable substitution.
5279test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5280
5281test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5282
5283test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5284
5285
5286# Not every filesystem supports hard links
5287
5288if test -z "$LN" ; then
5289 case $ac_sys_system in
5290 BeOS*) LN="ln -s";;
5291 CYGWIN*) LN="ln -s";;
5292 atheos*) LN="ln -s";;
5293 *) LN=ln;;
5294 esac
5295fi
5296
5297# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5299$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005300
5301# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005302if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005303 withval=$with_pydebug;
5304if test "$withval" != no
5305then
5306
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005307$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005308
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5310$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005311 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005312else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5313$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005314fi
5315else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5317$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005318fi
5319
5320
5321# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5322# merged with this chunk of code?
5323
5324# Optimizer/debugger flags
5325# ------------------------
5326# (The following bit of code is complicated enough - please keep things
5327# indented properly. Just pretend you're editing Python code. ;-)
5328
5329# There are two parallel sets of case statements below, one that checks to
5330# see if OPT was set and one that does BASECFLAGS setting based upon
5331# compiler and platform. BASECFLAGS tweaks need to be made even if the
5332# user set OPT.
5333
5334# tweak OPT based on compiler and platform, only if the user didn't set
5335# it on the command line
5336
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005337if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005338then
5339 case $GCC in
5340 yes)
5341 if test "$CC" != 'g++' ; then
5342 STRICT_PROTO="-Wstrict-prototypes"
5343 fi
5344 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5345 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5346 WRAP="-fwrapv"
5347 fi
5348 case $ac_cv_prog_cc_g in
5349 yes)
5350 if test "$Py_DEBUG" = 'true' ; then
5351 # Optimization messes up debuggers, so turn it off for
5352 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005353 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005354 else
5355 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5356 fi
5357 ;;
5358 *)
5359 OPT="-O3 -Wall $STRICT_PROTO"
5360 ;;
5361 esac
5362 case $ac_sys_system in
5363 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5364 ;;
5365 esac
5366 ;;
5367
5368 *)
5369 OPT="-O"
5370 ;;
5371 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005372fi
5373
5374
5375
5376# The -arch flags for universal builds on OSX
5377UNIVERSAL_ARCH_FLAGS=
5378
5379
5380# tweak BASECFLAGS based on compiler and platform
5381case $GCC in
5382yes)
5383 # Python violates C99 rules, by casting between incompatible
5384 # pointer types. GCC may generate bad code as a result of that,
5385 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5387$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005388 ac_save_cc="$CC"
5389 CC="$CC -fno-strict-aliasing"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005390 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then :
5391 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005392else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005394/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005395
5396int
5397main ()
5398{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005399
Gregory P. Smith373469a2009-11-01 21:03:38 +00005400 ;
5401 return 0;
5402}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005403_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005404if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005405 ac_cv_no_strict_aliasing_ok=yes
5406else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005407 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005408fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005410fi
5411
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005412 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5414$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005415 if test $ac_cv_no_strict_aliasing_ok = yes
5416 then
5417 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5418 fi
5419
5420 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5421 # support. Without this, treatment of subnormals doesn't follow
5422 # the standard.
5423 case $ac_sys_machine in
5424 alpha*)
5425 BASECFLAGS="$BASECFLAGS -mieee"
5426 ;;
5427 esac
5428
5429 case $ac_sys_system in
5430 SCO_SV*)
5431 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5432 ;;
5433 # is there any other compiler on Darwin besides gcc?
5434 Darwin*)
5435 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5436 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005437 if test "${CC}" = gcc
5438 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5440$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005441 case "${UNIVERSALSDK}" in
5442 */MacOSX10.4u.sdk)
5443 # Build using 10.4 SDK, force usage of gcc when the
5444 # compiler is gcc, otherwise the user will get very
5445 # confusing error messages when building on OSX 10.6
5446 CC=gcc-4.0
5447 CPP=cpp-4.0
5448 ;;
5449 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5451$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005452 fi
5453
5454 # Calculate the right deployment target for this build.
5455 #
5456 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5457 if test ${cur_target} '>' 10.2; then
5458 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00005459 if test ${enable_universalsdk}; then
5460 if test "${UNIVERSAL_ARCHS}" = "all"; then
5461 # Ensure that the default platform for a
5462 # 4-way universal build is OSX 10.5,
5463 # that's the first OS release where
5464 # 4-way builds make sense.
5465 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00005466
5467 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5468 cur_target='10.5'
5469
5470 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5471 cur_target='10.5'
5472
5473 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5474 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00005475 fi
5476 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00005477 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00005478 # On Intel macs default to a deployment
5479 # target of 10.4, that's the first OSX
5480 # release with Intel support.
5481 cur_target="10.4"
5482 fi
5483 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005484 fi
5485 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5486
5487 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5488 # environment with a value that is the same as what we'll use
5489 # in the Makefile to ensure that we'll get the same compiler
5490 # environment during configure and build time.
5491 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5492 export MACOSX_DEPLOYMENT_TARGET
5493 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5494
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005495 if test "${enable_universalsdk}"; then
5496 UNIVERSAL_ARCH_FLAGS=""
5497 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5498 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5499 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00005500 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005501
5502 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5503 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5504 LIPO_32BIT_FLAGS=""
5505 ARCH_RUN_32BIT="true"
5506
5507 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5508 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5509 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005510 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005511
5512 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5513 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5514 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005515 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005516
5517 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5518 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5519 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00005520 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005521
5522 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005523 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 +00005524
5525 fi
5526
5527
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00005528 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
5529 if test "${UNIVERSALSDK}" != "/"
5530 then
5531 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
5532 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5533 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005534 fi
5535
5536 fi
5537
5538
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005539 ;;
5540 OSF*)
5541 BASECFLAGS="$BASECFLAGS -mieee"
5542 ;;
5543 esac
5544 ;;
5545
5546*)
5547 case $ac_sys_system in
5548 OpenUNIX*|UnixWare*)
5549 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5550 ;;
5551 OSF*)
5552 BASECFLAGS="$BASECFLAGS -ieee -std"
5553 ;;
5554 SCO_SV*)
5555 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5556 ;;
5557 esac
5558 ;;
5559esac
5560
5561if test "$Py_DEBUG" = 'true'; then
5562 :
5563else
5564 OPT="-DNDEBUG $OPT"
5565fi
5566
5567if test "$ac_arch_flags"
5568then
5569 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5570fi
5571
5572# disable check for icc since it seems to pass, but generates a warning
5573if test "$CC" = icc
5574then
5575 ac_cv_opt_olimit_ok=no
5576fi
5577
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5579$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5580if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5581 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005582else
5583 ac_save_cc="$CC"
5584CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005586/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005587
5588int
5589main ()
5590{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005591
Gregory P. Smith373469a2009-11-01 21:03:38 +00005592 ;
5593 return 0;
5594}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005595_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005596if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005597 ac_cv_opt_olimit_ok=yes
5598else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005599 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005600
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005601fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005603CC="$ac_save_cc"
5604fi
5605
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5607$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005608if test $ac_cv_opt_olimit_ok = yes; then
5609 case $ac_sys_system in
5610 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5611 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5612 # environment?
5613 Darwin*)
5614 ;;
5615 *)
5616 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5617 ;;
5618 esac
5619else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5621$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5622 if test "${ac_cv_olimit_ok+set}" = set; then :
5623 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005624else
5625 ac_save_cc="$CC"
5626 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005628/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005629
5630int
5631main ()
5632{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005633
Gregory P. Smith373469a2009-11-01 21:03:38 +00005634 ;
5635 return 0;
5636}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005637_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005638if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005639 ac_cv_olimit_ok=yes
5640else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005641 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005642
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005643fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005645 CC="$ac_save_cc"
5646fi
5647
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5649$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005650 if test $ac_cv_olimit_ok = yes; then
5651 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5652 fi
5653fi
5654
5655# Check whether GCC supports PyArg_ParseTuple format
5656if test "$GCC" = "yes"
5657then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5659$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005660 save_CFLAGS=$CFLAGS
5661 CFLAGS="$CFLAGS -Werror"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005663/* end confdefs.h. */
5664
5665 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005666int
5667main ()
5668{
5669
5670 ;
5671 return 0;
5672}
Matthias Klosec511b472010-05-08 11:01:39 +00005673
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005674_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005675if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005676
Matthias Klosec511b472010-05-08 11:01:39 +00005677
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005678$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005679
Matthias Klosec511b472010-05-08 11:01:39 +00005680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005681$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00005682
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005683else
Matthias Klosec511b472010-05-08 11:01:39 +00005684
5685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005686$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005687
5688fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5690 CFLAGS=$save_CFLAGS
5691fi
5692
5693# On some compilers, pthreads are available without further options
5694# (e.g. MacOS X). On some of these systems, the compiler will not
5695# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5696# So we have to see first whether pthreads are available without
5697# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5699$as_echo_n "checking whether pthreads are available without options... " >&6; }
5700if test "${ac_cv_pthread_is_default+set}" = set; then :
5701 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005702else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005703 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005704 ac_cv_pthread_is_default=no
5705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005707/* end confdefs.h. */
5708
5709#include <pthread.h>
5710
5711void* routine(void* p){return NULL;}
5712
5713int main(){
5714 pthread_t p;
5715 if(pthread_create(&p,NULL,routine,NULL)!=0)
5716 return 1;
5717 (void)pthread_detach(p);
5718 return 0;
5719}
5720
5721_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005722if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005723
5724 ac_cv_pthread_is_default=yes
5725 ac_cv_kthread=no
5726 ac_cv_pthread=no
5727
5728else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005729 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005730fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5732 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005733fi
5734
5735
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005736fi
5737
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5739$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005740
5741
5742if test $ac_cv_pthread_is_default = yes
5743then
5744 ac_cv_kpthread=no
5745else
5746# -Kpthread, if available, provides the right #defines
5747# and linker options to make pthread_create available
5748# Some compilers won't report that they do not support -Kpthread,
5749# so we need to run a program to see whether it really made the
5750# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5752$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5753if test "${ac_cv_kpthread+set}" = set; then :
5754 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005755else
5756 ac_save_cc="$CC"
5757CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005758if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005759 ac_cv_kpthread=no
5760else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005762/* end confdefs.h. */
5763
5764#include <pthread.h>
5765
5766void* routine(void* p){return NULL;}
5767
5768int main(){
5769 pthread_t p;
5770 if(pthread_create(&p,NULL,routine,NULL)!=0)
5771 return 1;
5772 (void)pthread_detach(p);
5773 return 0;
5774}
5775
5776_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005777if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005778 ac_cv_kpthread=yes
5779else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005780 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005781fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5783 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005784fi
5785
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005786CC="$ac_save_cc"
5787fi
5788
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5790$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005791fi
5792
5793if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5794then
5795# -Kthread, if available, provides the right #defines
5796# and linker options to make pthread_create available
5797# Some compilers won't report that they do not support -Kthread,
5798# so we need to run a program to see whether it really made the
5799# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5801$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5802if test "${ac_cv_kthread+set}" = set; then :
5803 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005804else
5805 ac_save_cc="$CC"
5806CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005807if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005808 ac_cv_kthread=no
5809else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005811/* end confdefs.h. */
5812
5813#include <pthread.h>
5814
5815void* routine(void* p){return NULL;}
5816
5817int main(){
5818 pthread_t p;
5819 if(pthread_create(&p,NULL,routine,NULL)!=0)
5820 return 1;
5821 (void)pthread_detach(p);
5822 return 0;
5823}
5824
5825_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005826if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005827 ac_cv_kthread=yes
5828else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005829 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005830fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5832 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005833fi
5834
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005835CC="$ac_save_cc"
5836fi
5837
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5839$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005840fi
5841
5842if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5843then
5844# -pthread, if available, provides the right #defines
5845# and linker options to make pthread_create available
5846# Some compilers won't report that they do not support -pthread,
5847# so we need to run a program to see whether it really made the
5848# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5850$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5851if test "${ac_cv_thread+set}" = set; then :
5852 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005853else
5854 ac_save_cc="$CC"
5855CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005856if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005857 ac_cv_pthread=no
5858else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005860/* end confdefs.h. */
5861
5862#include <pthread.h>
5863
5864void* routine(void* p){return NULL;}
5865
5866int main(){
5867 pthread_t p;
5868 if(pthread_create(&p,NULL,routine,NULL)!=0)
5869 return 1;
5870 (void)pthread_detach(p);
5871 return 0;
5872}
5873
5874_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005875if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005876 ac_cv_pthread=yes
5877else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005878 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005879fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5881 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005882fi
5883
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005884CC="$ac_save_cc"
5885fi
5886
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5888$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005889fi
5890
5891# If we have set a CC compiler flag for thread support then
5892# check if it works for CXX, too.
5893ac_cv_cxx_thread=no
5894if test ! -z "$CXX"
5895then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5897$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005898ac_save_cxx="$CXX"
5899
5900if test "$ac_cv_kpthread" = "yes"
5901then
5902 CXX="$CXX -Kpthread"
5903 ac_cv_cxx_thread=yes
5904elif test "$ac_cv_kthread" = "yes"
5905then
5906 CXX="$CXX -Kthread"
5907 ac_cv_cxx_thread=yes
5908elif test "$ac_cv_pthread" = "yes"
5909then
5910 CXX="$CXX -pthread"
5911 ac_cv_cxx_thread=yes
5912fi
5913
5914if test $ac_cv_cxx_thread = yes
5915then
5916 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5917 $CXX -c conftest.$ac_ext 2>&5
5918 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5919 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5920 then
5921 ac_cv_cxx_thread=yes
5922 else
5923 ac_cv_cxx_thread=no
5924 fi
5925 rm -fr conftest*
5926fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5928$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005929fi
5930CXX="$ac_save_cxx"
5931
5932
5933# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5935$as_echo_n "checking for ANSI C header files... " >&6; }
5936if test "${ac_cv_header_stdc+set}" = set; then :
5937 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005938else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005940/* end confdefs.h. */
5941#include <stdlib.h>
5942#include <stdarg.h>
5943#include <string.h>
5944#include <float.h>
5945
5946int
5947main ()
5948{
5949
5950 ;
5951 return 0;
5952}
5953_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005954if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005955 ac_cv_header_stdc=yes
5956else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005957 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005958fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5960
5961if test $ac_cv_header_stdc = yes; then
5962 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005964/* end confdefs.h. */
5965#include <string.h>
5966
5967_ACEOF
5968if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005969 $EGREP "memchr" >/dev/null 2>&1; then :
5970
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005971else
5972 ac_cv_header_stdc=no
5973fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005974rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005975
5976fi
5977
5978if test $ac_cv_header_stdc = yes; then
5979 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005981/* end confdefs.h. */
5982#include <stdlib.h>
5983
5984_ACEOF
5985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005986 $EGREP "free" >/dev/null 2>&1; then :
5987
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005988else
5989 ac_cv_header_stdc=no
5990fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005991rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005992
5993fi
5994
5995if test $ac_cv_header_stdc = yes; then
5996 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005997 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005998 :
5999else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006001/* end confdefs.h. */
6002#include <ctype.h>
6003#include <stdlib.h>
6004#if ((' ' & 0x0FF) == 0x020)
6005# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6006# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6007#else
6008# define ISLOWER(c) \
6009 (('a' <= (c) && (c) <= 'i') \
6010 || ('j' <= (c) && (c) <= 'r') \
6011 || ('s' <= (c) && (c) <= 'z'))
6012# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6013#endif
6014
6015#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6016int
6017main ()
6018{
6019 int i;
6020 for (i = 0; i < 256; i++)
6021 if (XOR (islower (i), ISLOWER (i))
6022 || toupper (i) != TOUPPER (i))
6023 return 2;
6024 return 0;
6025}
6026_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006027if ac_fn_c_try_run "$LINENO"; then :
6028
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006030 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006031fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006032rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6033 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006034fi
6035
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006036fi
6037fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6039$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006040if test $ac_cv_header_stdc = yes; then
6041
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006042$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006043
6044fi
6045
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006046for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6047fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006048ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006049shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006050unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006051sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6052sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006053sys/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 +00006054sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006055sys/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 +00006056sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006057bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006058do :
6059 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6060ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6061eval as_val=\$$as_ac_Header
6062 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006063 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006064#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006065_ACEOF
6066
6067fi
6068
Guido van Rossum627b2d71993-12-24 10:39:16 +00006069done
6070
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006071ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006072for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006073 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6075$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
6076if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
6077 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006078else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006080/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006081#include <sys/types.h>
6082#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006083
Martin v. Löwis11437992002-04-12 09:54:03 +00006084int
6085main ()
6086{
6087if ((DIR *) 0)
6088return 0;
6089 ;
6090 return 0;
6091}
6092_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006093if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006094 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006095else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006096 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006097fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006099fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006100eval ac_res=\$$as_ac_Header
6101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6102$as_echo "$ac_res" >&6; }
6103eval as_val=\$$as_ac_Header
6104 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006105 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006106#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006107_ACEOF
6108
6109ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006110fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006111
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006112done
6113# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6114if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6116$as_echo_n "checking for library containing opendir... " >&6; }
6117if test "${ac_cv_search_opendir+set}" = set; then :
6118 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006119else
Martin v. Löwis11437992002-04-12 09:54:03 +00006120 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006122/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006123
Martin v. Löwiseba40652007-08-30 20:10:57 +00006124/* Override any GCC internal prototype to avoid an error.
6125 Use char because int might match the return type of a GCC
6126 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006127#ifdef __cplusplus
6128extern "C"
6129#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006130char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006131int
6132main ()
6133{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006134return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006135 ;
6136 return 0;
6137}
6138_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006139for ac_lib in '' dir; do
6140 if test -z "$ac_lib"; then
6141 ac_res="none required"
6142 else
6143 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006144 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006145 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006146 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006147 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006148fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006149rm -f core conftest.err conftest.$ac_objext \
6150 conftest$ac_exeext
6151 if test "${ac_cv_search_opendir+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006152 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006154done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006155if test "${ac_cv_search_opendir+set}" = set; then :
6156
Martin v. Löwiseba40652007-08-30 20:10:57 +00006157else
6158 ac_cv_search_opendir=no
6159fi
6160rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006161LIBS=$ac_func_search_save_LIBS
6162fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6164$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006165ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006166if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006167 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006168
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006169fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006170
Michael W. Hudson54241132001-12-07 15:38:26 +00006171else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6173$as_echo_n "checking for library containing opendir... " >&6; }
6174if test "${ac_cv_search_opendir+set}" = set; then :
6175 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006176else
6177 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006180
Martin v. Löwiseba40652007-08-30 20:10:57 +00006181/* Override any GCC internal prototype to avoid an error.
6182 Use char because int might match the return type of a GCC
6183 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006184#ifdef __cplusplus
6185extern "C"
6186#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006187char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006188int
6189main ()
6190{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006191return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006192 ;
6193 return 0;
6194}
6195_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006196for ac_lib in '' x; do
6197 if test -z "$ac_lib"; then
6198 ac_res="none required"
6199 else
6200 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006201 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006202 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006203 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006204 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006205fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006206rm -f core conftest.err conftest.$ac_objext \
6207 conftest$ac_exeext
6208 if test "${ac_cv_search_opendir+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006209 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006210fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006211done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006212if test "${ac_cv_search_opendir+set}" = set; then :
6213
Martin v. Löwiseba40652007-08-30 20:10:57 +00006214else
6215 ac_cv_search_opendir=no
6216fi
6217rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006218LIBS=$ac_func_search_save_LIBS
6219fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6221$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006222ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006223if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006224 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006225
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006226fi
6227
6228fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006229
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6231$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6232if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6233 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006234else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006236/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006237#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006238int
6239main ()
6240{
6241return makedev(0, 0);
6242 ;
6243 return 0;
6244}
6245_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006246if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006247 ac_cv_header_sys_types_h_makedev=yes
6248else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006249 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006250fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006251rm -f core conftest.err conftest.$ac_objext \
6252 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253
6254fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6256$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006257
6258if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006259ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6260if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006261
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006262$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006263
6264fi
6265
6266
6267
6268 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006269 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6270if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006271
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006272$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006273
6274fi
6275
6276
6277 fi
6278fi
6279
Michael W. Hudson54241132001-12-07 15:38:26 +00006280
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006281# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006282for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006283do :
6284 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006285#ifdef HAVE_CURSES_H
6286#include <curses.h>
6287#endif
6288
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006289"
6290if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006291 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006292#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006293_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006294
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006295fi
6296
6297done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006298
6299
Martin v. Löwis11017b12006-01-14 18:12:57 +00006300# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006301for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006302do :
6303 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 +00006304#ifdef HAVE_ASM_TYPES_H
6305#include <asm/types.h>
6306#endif
6307#ifdef HAVE_SYS_SOCKET_H
6308#include <sys/socket.h>
6309#endif
6310
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006311"
6312if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006313 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006314#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006315_ACEOF
6316
6317fi
6318
6319done
6320
6321
Guido van Rossum627b2d71993-12-24 10:39:16 +00006322# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006323was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6325$as_echo_n "checking for clock_t in time.h... " >&6; }
6326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006327/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006328#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006329
6330_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006331if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006332 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006333 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006334else
Martin v. Löwis11437992002-04-12 09:54:03 +00006335
6336
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006337$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006338
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006339
Guido van Rossum627b2d71993-12-24 10:39:16 +00006340fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006341rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006342
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6344$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006345
Neal Norwitz11690112002-07-30 01:08:28 +00006346# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6348$as_echo_n "checking for makedev... " >&6; }
6349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006350/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006351
6352#if defined(MAJOR_IN_MKDEV)
6353#include <sys/mkdev.h>
6354#elif defined(MAJOR_IN_SYSMACROS)
6355#include <sys/sysmacros.h>
6356#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006357#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006358#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006359int
6360main ()
6361{
6362 makedev(0, 0)
6363 ;
6364 return 0;
6365}
6366_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006367if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006368 ac_cv_has_makedev=yes
6369else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006370 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006371fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006372rm -f core conftest.err conftest.$ac_objext \
6373 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006374if test "$ac_cv_has_makedev" = "no"; then
6375 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006377/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006378
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006379#define _OSF_SOURCE 1
6380#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006381
Neal Norwitz11690112002-07-30 01:08:28 +00006382int
6383main ()
6384{
6385 makedev(0, 0)
6386 ;
6387 return 0;
6388}
6389_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006390if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006391 ac_cv_has_makedev=yes
6392else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006393 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006394fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006395rm -f core conftest.err conftest.$ac_objext \
6396 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006397 if test "$ac_cv_has_makedev" = "yes"; then
6398
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006399$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006400
6401 fi
6402fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6404$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006405if test "$ac_cv_has_makedev" = "yes"; then
6406
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006407$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006408
6409fi
6410
Martin v. Löwis399a6892002-10-04 10:22:02 +00006411# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6412# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6413# defined, but the compiler does not support pragma redefine_extname,
6414# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6415# structures (such as rlimit64) without declaring them. As a
6416# work-around, disable LFS on such configurations
6417
6418use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6420$as_echo_n "checking Solaris LFS bug... " >&6; }
6421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006422/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006423
6424#define _LARGEFILE_SOURCE 1
6425#define _FILE_OFFSET_BITS 64
6426#include <sys/resource.h>
6427
Martin v. Löwis399a6892002-10-04 10:22:02 +00006428int
6429main ()
6430{
6431struct rlimit foo;
6432 ;
6433 return 0;
6434}
6435_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006436if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006437 sol_lfs_bug=no
6438else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006439 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6443$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006444if test "$sol_lfs_bug" = "yes"; then
6445 use_lfs=no
6446fi
6447
6448if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006449# Two defines needed to enable largefile support on various platforms
6450# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006451
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006452$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006453
6454
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006455$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006456
Martin v. Löwis399a6892002-10-04 10:22:02 +00006457fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006458
Guido van Rossum84e7b241996-08-19 21:59:00 +00006459# Add some code to confdefs.h so that the test for off_t works on SCO
6460cat >> confdefs.h <<\EOF
6461#if defined(SCO_DS)
6462#undef _OFF_T
6463#endif
6464EOF
6465
Guido van Rossumef2255b2000-03-10 22:30:29 +00006466# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006467ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6468if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006469
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006470else
Martin v. Löwis11437992002-04-12 09:54:03 +00006471
6472cat >>confdefs.h <<_ACEOF
6473#define mode_t int
6474_ACEOF
6475
6476fi
6477
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006478ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6479if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006480
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006481else
Martin v. Löwis11437992002-04-12 09:54:03 +00006482
6483cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006484#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006485_ACEOF
6486
6487fi
6488
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006489ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6490if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006491
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006492else
Martin v. Löwis11437992002-04-12 09:54:03 +00006493
6494cat >>confdefs.h <<_ACEOF
6495#define pid_t int
6496_ACEOF
6497
6498fi
6499
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006500
Martin v. Löwis11437992002-04-12 09:54:03 +00006501cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00006502#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006503_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006504
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006505ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6506if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006507
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006508else
Martin v. Löwis11437992002-04-12 09:54:03 +00006509
6510cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006511#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006512_ACEOF
6513
6514fi
6515
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6517$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6518if test "${ac_cv_type_uid_t+set}" = set; then :
6519 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006520else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006522/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006523#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006524
6525_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006526if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006527 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006528 ac_cv_type_uid_t=yes
6529else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006530 ac_cv_type_uid_t=no
6531fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006532rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006533
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006534fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6536$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006537if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006538
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006539$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006540
6541
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006542$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006543
6544fi
6545
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006546ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6547case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006548 no|yes) ;; #(
6549 *)
6550
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006551$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006552
6553
6554cat >>confdefs.h <<_ACEOF
6555#define uint32_t $ac_cv_c_uint32_t
6556_ACEOF
6557;;
6558 esac
6559
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006560ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6561case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006562 no|yes) ;; #(
6563 *)
6564
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006565$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006566
6567
6568cat >>confdefs.h <<_ACEOF
6569#define uint64_t $ac_cv_c_uint64_t
6570_ACEOF
6571;;
6572 esac
6573
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006574ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6575case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006576 no|yes) ;; #(
6577 *)
6578
6579cat >>confdefs.h <<_ACEOF
6580#define int32_t $ac_cv_c_int32_t
6581_ACEOF
6582;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006583esac
6584
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006585ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6586case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006587 no|yes) ;; #(
6588 *)
6589
6590cat >>confdefs.h <<_ACEOF
6591#define int64_t $ac_cv_c_int64_t
6592_ACEOF
6593;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006594esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006595
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006596ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6597if test "x$ac_cv_type_ssize_t" = x""yes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006598
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006599$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006600
6601fi
6602
Jack Jansendd19cf82001-12-06 22:36:17 +00006603
Michael W. Hudson54241132001-12-07 15:38:26 +00006604# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006605# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006606# The cast to long int works around a bug in the HP C Compiler
6607# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6608# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6609# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6611$as_echo_n "checking size of int... " >&6; }
6612if test "${ac_cv_sizeof_int+set}" = set; then :
6613 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006614else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006615 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 +00006616
Martin v. Löwis11437992002-04-12 09:54:03 +00006617else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006618 if test "$ac_cv_type_int" = yes; then
6619 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6620$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6621{ as_fn_set_status 77
6622as_fn_error "cannot compute sizeof (int)
6623See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006624 else
6625 ac_cv_sizeof_int=0
6626 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006627fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006628
Martin v. Löwis11437992002-04-12 09:54:03 +00006629fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6631$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006632
6633
6634
Martin v. Löwis11437992002-04-12 09:54:03 +00006635cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006636#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006637_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006638
6639
Martin v. Löwiseba40652007-08-30 20:10:57 +00006640# The cast to long int works around a bug in the HP C Compiler
6641# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6642# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6643# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6645$as_echo_n "checking size of long... " >&6; }
6646if test "${ac_cv_sizeof_long+set}" = set; then :
6647 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006648else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006649 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 +00006650
Martin v. Löwis11437992002-04-12 09:54:03 +00006651else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006652 if test "$ac_cv_type_long" = yes; then
6653 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6654$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6655{ as_fn_set_status 77
6656as_fn_error "cannot compute sizeof (long)
6657See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006658 else
6659 ac_cv_sizeof_long=0
6660 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006661fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006662
Martin v. Löwis11437992002-04-12 09:54:03 +00006663fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6665$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006666
6667
6668
Martin v. Löwis11437992002-04-12 09:54:03 +00006669cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006670#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006671_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006672
6673
Martin v. Löwiseba40652007-08-30 20:10:57 +00006674# The cast to long int works around a bug in the HP C Compiler
6675# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6676# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6677# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6679$as_echo_n "checking size of void *... " >&6; }
6680if test "${ac_cv_sizeof_void_p+set}" = set; then :
6681 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006682else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006683 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 +00006684
Martin v. Löwis11437992002-04-12 09:54:03 +00006685else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006686 if test "$ac_cv_type_void_p" = yes; then
6687 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6688$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6689{ as_fn_set_status 77
6690as_fn_error "cannot compute sizeof (void *)
6691See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006692 else
6693 ac_cv_sizeof_void_p=0
6694 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006695fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006696
Martin v. Löwis11437992002-04-12 09:54:03 +00006697fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6699$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006700
6701
6702
Martin v. Löwis11437992002-04-12 09:54:03 +00006703cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006704#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006705_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006706
6707
Martin v. Löwiseba40652007-08-30 20:10:57 +00006708# The cast to long int works around a bug in the HP C Compiler
6709# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6710# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6711# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6713$as_echo_n "checking size of short... " >&6; }
6714if test "${ac_cv_sizeof_short+set}" = set; then :
6715 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006716else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006717 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 +00006718
Martin v. Löwis11437992002-04-12 09:54:03 +00006719else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006720 if test "$ac_cv_type_short" = yes; then
6721 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6723{ as_fn_set_status 77
6724as_fn_error "cannot compute sizeof (short)
6725See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006726 else
6727 ac_cv_sizeof_short=0
6728 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006729fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006730
Martin v. Löwis11437992002-04-12 09:54:03 +00006731fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6733$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006734
6735
6736
Martin v. Löwis11437992002-04-12 09:54:03 +00006737cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006738#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006739_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006740
6741
Martin v. Löwiseba40652007-08-30 20:10:57 +00006742# The cast to long int works around a bug in the HP C Compiler
6743# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6744# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6745# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6747$as_echo_n "checking size of float... " >&6; }
6748if test "${ac_cv_sizeof_float+set}" = set; then :
6749 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006750else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006751 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 +00006752
Martin v. Löwis11437992002-04-12 09:54:03 +00006753else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006754 if test "$ac_cv_type_float" = yes; then
6755 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6756$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6757{ as_fn_set_status 77
6758as_fn_error "cannot compute sizeof (float)
6759See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006760 else
6761 ac_cv_sizeof_float=0
6762 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006763fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006764
Martin v. Löwis11437992002-04-12 09:54:03 +00006765fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6767$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006768
6769
6770
Martin v. Löwis11437992002-04-12 09:54:03 +00006771cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006772#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006773_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006774
6775
Martin v. Löwiseba40652007-08-30 20:10:57 +00006776# The cast to long int works around a bug in the HP C Compiler
6777# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6778# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6779# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6781$as_echo_n "checking size of double... " >&6; }
6782if test "${ac_cv_sizeof_double+set}" = set; then :
6783 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006784else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006785 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 +00006786
Martin v. Löwis11437992002-04-12 09:54:03 +00006787else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006788 if test "$ac_cv_type_double" = yes; then
6789 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6790$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6791{ as_fn_set_status 77
6792as_fn_error "cannot compute sizeof (double)
6793See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006794 else
6795 ac_cv_sizeof_double=0
6796 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006797fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006798
Martin v. Löwis11437992002-04-12 09:54:03 +00006799fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6801$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006802
6803
6804
Martin v. Löwis11437992002-04-12 09:54:03 +00006805cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006806#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006807_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006808
6809
Martin v. Löwiseba40652007-08-30 20:10:57 +00006810# The cast to long int works around a bug in the HP C Compiler
6811# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6812# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6813# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6815$as_echo_n "checking size of fpos_t... " >&6; }
6816if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6817 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006818else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006819 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 +00006820
Martin v. Löwis11437992002-04-12 09:54:03 +00006821else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006822 if test "$ac_cv_type_fpos_t" = yes; then
6823 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6824$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6825{ as_fn_set_status 77
6826as_fn_error "cannot compute sizeof (fpos_t)
6827See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006828 else
6829 ac_cv_sizeof_fpos_t=0
6830 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006831fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006832
Martin v. Löwis11437992002-04-12 09:54:03 +00006833fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6835$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006836
6837
6838
Martin v. Löwis11437992002-04-12 09:54:03 +00006839cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006840#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006841_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006842
Michael W. Hudson54241132001-12-07 15:38:26 +00006843
Martin v. Löwiseba40652007-08-30 20:10:57 +00006844# The cast to long int works around a bug in the HP C Compiler
6845# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6846# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6847# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6849$as_echo_n "checking size of size_t... " >&6; }
6850if test "${ac_cv_sizeof_size_t+set}" = set; then :
6851 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006853 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 +00006854
Martin v. Löwis18e16552006-02-15 17:27:45 +00006855else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006856 if test "$ac_cv_type_size_t" = yes; then
6857 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6858$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6859{ as_fn_set_status 77
6860as_fn_error "cannot compute sizeof (size_t)
6861See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006862 else
6863 ac_cv_sizeof_size_t=0
6864 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006865fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006866
Martin v. Löwis18e16552006-02-15 17:27:45 +00006867fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6869$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006870
6871
6872
Martin v. Löwis18e16552006-02-15 17:27:45 +00006873cat >>confdefs.h <<_ACEOF
6874#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6875_ACEOF
6876
6877
Christian Heimes951cc0f2008-01-31 23:08:23 +00006878# The cast to long int works around a bug in the HP C Compiler
6879# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6880# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6881# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6883$as_echo_n "checking size of pid_t... " >&6; }
6884if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6885 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00006886else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006887 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 +00006888
Christian Heimes951cc0f2008-01-31 23:08:23 +00006889else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006890 if test "$ac_cv_type_pid_t" = yes; then
6891 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6893{ as_fn_set_status 77
6894as_fn_error "cannot compute sizeof (pid_t)
6895See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006896 else
6897 ac_cv_sizeof_pid_t=0
6898 fi
6899fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006900
Christian Heimes951cc0f2008-01-31 23:08:23 +00006901fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6903$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006904
6905
6906
6907cat >>confdefs.h <<_ACEOF
6908#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6909_ACEOF
6910
6911
Michael W. Hudson54241132001-12-07 15:38:26 +00006912
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6914$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006915have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006917/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006918
Martin v. Löwis11437992002-04-12 09:54:03 +00006919int
6920main ()
6921{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006922long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006923 ;
6924 return 0;
6925}
6926_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006927if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006928
6929
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006930$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006931
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006932 have_long_long=yes
6933
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006934fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6937$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006938if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006939# The cast to long int works around a bug in the HP C Compiler
6940# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6941# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6942# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6944$as_echo_n "checking size of long long... " >&6; }
6945if test "${ac_cv_sizeof_long_long+set}" = set; then :
6946 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006947else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006948 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 +00006949
Martin v. Löwis11437992002-04-12 09:54:03 +00006950else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006951 if test "$ac_cv_type_long_long" = yes; then
6952 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6954{ as_fn_set_status 77
6955as_fn_error "cannot compute sizeof (long long)
6956See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006957 else
6958 ac_cv_sizeof_long_long=0
6959 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006960fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006961
Martin v. Löwis11437992002-04-12 09:54:03 +00006962fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6964$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006965
6966
6967
Martin v. Löwis11437992002-04-12 09:54:03 +00006968cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006969#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006970_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006971
Michael W. Hudson54241132001-12-07 15:38:26 +00006972
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006973fi
6974
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6976$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00006977have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00006979/* end confdefs.h. */
6980
6981int
6982main ()
6983{
Matthias Klosec511b472010-05-08 11:01:39 +00006984long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00006985 ;
6986 return 0;
6987}
6988_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006989if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00006990
6991
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006992$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00006993
6994 have_long_double=yes
6995
Mark Dickinsondc1688a2008-06-27 22:20:14 +00006996fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00006997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6999$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007000if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007001# The cast to long int works around a bug in the HP C Compiler
7002# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7003# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7004# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7006$as_echo_n "checking size of long double... " >&6; }
7007if test "${ac_cv_sizeof_long_double+set}" = set; then :
7008 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007009else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007010 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 +00007011
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007012else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007013 if test "$ac_cv_type_long_double" = yes; then
7014 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7015$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7016{ as_fn_set_status 77
7017as_fn_error "cannot compute sizeof (long double)
7018See \`config.log' for more details." "$LINENO" 5; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007019 else
7020 ac_cv_sizeof_long_double=0
7021 fi
7022fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007023
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007024fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7026$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007027
7028
7029
7030cat >>confdefs.h <<_ACEOF
7031#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7032_ACEOF
7033
7034
7035fi
7036
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7038$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007039have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007041/* end confdefs.h. */
7042
7043int
7044main ()
7045{
7046_Bool x; x = (_Bool)0;
7047 ;
7048 return 0;
7049}
7050_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007051if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007052
7053
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007054$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007055
7056 have_c99_bool=yes
7057
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007058fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7061$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007062if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007063# The cast to long int works around a bug in the HP C Compiler
7064# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7065# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7066# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7068$as_echo_n "checking size of _Bool... " >&6; }
7069if test "${ac_cv_sizeof__Bool+set}" = set; then :
7070 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007071else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007072 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 +00007073
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007074else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007075 if test "$ac_cv_type__Bool" = yes; then
7076 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7077$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7078{ as_fn_set_status 77
7079as_fn_error "cannot compute sizeof (_Bool)
7080See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007081 else
7082 ac_cv_sizeof__Bool=0
7083 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007084fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007085
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007086fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7088$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007089
7090
7091
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007092cat >>confdefs.h <<_ACEOF
7093#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7094_ACEOF
7095
7096
7097fi
7098
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007099ac_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 +00007100 #include <stdint.h>
7101 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007102 #ifdef HAVE_INTTYPES_H
7103 #include <inttypes.h>
7104 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007105"
7106if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007107
7108cat >>confdefs.h <<_ACEOF
7109#define HAVE_UINTPTR_T 1
7110_ACEOF
7111
Martin v. Löwiseba40652007-08-30 20:10:57 +00007112# The cast to long int works around a bug in the HP C Compiler
7113# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7114# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7115# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7117$as_echo_n "checking size of uintptr_t... " >&6; }
7118if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7119 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007120else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007121 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 +00007122
Martin v. Löwis11437992002-04-12 09:54:03 +00007123else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007124 if test "$ac_cv_type_uintptr_t" = yes; then
7125 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7126$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7127{ as_fn_set_status 77
7128as_fn_error "cannot compute sizeof (uintptr_t)
7129See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007130 else
7131 ac_cv_sizeof_uintptr_t=0
7132 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007133fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007134
Martin v. Löwis11437992002-04-12 09:54:03 +00007135fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7137$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007138
7139
7140
Martin v. Löwis11437992002-04-12 09:54:03 +00007141cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007142#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007143_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007144
Michael W. Hudson54241132001-12-07 15:38:26 +00007145
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007146fi
7147
Martin v. Löwisebe26702006-10-02 14:55:51 +00007148
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007149# The cast to long int works around a bug in the HP C Compiler
7150# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7151# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7152# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7154$as_echo_n "checking size of off_t... " >&6; }
7155if test "${ac_cv_sizeof_off_t+set}" = set; then :
7156 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007157else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007158 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007159#ifdef HAVE_SYS_TYPES_H
7160#include <sys/types.h>
7161#endif
7162
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007163"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007164
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007165else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007166 if test "$ac_cv_type_off_t" = yes; then
7167 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7169{ as_fn_set_status 77
7170as_fn_error "cannot compute sizeof (off_t)
7171See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007172 else
7173 ac_cv_sizeof_off_t=0
7174 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007175fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007176
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007177fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7179$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007180
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007181
7182
Martin v. Löwis11437992002-04-12 09:54:03 +00007183cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007184#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007185_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007186
Michael W. Hudson54241132001-12-07 15:38:26 +00007187
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007188
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7190$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007191if test "$have_long_long" = yes
7192then
7193if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007194 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007195
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007196$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007197
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7199$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007200else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7202$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007203fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007204else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7206$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007207fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007208
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007209# The cast to long int works around a bug in the HP C Compiler
7210# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7211# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7212# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7214$as_echo_n "checking size of time_t... " >&6; }
7215if test "${ac_cv_sizeof_time_t+set}" = set; then :
7216 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007217else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007218 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007219#ifdef HAVE_SYS_TYPES_H
7220#include <sys/types.h>
7221#endif
7222#ifdef HAVE_TIME_H
7223#include <time.h>
7224#endif
7225
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007226"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007227
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007228else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007229 if test "$ac_cv_type_time_t" = yes; then
7230 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7231$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7232{ as_fn_set_status 77
7233as_fn_error "cannot compute sizeof (time_t)
7234See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007235 else
7236 ac_cv_sizeof_time_t=0
7237 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007238fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007239
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007240fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7242$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007243
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007244
7245
Martin v. Löwis11437992002-04-12 09:54:03 +00007246cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007247#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007248_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007249
Michael W. Hudson54241132001-12-07 15:38:26 +00007250
7251
Trent Mick635f6fb2000-08-23 21:33:05 +00007252# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007253ac_save_cc="$CC"
7254if test "$ac_cv_kpthread" = "yes"
7255then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007256elif test "$ac_cv_kthread" = "yes"
7257then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007258elif test "$ac_cv_pthread" = "yes"
7259then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007260fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7262$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007263have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007265/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007266
7267 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007268int
7269main ()
7270{
Guido van Rossum12580492000-09-24 16:47:19 +00007271pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007272 ;
7273 return 0;
7274}
Matthias Klosec511b472010-05-08 11:01:39 +00007275
Martin v. Löwis11437992002-04-12 09:54:03 +00007276_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007277if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007278 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7282$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007283if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007284 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007285# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7286# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7287# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7289$as_echo_n "checking size of pthread_t... " >&6; }
7290if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7291 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007292else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007293 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007294#ifdef HAVE_PTHREAD_H
7295#include <pthread.h>
7296#endif
7297
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007298"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007299
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007300else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007301 if test "$ac_cv_type_pthread_t" = yes; then
7302 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7303$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7304{ as_fn_set_status 77
7305as_fn_error "cannot compute sizeof (pthread_t)
7306See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007307 else
7308 ac_cv_sizeof_pthread_t=0
7309 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007310fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007311
Trent Mick635f6fb2000-08-23 21:33:05 +00007312fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7314$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007315
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007316
7317
Martin v. Löwis11437992002-04-12 09:54:03 +00007318cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007319#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007320_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007321
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007322
Trent Mick635f6fb2000-08-23 21:33:05 +00007323fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007324CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007325
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7327$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007328# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007329if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007330 enableval=$enable_toolbox_glue;
7331fi
Jack Jansene578a632001-08-15 01:27:14 +00007332
7333
7334if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007335then
Jack Jansene578a632001-08-15 01:27:14 +00007336 case $ac_sys_system/$ac_sys_release in
7337 Darwin/*)
7338 enable_toolbox_glue="yes";;
7339 *)
7340 enable_toolbox_glue="no";;
7341 esac
7342fi
7343case "$enable_toolbox_glue" in
7344yes)
Jack Jansene578a632001-08-15 01:27:14 +00007345 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007346 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007347
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007348$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007349
7350 ;;
7351*)
Jack Jansene578a632001-08-15 01:27:14 +00007352 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007353 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007354 ;;
7355esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7357$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007358
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007359
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007360
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007361case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007362 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007363 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7364 ;;
7365 Darwin/*)
7366 OTHER_LIBTOOL_OPT=""
7367 ;;
7368esac
7369
7370
Ronald Oussoren25967582009-09-06 10:00:26 +00007371ARCH_RUN_32BIT=""
7372
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007373case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007374 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00007375 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7376 if test "${enable_universalsdk}"; then
7377 :
7378 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007379 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007380 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007381 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007382 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007383 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00007384 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007385 if test ${gcc_version} '<' 4.0
7386 then
7387 LIBTOOL_CRUFT="-lcc_dynamic"
7388 else
7389 LIBTOOL_CRUFT=""
7390 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007391 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00007392 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00007393else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007395/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00007396
Ronald Oussoren25967582009-09-06 10:00:26 +00007397 #include <unistd.h>
7398 int main(int argc, char*argv[])
7399 {
7400 if (sizeof(long) == 4) {
7401 return 0;
7402 } else {
7403 return 1;
7404 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00007405 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00007406
Ronald Oussoren25967582009-09-06 10:00:26 +00007407_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007408if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00007409 ac_osx_32bit=yes
7410else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007411 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00007412fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007413rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7414 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007415fi
7416
7417
Ronald Oussoren25967582009-09-06 10:00:26 +00007418 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007419 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007420 i386)
7421 MACOSX_DEFAULT_ARCH="i386"
7422 ;;
7423 ppc)
7424 MACOSX_DEFAULT_ARCH="ppc"
7425 ;;
7426 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007427 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007428 ;;
7429 esac
7430 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007431 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007432 i386)
7433 MACOSX_DEFAULT_ARCH="x86_64"
7434 ;;
7435 ppc)
7436 MACOSX_DEFAULT_ARCH="ppc64"
7437 ;;
7438 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007439 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007440 ;;
7441 esac
7442
7443 #ARCH_RUN_32BIT="true"
7444 fi
7445
7446 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007447 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007448 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007449esac
7450
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7452$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007453if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007454then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007455 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007456 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007457 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007458
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007459$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007460
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7462$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00007463 if test $enable_shared = "yes"
7464 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007465 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 +00007466 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007467else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7469$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007470fi
7471
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7473$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007474case $ac_sys_system/$ac_sys_release in
7475 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007476
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007477$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007478
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7480$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007481 ;;
7482 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7484$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007485 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007486esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007487
Guido van Rossum0a516c91994-09-12 10:58:40 +00007488# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007489
Michael W. Hudson54241132001-12-07 15:38:26 +00007490
7491
7492
7493
Ronald Oussoren75912852010-04-08 08:13:31 +00007494
Guido van Rossum0a516c91994-09-12 10:58:40 +00007495# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007496# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7498$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007499if test -z "$SO"
7500then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007501 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00007502 hp*|HP*)
7503 case `uname -m` in
7504 ia64) SO=.so;;
7505 *) SO=.sl;;
7506 esac
7507 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007508 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007509 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007510 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007511else
7512 # this might also be a termcap variable, see #610332
7513 echo
7514 echo '====================================================================='
7515 echo '+ +'
7516 echo '+ WARNING: You have set SO in your environment. +'
7517 echo '+ Do you really mean to change the extension for shared libraries? +'
7518 echo '+ Continuing in 10 seconds to let you to ponder. +'
7519 echo '+ +'
7520 echo '====================================================================='
7521 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007522fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7524$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00007525
Ronald Oussoren79f90492009-01-02 10:44:46 +00007526
Neal Norwitz58e28882006-05-19 07:00:58 +00007527cat >>confdefs.h <<_ACEOF
7528#define SHLIB_EXT "$SO"
7529_ACEOF
7530
Guido van Rossum0a516c91994-09-12 10:58:40 +00007531# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007532# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007533# (Shared libraries in this instance are shared modules to be loaded into
7534# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7536$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007537if test -z "$LDSHARED"
7538then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007539 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007540 AIX*)
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00007541 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp -L\$(srcdir)"
Guido van Rossumce608b02001-09-28 15:59:38 +00007542 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007543 ;;
7544 BeOS*)
7545 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00007546 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007547 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007548 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007549 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007550 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007551 if test "$GCC" = "yes" ; then
7552 LDSHARED='$(CC) -shared'
7553 LDCXXSHARED='$(CXX) -shared'
7554 else
7555 LDSHARED='$(CC) -G'
7556 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00007557 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00007558 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007559 if test "$GCC" = "yes" ; then
7560 LDSHARED='$(CC) -shared'
7561 LDCXXSHARED='$(CXX) -shared'
7562 else
7563 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00007564 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007565 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007566 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00007567 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +00007568 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007569 if test "$enable_framework" ; then
7570 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007571 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7572 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007573 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007574 else
7575 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007576 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00007577 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007578 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007579 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00007580 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +00007581 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007582 if test "$enable_framework" ; then
7583 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007584 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7585 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007586 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007587 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007588 # No framework, use the Python app as bundle-loader
7589 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007590 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007591 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007592 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007593 Darwin/*)
7594 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7595 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00007596
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007597 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007598 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00007599 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007600 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007601 fi
Jack Jansen6b08a402004-06-03 12:41:45 +00007602 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Ronald Oussoren75912852010-04-08 08:13:31 +00007603 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007604 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007605 else
7606 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +00007607 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +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 Jansen6b08a402004-06-03 12:41:45 +00007613 else
7614 # No framework, use the Python app as bundle-loader
7615 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7616 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007617 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007618 fi
7619 fi
7620 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007621 Linux*|GNU*|QNX*)
7622 LDSHARED='$(CC) -shared'
7623 LDCXXSHARED='$(CXX) -shared';;
7624 BSD/OS*/4*)
7625 LDSHARED="gcc -shared"
7626 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007627 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007628 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007629 then
Benjamin Peterson3b2abe92010-03-14 15:06:14 +00007630 LDSHARED='$(CC) -shared ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +00007631 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007632 else
7633 LDSHARED="ld -Bshareable ${LDFLAGS}"
7634 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007635 OpenBSD*)
7636 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7637 then
7638 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +00007639 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007640 else
7641 case `uname -r` in
7642 [01].* | 2.[0-7] | 2.[0-7].*)
7643 LDSHARED="ld -Bshareable ${LDFLAGS}"
7644 ;;
7645 *)
7646 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +00007647 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007648 ;;
7649 esac
7650 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007651 NetBSD*|DragonFly*)
7652 LDSHARED="cc -shared ${LDFLAGS}"
7653 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007654 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007655 if test "$GCC" = "yes" ; then
7656 LDSHARED='$(CC) -shared'
7657 LDCXXSHARED='$(CXX) -shared'
7658 else
7659 LDSHARED='$(CC) -G'
7660 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007661 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007662 SCO_SV*)
7663 LDSHARED='$(CC) -Wl,-G,-Bexport'
7664 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7665 CYGWIN*)
7666 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7667 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
7668 atheos*)
7669 LDSHARED="gcc -shared"
7670 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007671 *) LDSHARED="ld";;
7672 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007673fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7675$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00007676LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007677BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007678# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007679# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7681$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007682if test -z "$CCSHARED"
7683then
Guido van Rossum07397971997-04-29 21:49:50 +00007684 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007685 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00007686 then CCSHARED="-fPIC";
7687 elif test `uname -p` = sparc;
7688 then CCSHARED="-xcode=pic32";
7689 else CCSHARED="-Kpic";
7690 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007691 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007692 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007693 else CCSHARED="+z";
7694 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007695 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007696 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007697 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007698 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007699 if test "$GCC" = "yes"
7700 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007701 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007702 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007703 SCO_SV*)
7704 if test "$GCC" = "yes"
7705 then CCSHARED="-fPIC"
7706 else CCSHARED="-Kpic -belf"
7707 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007708 IRIX*/6*) case $CC in
7709 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007710 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007711 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007712 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007713 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007714fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7716$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007717# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007718# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7720$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007721if test -z "$LINKFORSHARED"
7722then
Guido van Rossum07397971997-04-29 21:49:50 +00007723 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007724 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007725 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007726 LINKFORSHARED="-Wl,-E -Wl,+s";;
7727# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007728 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007729 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007730 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007731 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007732 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
7733 # which is
Jack Jansene578a632001-08-15 01:27:14 +00007734 # not used by the core itself but which needs to be in the core so
7735 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00007736 # -prebind is no longer used, because it actually seems to give a
7737 # slowdown in stead of a speedup, maybe due to the large number of
7738 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007739
7740 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00007741 if test "$enable_framework"
7742 then
Jack Jansenda49e192005-01-07 13:08:22 +00007743 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007744 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007745 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007746 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007747 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007748 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007749 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007750 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7751 then
7752 LINKFORSHARED="-Wl,--export-dynamic"
7753 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007754 SunOS/5*) case $CC in
7755 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007756 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007757 then
7758 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007759 fi;;
7760 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007761 CYGWIN*)
7762 if test $enable_shared = "no"
7763 then
7764 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7765 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007766 QNX*)
7767 # -Wl,-E causes the symbols to be added to the dynamic
7768 # symbol table so that they can be found when a module
7769 # is loaded. -N 2048K causes the stack size to be set
7770 # to 2048 kilobytes so that the stack doesn't overflow
7771 # when running test_compile.py.
7772 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007773 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007774fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7776$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007777
Michael W. Hudson54241132001-12-07 15:38:26 +00007778
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007779
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7781$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007782if test ! "$LIBRARY" = "$LDLIBRARY"
7783then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007784 case $ac_sys_system in
7785 CYGWIN*)
7786 # Cygwin needs CCSHARED when building extension DLLs
7787 # but not when building the interpreter DLL.
7788 CFLAGSFORSHARED='';;
7789 *)
7790 CFLAGSFORSHARED='$(CCSHARED)'
7791 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007792fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7794$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007795
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007796# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7797# library (with --enable-shared).
7798# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007799# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7800# if it is not required, since it creates a dependency of the shared library
7801# to LIBS. This, in turn, means that applications linking the shared libpython
7802# don't need to link LIBS explicitly. The default should be only changed
7803# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007804
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7806$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007807case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007808 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007809 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007810esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7812$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007813
7814
Guido van Rossum627b2d71993-12-24 10:39:16 +00007815# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7817$as_echo_n "checking for dlopen in -ldl... " >&6; }
7818if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7819 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007820else
Martin v. Löwis11437992002-04-12 09:54:03 +00007821 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007822LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007825
Martin v. Löwiseba40652007-08-30 20:10:57 +00007826/* Override any GCC internal prototype to avoid an error.
7827 Use char because int might match the return type of a GCC
7828 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007829#ifdef __cplusplus
7830extern "C"
7831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007832char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007833int
7834main ()
7835{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007836return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007837 ;
7838 return 0;
7839}
7840_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007841if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007842 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007843else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007844 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007845fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007846rm -f core conftest.err conftest.$ac_objext \
7847 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007848LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007849fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7851$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7852if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007853 cat >>confdefs.h <<_ACEOF
7854#define HAVE_LIBDL 1
7855_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007856
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007857 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007858
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007859fi
7860 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7862$as_echo_n "checking for shl_load in -ldld... " >&6; }
7863if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7864 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007865else
Martin v. Löwis11437992002-04-12 09:54:03 +00007866 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007867LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007870
Martin v. Löwiseba40652007-08-30 20:10:57 +00007871/* Override any GCC internal prototype to avoid an error.
7872 Use char because int might match the return type of a GCC
7873 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007874#ifdef __cplusplus
7875extern "C"
7876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007877char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007878int
7879main ()
7880{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007881return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007882 ;
7883 return 0;
7884}
7885_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007886if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007887 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007888else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007889 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007890fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007891rm -f core conftest.err conftest.$ac_objext \
7892 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007893LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007894fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7896$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7897if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007898 cat >>confdefs.h <<_ACEOF
7899#define HAVE_LIBDLD 1
7900_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007901
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007902 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007903
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007904fi
7905 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007906
Ronald Oussoren79f90492009-01-02 10:44:46 +00007907# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007908if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7910$as_echo_n "checking for library containing sem_init... " >&6; }
7911if test "${ac_cv_search_sem_init+set}" = set; then :
7912 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007913else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007914 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007916/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007917
Martin v. Löwiseba40652007-08-30 20:10:57 +00007918/* Override any GCC internal prototype to avoid an error.
7919 Use char because int might match the return type of a GCC
7920 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007921#ifdef __cplusplus
7922extern "C"
7923#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007924char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007925int
7926main ()
7927{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007928return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007929 ;
7930 return 0;
7931}
7932_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007933for ac_lib in '' pthread rt posix4; do
7934 if test -z "$ac_lib"; then
7935 ac_res="none required"
7936 else
7937 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007938 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007939 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007940 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007941 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007942fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007943rm -f core conftest.err conftest.$ac_objext \
7944 conftest$ac_exeext
7945 if test "${ac_cv_search_sem_init+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007946 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007948done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007949if test "${ac_cv_search_sem_init+set}" = set; then :
7950
Martin v. Löwiseba40652007-08-30 20:10:57 +00007951else
7952 ac_cv_search_sem_init=no
7953fi
7954rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007955LIBS=$ac_func_search_save_LIBS
7956fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7958$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007959ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007960if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007961 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007962
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007963fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007964 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007965 # posix4 on Solaris 2.6
7966 # pthread (first!) on Linux
7967fi
7968
Martin v. Löwis19d17342003-06-14 21:03:05 +00007969# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7971$as_echo_n "checking for textdomain in -lintl... " >&6; }
7972if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7973 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007974else
7975 ac_check_lib_save_LIBS=$LIBS
7976LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007978/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007979
Martin v. Löwiseba40652007-08-30 20:10:57 +00007980/* Override any GCC internal prototype to avoid an error.
7981 Use char because int might match the return type of a GCC
7982 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007983#ifdef __cplusplus
7984extern "C"
7985#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007986char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007987int
7988main ()
7989{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007990return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007991 ;
7992 return 0;
7993}
7994_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007995if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007996 ac_cv_lib_intl_textdomain=yes
7997else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007998 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007999fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008000rm -f core conftest.err conftest.$ac_objext \
8001 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008002LIBS=$ac_check_lib_save_LIBS
8003fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8005$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
8006if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008007
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008008$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008009
8010fi
8011
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008012
8013# checks for system dependent C++ extensions support
8014case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008015 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8016$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008018/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008019
8020 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008021int
8022main ()
8023{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008024loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008025 ;
8026 return 0;
8027}
Matthias Klosec511b472010-05-08 11:01:39 +00008028
Martin v. Löwis11437992002-04-12 09:54:03 +00008029_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008030if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008031
Matthias Klosec511b472010-05-08 11:01:39 +00008032
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008033$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008034
Matthias Klosec511b472010-05-08 11:01:39 +00008035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008036$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008037
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008038else
Matthias Klosec511b472010-05-08 11:01:39 +00008039
8040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008041$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008042
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008043fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008044rm -f core conftest.err conftest.$ac_objext \
8045 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008046 *) ;;
8047esac
8048
Guido van Rossum70c7f481998-03-26 18:44:10 +00008049# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008050# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8052$as_echo_n "checking for t_open in -lnsl... " >&6; }
8053if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
8054 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008055else
Martin v. Löwis11437992002-04-12 09:54:03 +00008056 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008057LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008060
Martin v. Löwiseba40652007-08-30 20:10:57 +00008061/* Override any GCC internal prototype to avoid an error.
8062 Use char because int might match the return type of a GCC
8063 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008064#ifdef __cplusplus
8065extern "C"
8066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008067char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008068int
8069main ()
8070{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008071return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008072 ;
8073 return 0;
8074}
8075_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008076if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008077 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008078else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008079 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008080fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008081rm -f core conftest.err conftest.$ac_objext \
8082 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008083LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008084fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8086$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
8087if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008088 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008089fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008090 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8092$as_echo_n "checking for socket in -lsocket... " >&6; }
8093if test "${ac_cv_lib_socket_socket+set}" = set; then :
8094 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008095else
Martin v. Löwis11437992002-04-12 09:54:03 +00008096 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008097LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008100
Martin v. Löwiseba40652007-08-30 20:10:57 +00008101/* Override any GCC internal prototype to avoid an error.
8102 Use char because int might match the return type of a GCC
8103 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008104#ifdef __cplusplus
8105extern "C"
8106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008107char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008108int
8109main ()
8110{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008111return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008112 ;
8113 return 0;
8114}
8115_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008116if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008117 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008118else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008119 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008120fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008121rm -f core conftest.err conftest.$ac_objext \
8122 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008123LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008124fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8126$as_echo "$ac_cv_lib_socket_socket" >&6; }
8127if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008128 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008129fi
8130 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008131
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008132case "$ac_sys_system" in
8133BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8135$as_echo_n "checking for socket in -lnet... " >&6; }
8136if test "${ac_cv_lib_net_socket+set}" = set; then :
8137 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008138else
Martin v. Löwis11437992002-04-12 09:54:03 +00008139 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008140LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008143
Martin v. Löwiseba40652007-08-30 20:10:57 +00008144/* Override any GCC internal prototype to avoid an error.
8145 Use char because int might match the return type of a GCC
8146 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008147#ifdef __cplusplus
8148extern "C"
8149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008150char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008151int
8152main ()
8153{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008154return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008155 ;
8156 return 0;
8157}
8158_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008159if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008161else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008162 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008163fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008164rm -f core conftest.err conftest.$ac_objext \
8165 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008166LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008167fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8169$as_echo "$ac_cv_lib_net_socket" >&6; }
8170if test "x$ac_cv_lib_net_socket" = x""yes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008171 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008172fi
8173 # BeOS
8174;;
8175esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008176
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8178$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008179
Martin v. Löwiseba40652007-08-30 20:10:57 +00008180# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008181if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008182 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8184$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008185LIBS="$withval $LIBS"
8186
8187else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8189$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008190fi
8191
Guido van Rossum7f43da71994-08-01 12:15:30 +00008192
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008193if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008194 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8195set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8197$as_echo_n "checking for $ac_word... " >&6; }
8198if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8199 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008200else
8201 case $PKG_CONFIG in
8202 [\\/]* | ?:[\\/]*)
8203 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8204 ;;
8205 *)
8206 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8207for as_dir in $PATH
8208do
8209 IFS=$as_save_IFS
8210 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008211 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008212 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8213 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008214 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008215 break 2
8216 fi
8217done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008218 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008219IFS=$as_save_IFS
8220
8221 ;;
8222esac
8223fi
8224PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8225if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8227$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008228else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8230$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008231fi
8232
8233
8234fi
8235if test -z "$ac_cv_path_PKG_CONFIG"; then
8236 ac_pt_PKG_CONFIG=$PKG_CONFIG
8237 # Extract the first word of "pkg-config", so it can be a program name with args.
8238set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8240$as_echo_n "checking for $ac_word... " >&6; }
8241if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8242 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008243else
8244 case $ac_pt_PKG_CONFIG in
8245 [\\/]* | ?:[\\/]*)
8246 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8247 ;;
8248 *)
8249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8250for as_dir in $PATH
8251do
8252 IFS=$as_save_IFS
8253 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008254 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008255 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8256 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008257 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008258 break 2
8259 fi
8260done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008261 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008262IFS=$as_save_IFS
8263
8264 ;;
8265esac
8266fi
8267ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8268if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8270$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008271else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8273$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008274fi
8275
8276 if test "x$ac_pt_PKG_CONFIG" = x; then
8277 PKG_CONFIG=""
8278 else
8279 case $cross_compiling:$ac_tool_warned in
8280yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008281{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8282$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008283ac_tool_warned=yes ;;
8284esac
8285 PKG_CONFIG=$ac_pt_PKG_CONFIG
8286 fi
8287else
8288 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8289fi
8290
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008291
8292# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8294$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008295
8296# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008297if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008298 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008299else
8300 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008301fi
8302
8303
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8305$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008306
8307# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8309$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008310
8311# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008312if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008313 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008314else
8315 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008316fi
8317
8318
8319if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008320 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8321else
8322 LIBFFI_INCLUDEDIR=""
8323fi
8324
8325
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8327$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008328
Benjamin Peterson867475c2009-04-29 20:36:25 +00008329# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8331$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008332
8333# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008334if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008335 withval=$with_dbmliborder;
8336if test x$with_dbmliborder = xyes
8337then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008338as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008339else
8340 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8341 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8342 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008343 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008344 fi
8345 done
8346fi
8347fi
8348
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8350$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008351
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008352# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008353
8354
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8356$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008357
Martin v. Löwiseba40652007-08-30 20:10:57 +00008358# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008359if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008360 withval=$with_signal_module;
8361fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008362
8363
8364if test -z "$with_signal_module"
8365then with_signal_module="yes"
8366fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8368$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008369
8370if test "${with_signal_module}" = "yes"; then
8371 USE_SIGNAL_MODULE=""
8372 SIGNAL_OBJS=""
8373else
8374 USE_SIGNAL_MODULE="#"
8375 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8376fi
8377
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008378# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008379
Barry Warsawc0d24d82000-06-29 16:12:00 +00008380USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008381
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8383$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008384
Guido van Rossumec2f0731997-01-22 20:54:01 +00008385
Martin v. Löwiseba40652007-08-30 20:10:57 +00008386# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008387if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008388 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8390$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008391LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008392if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008393 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008394fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008395else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8397$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008398fi
8399
Martin v. Löwis11437992002-04-12 09:54:03 +00008400
8401# Templates for things AC_DEFINEd more than once.
8402# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008403
8404
Martin v. Löwis11437992002-04-12 09:54:03 +00008405
8406
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8408$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008409
Martin v. Löwiseba40652007-08-30 20:10:57 +00008410# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008411if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008412 withval=$with_threads;
8413fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008414
8415
Barry Warsawc0d24d82000-06-29 16:12:00 +00008416# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008417
Martin v. Löwiseba40652007-08-30 20:10:57 +00008418# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008419if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008420 withval=$with_thread; with_threads=$with_thread
8421fi
8422
Barry Warsawc0d24d82000-06-29 16:12:00 +00008423
8424if test -z "$with_threads"
8425then with_threads="yes"
8426fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8428$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00008429
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008430
Barry Warsawc0d24d82000-06-29 16:12:00 +00008431if test "$with_threads" = "no"
8432then
8433 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008434elif test "$ac_cv_pthread_is_default" = yes
8435then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008436 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008437
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008438 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008439 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008440
8441 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008442 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008443elif test "$ac_cv_kpthread" = "yes"
8444then
8445 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008446 if test "$ac_cv_cxx_thread" = "yes"; then
8447 CXX="$CXX -Kpthread"
8448 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008449 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008450
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008451 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008452 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008453elif test "$ac_cv_kthread" = "yes"
8454then
8455 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008456 if test "$ac_cv_cxx_thread" = "yes"; then
8457 CXX="$CXX -Kthread"
8458 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008459 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008460
8461 posix_threads=yes
8462 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008463elif test "$ac_cv_pthread" = "yes"
8464then
8465 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008466 if test "$ac_cv_cxx_thread" = "yes"; then
8467 CXX="$CXX -pthread"
8468 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008469 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008470
8471 posix_threads=yes
8472 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008473else
8474 if test ! -z "$with_threads" -a -d "$with_threads"
8475 then LDFLAGS="$LDFLAGS -L$with_threads"
8476 fi
8477 if test ! -z "$withval" -a -d "$withval"
8478 then LDFLAGS="$LDFLAGS -L$withval"
8479 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008480
8481 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008482 # define _POSIX_THREADS in unistd.h. Some apparently don't
8483 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8485$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008487/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008488
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008489#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008490#ifdef _POSIX_THREADS
8491yes
8492#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008493
8494_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008496 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008497 unistd_defines_pthreads=yes
8498else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008499 unistd_defines_pthreads=no
8500fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00008501rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008502
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8504$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008505
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008506 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008507
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008508 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8509if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8510 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008511
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008512 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008513
Martin v. Löwis11437992002-04-12 09:54:03 +00008514
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008515$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008516
8517 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008518 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008519else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008520
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008521 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8522if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8523 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008524
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008525 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008526
Martin v. Löwis11437992002-04-12 09:54:03 +00008527
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008528$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008529
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008530 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008531else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008532
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
8534$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008535
Martin v. Löwiseba40652007-08-30 20:10:57 +00008536# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008537if test "${with_pth+set}" = set; then :
8538 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8539$as_echo "$withval" >&6; }
8540 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008541
8542
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008543$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008544
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008545 LIBS="-lpth $LIBS"
8546 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008547else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8549$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008550
8551 # Just looking for pthread_create in libpthread is not enough:
8552 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8553 # So we really have to include pthread.h, and then link.
8554 _libs=$LIBS
8555 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8557$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008559/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008560#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008561
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008562void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008563int
8564main ()
8565{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008566
8567pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008568 ;
8569 return 0;
8570}
8571_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008572if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008573
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8575$as_echo "yes" >&6; }
8576 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008577
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008578 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008579 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008580else
Martin v. Löwis11437992002-04-12 09:54:03 +00008581
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008582 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008583 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8584if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8585 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008586
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008587 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008588 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008589else
Guido van Rossumad678af1998-10-02 14:42:15 +00008590
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008591 ac_fn_c_check_header_mongrel "$LINENO" "atheos/threads.h" "ac_cv_header_atheos_threads_h" "$ac_includes_default"
8592if test "x$ac_cv_header_atheos_threads_h" = x""yes; then :
8593 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008594
8595
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008596$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008597
8598 THREADOBJ="Python/thread.o"
8599else
8600
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008601 ac_fn_c_check_header_mongrel "$LINENO" "kernel/OS.h" "ac_cv_header_kernel_OS_h" "$ac_includes_default"
8602if test "x$ac_cv_header_kernel_OS_h" = x""yes; then :
8603 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008604
8605
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008606$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008607
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008608 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008609else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008610
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8612$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8613if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8614 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008615else
Martin v. Löwis11437992002-04-12 09:54:03 +00008616 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008617LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008620
Martin v. Löwiseba40652007-08-30 20:10:57 +00008621/* Override any GCC internal prototype to avoid an error.
8622 Use char because int might match the return type of a GCC
8623 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008624#ifdef __cplusplus
8625extern "C"
8626#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008627char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008628int
8629main ()
8630{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008631return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008632 ;
8633 return 0;
8634}
8635_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008636if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008637 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008638else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008639 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008640fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008641rm -f core conftest.err conftest.$ac_objext \
8642 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008643LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008644fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8646$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8647if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8648 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008649
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008650 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008651 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008652 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008653else
Greg Steinadf63d62000-07-05 10:38:09 +00008654
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8656$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8657if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8658 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008659else
Martin v. Löwis11437992002-04-12 09:54:03 +00008660 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008661LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008664
Martin v. Löwiseba40652007-08-30 20:10:57 +00008665/* Override any GCC internal prototype to avoid an error.
8666 Use char because int might match the return type of a GCC
8667 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008668#ifdef __cplusplus
8669extern "C"
8670#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008671char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008672int
8673main ()
8674{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008675return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008676 ;
8677 return 0;
8678}
8679_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008680if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008681 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008682else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008683 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008684fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008685rm -f core conftest.err conftest.$ac_objext \
8686 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008687LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008688fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8690$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8691if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8692 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008693
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008694 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008695 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008696 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008697else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008698
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8700$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8701if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8702 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008703else
Martin v. Löwis11437992002-04-12 09:54:03 +00008704 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008705LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008708
Martin v. Löwiseba40652007-08-30 20:10:57 +00008709/* Override any GCC internal prototype to avoid an error.
8710 Use char because int might match the return type of a GCC
8711 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008712#ifdef __cplusplus
8713extern "C"
8714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008715char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008716int
8717main ()
8718{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008719return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008720 ;
8721 return 0;
8722}
8723_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008724if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008726else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008727 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008728fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008729rm -f core conftest.err conftest.$ac_objext \
8730 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008731LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008732fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8734$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8735if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8736 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008737
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008738 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008739 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008740 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008741else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008742
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8744$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8745if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8746 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008747else
Martin v. Löwis11437992002-04-12 09:54:03 +00008748 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008749LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008752
Martin v. Löwiseba40652007-08-30 20:10:57 +00008753/* Override any GCC internal prototype to avoid an error.
8754 Use char because int might match the return type of a GCC
8755 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008756#ifdef __cplusplus
8757extern "C"
8758#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008759char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008760int
8761main ()
8762{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008763return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008764 ;
8765 return 0;
8766}
8767_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008768if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008769 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008770else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008771 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008772fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008773rm -f core conftest.err conftest.$ac_objext \
8774 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008775LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008776fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8778$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8779if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8780 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008781
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008782 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008783 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008784 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008785else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008786
Martin v. Löwis130fb172001-07-19 11:00:41 +00008787 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008788fi
8789
Guido van Rossum627b2d71993-12-24 10:39:16 +00008790
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008791fi
8792
Guido van Rossum0be3e491997-05-22 20:33:33 +00008793fi
8794
Guido van Rossum49545951997-12-02 19:28:29 +00008795fi
8796
Guido van Rossumb93a8621998-05-07 13:27:32 +00008797fi
8798
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008799
Michael W. Hudson54241132001-12-07 15:38:26 +00008800fi
8801
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008802
8803fi
8804
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008805fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008806rm -f core conftest.err conftest.$ac_objext \
8807 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008808fi
8809
Martin v. Löwis11437992002-04-12 09:54:03 +00008810fi
8811
8812
8813fi
8814
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008815
Michael W. Hudson54241132001-12-07 15:38:26 +00008816
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8818$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8819if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8820 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008821else
Martin v. Löwis11437992002-04-12 09:54:03 +00008822 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008823LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008825/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008826
Martin v. Löwiseba40652007-08-30 20:10:57 +00008827/* Override any GCC internal prototype to avoid an error.
8828 Use char because int might match the return type of a GCC
8829 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008830#ifdef __cplusplus
8831extern "C"
8832#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008833char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008834int
8835main ()
8836{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008837return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008838 ;
8839 return 0;
8840}
8841_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008842if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008843 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008845 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008846fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008847rm -f core conftest.err conftest.$ac_objext \
8848 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008849LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008850fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8852$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8853if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8854 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008855
Martin v. Löwis130fb172001-07-19 11:00:41 +00008856 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008857 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008858 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008859fi
8860
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008861
Neal Norwitza978ab02002-11-02 16:58:05 +00008862 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8864$as_echo_n "checking for thr_create in -lthread... " >&6; }
8865if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8866 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008867else
Martin v. Löwis11437992002-04-12 09:54:03 +00008868 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008869LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008872
Martin v. Löwiseba40652007-08-30 20:10:57 +00008873/* Override any GCC internal prototype to avoid an error.
8874 Use char because int might match the return type of a GCC
8875 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008876#ifdef __cplusplus
8877extern "C"
8878#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008879char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008880int
8881main ()
8882{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008883return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 ;
8885 return 0;
8886}
8887_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008888if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008889 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008890else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008891 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008892fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008893rm -f core conftest.err conftest.$ac_objext \
8894 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008895LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008896fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8898$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8899if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8900 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008901
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008902 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008903 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008904 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008905fi
8906
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008907 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008908
Martin v. Löwis130fb172001-07-19 11:00:41 +00008909 if test "$USE_THREAD_MODULE" != "#"
8910 then
8911 # If the above checks didn't disable threads, (at least) OSF1
8912 # needs this '-threads' argument during linking.
8913 case $ac_sys_system in
8914 OSF1) LDLAST=-threads;;
8915 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008916 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008917fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008918
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008919if test "$posix_threads" = "yes"; then
8920 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008921
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008922$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008923
8924 fi
8925
8926 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8927 case $ac_sys_system/$ac_sys_release in
8928 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008929$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008930
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008931 ;;
8932 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008933$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008934
8935 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +00008936 AIX/5)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008937$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00008938
8939 ;;
Antoine Pitroub41947b2010-08-30 14:55:30 +00008940 AIX/6)
8941$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8942
8943 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008944 esac
8945
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8947$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8948 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8949 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008950else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008951 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008952 ac_cv_pthread_system_supported=no
8953else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008955/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008956#include <pthread.h>
8957 void *foo(void *parm) {
8958 return NULL;
8959 }
8960 main() {
8961 pthread_attr_t attr;
8962 pthread_t id;
8963 if (pthread_attr_init(&attr)) exit(-1);
8964 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8965 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8966 exit(0);
8967 }
8968_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008969if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008970 ac_cv_pthread_system_supported=yes
8971else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008972 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008973fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008974rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8975 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008976fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008977
Martin v. Löwiseba40652007-08-30 20:10:57 +00008978
Guido van Rossum627b2d71993-12-24 10:39:16 +00008979fi
8980
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8982$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008983 if test "$ac_cv_pthread_system_supported" = "yes"; then
8984
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008985$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008986
8987 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008988 for ac_func in pthread_sigmask
8989do :
8990 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8991if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008992 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008993#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008994_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008995 case $ac_sys_system in
8996 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008997
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008998$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008999
9000 ;;
9001 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009002fi
9003done
9004
9005fi
9006
9007
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009008# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009009
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9011$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009012# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009013if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009014 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009015 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9017$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009018 ipv6=no
9019 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009020 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9021$as_echo "yes" >&6; }
9022 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009023
9024 ipv6=yes
9025 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009026 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009027else
Martin v. Löwis11437992002-04-12 09:54:03 +00009028
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009029 if test "$cross_compiling" = yes; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009030
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9032$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009033 ipv6=no
9034
9035else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009037/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009038 /* AF_INET6 available check */
9039#include <sys/types.h>
9040#include <sys/socket.h>
9041main()
9042{
9043 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9044 exit(1);
9045 else
9046 exit(0);
9047}
9048
Martin v. Löwis11437992002-04-12 09:54:03 +00009049_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009050if ac_fn_c_try_run "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009051
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9053$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009054 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009055
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009056else
Matthias Klosec511b472010-05-08 11:01:39 +00009057
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9059$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009060 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009061
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009062fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009063rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9064 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009065fi
9066
Martin v. Löwiseba40652007-08-30 20:10:57 +00009067
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009068if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9070$as_echo_n "checking if RFC2553 API is available... " >&6; }
9071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009072/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009073
9074 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009075#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009076int
9077main ()
9078{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009079struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009080 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009081 ;
9082 return 0;
9083}
Matthias Klosec511b472010-05-08 11:01:39 +00009084
Martin v. Löwis11437992002-04-12 09:54:03 +00009085_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009086if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009087
9088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009089$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009090 ipv6=yes
9091
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009092else
Matthias Klosec511b472010-05-08 11:01:39 +00009093
9094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009095$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009096 ipv6=no
9097
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009100fi
9101
9102if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009103 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009104
9105fi
9106
Martin v. Löwiseba40652007-08-30 20:10:57 +00009107fi
9108
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009109
9110ipv6type=unknown
9111ipv6lib=none
9112ipv6trylibc=no
9113
9114if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9116$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009117 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9118 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009119 case $i in
9120 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009122/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009123
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009124#include <netinet/in.h>
9125#ifdef IPV6_INRIA_VERSION
9126yes
9127#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009128_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009129if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009130 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009131 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009132fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009133rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009134
9135 ;;
9136 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009138/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009139
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009140#include <netinet/in.h>
9141#ifdef __KAME__
9142yes
9143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009144_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009146 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009147 ipv6type=$i;
9148 ipv6lib=inet6
9149 ipv6libdir=/usr/local/v6/lib
9150 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009151fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009152rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009153
9154 ;;
9155 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009157/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009158
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009159#include <features.h>
9160#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9161yes
9162#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009163_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009164if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009165 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009166 ipv6type=$i;
9167 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009168fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009169rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009170
9171 ;;
9172 linux-inet6)
9173 if test -d /usr/inet6; then
9174 ipv6type=$i
9175 ipv6lib=inet6
9176 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009177 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009178 fi
9179 ;;
9180 solaris)
9181 if test -f /etc/netconfig; then
9182 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
9183 ipv6type=$i
9184 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009185 fi
9186 fi
9187 ;;
9188 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009190/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009191
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009192#include <sys/param.h>
9193#ifdef _TOSHIBA_INET6
9194yes
9195#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009196_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009197if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009198 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009199 ipv6type=$i;
9200 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009201 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009202fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009203rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009204
9205 ;;
9206 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009208/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009209
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009210#include </usr/local/v6/include/sys/v6config.h>
9211#ifdef __V6D__
9212yes
9213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009214_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009216 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009217 ipv6type=$i;
9218 ipv6lib=v6;
9219 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009220 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009221fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009222rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009223
9224 ;;
9225 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009227/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009228
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009229#include <sys/param.h>
9230#ifdef _ZETA_MINAMI_INET6
9231yes
9232#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009233_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009234if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009235 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009236 ipv6type=$i;
9237 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009238 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009239fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009240rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009241
9242 ;;
9243 esac
9244 if test "$ipv6type" != "unknown"; then
9245 break
9246 fi
9247 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9249$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009250fi
9251
9252if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9253 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9254 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9255 echo "using lib$ipv6lib"
9256 else
9257 if test $ipv6trylibc = "yes"; then
9258 echo "using libc"
9259 else
9260 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9261 echo "You need to fetch lib$ipv6lib.a from appropriate"
9262 echo 'ipv6 kit and compile beforehand.'
9263 exit 1
9264 fi
9265 fi
9266fi
9267
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9269$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009271/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009272
9273 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009274int
9275main ()
9276{
9277FSIORefNum fRef = 0
9278 ;
9279 return 0;
9280}
Mark Dickinson0712b562010-05-08 19:13:21 +00009281
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009282_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009283if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009284
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009285
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009286$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009287
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9289$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009290
Mark Dickinson0712b562010-05-08 19:13:21 +00009291else
9292
9293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9294$as_echo "no" >&6; }
9295
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009296fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9298
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009299# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9301$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009302
Martin v. Löwiseba40652007-08-30 20:10:57 +00009303# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009304if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009305 withval=$with_doc_strings;
9306fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009307
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009308
9309if test -z "$with_doc_strings"
9310then with_doc_strings="yes"
9311fi
9312if test "$with_doc_strings" != "no"
9313then
9314
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009315$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009316
9317fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9319$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009320
Neil Schemenauera35c6882001-02-27 04:45:05 +00009321# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9323$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009324
Martin v. Löwiseba40652007-08-30 20:10:57 +00009325# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009326if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009327 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009328if test "$withval" != no
9329then
9330
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009331$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009332
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9334$as_echo "yes" >&6; }
9335else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9336$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009337fi
9338else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9340$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009341fi
9342
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009343
9344# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9346$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009347
Martin v. Löwiseba40652007-08-30 20:10:57 +00009348# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009349if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009350 withval=$with_pymalloc;
9351fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009352
Neil Schemenauera35c6882001-02-27 04:45:05 +00009353
Neil Schemenauer16c22972002-03-22 15:34:49 +00009354if test -z "$with_pymalloc"
9355then with_pymalloc="yes"
9356fi
9357if test "$with_pymalloc" != "no"
9358then
Martin v. Löwis11437992002-04-12 09:54:03 +00009359
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009360$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009361
9362fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9364$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009365
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009366# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9368$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009369
9370# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009371if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009372 withval=$with_valgrind;
9373else
9374 with_valgrind=no
9375fi
9376
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9378$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009379if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009380 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9381if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009382
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009383$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009384
9385else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009386 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009387
9388fi
9389
9390
9391fi
9392
Barry Warsawef82cd72000-06-30 16:21:01 +00009393# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9395$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009396
Martin v. Löwiseba40652007-08-30 20:10:57 +00009397# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009398if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009399 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009400if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009401then
9402
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009403$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009404
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9406$as_echo "yes" >&6; }
9407else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9408$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009409fi
9410else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9412$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009413fi
9414
Barry Warsawef82cd72000-06-30 16:21:01 +00009415
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009416# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009417
Guido van Rossum98935bf2001-09-05 19:13:16 +00009418DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009419
Guido van Rossume97ee181999-12-20 21:27:22 +00009420# the dlopen() function means we might want to use dynload_shlib.o. some
9421# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009422for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009423do :
9424 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9425if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009426 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009427#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009428_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009429
Guido van Rossume97ee181999-12-20 21:27:22 +00009430fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009431done
Guido van Rossume97ee181999-12-20 21:27:22 +00009432
Michael W. Hudson54241132001-12-07 15:38:26 +00009433
Guido van Rossume97ee181999-12-20 21:27:22 +00009434# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9435# loading of modules.
9436
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9438$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009439if test -z "$DYNLOADFILE"
9440then
9441 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009442 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9443 if test "$ac_cv_func_dlopen" = yes
9444 then DYNLOADFILE="dynload_shlib.o"
9445 else DYNLOADFILE="dynload_aix.o"
9446 fi
9447 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009448 BeOS*) DYNLOADFILE="dynload_beos.o";;
9449 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +00009450 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9451 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009452 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009453 *)
9454 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9455 # out any dynamic loading
9456 if test "$ac_cv_func_dlopen" = yes
9457 then DYNLOADFILE="dynload_shlib.o"
9458 else DYNLOADFILE="dynload_stub.o"
9459 fi
9460 ;;
9461 esac
9462fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9464$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009465if test "$DYNLOADFILE" != "dynload_stub.o"
9466then
Martin v. Löwis11437992002-04-12 09:54:03 +00009467
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009468$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009469
9470fi
9471
Neil Schemenauer4e425612001-06-19 15:44:15 +00009472# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9473
Michael W. Hudson54241132001-12-07 15:38:26 +00009474
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9476$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009477if test -z "$MACHDEP_OBJS"
9478then
Jack Jansene578a632001-08-15 01:27:14 +00009479 MACHDEP_OBJS=$extra_machdep_objs
9480else
9481 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009482fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9484$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009485
Guido van Rossum627b2d71993-12-24 10:39:16 +00009486# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +00009487for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9488 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009489 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009490 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +00009491 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009492 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009493 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +00009494 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9495 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +00009496 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009497 setlocale setregid setreuid setresuid setresgid \
9498 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +00009499 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009500 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +00009501 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009502do :
9503 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9504ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9505eval as_val=\$$as_ac_var
9506 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009507 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009508#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009509_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009510
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009511fi
9512done
9513
Michael W. Hudson54241132001-12-07 15:38:26 +00009514
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009515# For some functions, having a definition is not sufficient, since
9516# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9518$as_echo_n "checking for chroot... " >&6; }
9519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009520/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009521#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009522int
9523main ()
9524{
9525void *x=chroot
9526 ;
9527 return 0;
9528}
9529_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009530if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009531
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009532$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009533
Matthias Klosec511b472010-05-08 11:01:39 +00009534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009535$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009536else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9538$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009539
9540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9543$as_echo_n "checking for link... " >&6; }
9544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009545/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009546#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009547int
9548main ()
9549{
9550void *x=link
9551 ;
9552 return 0;
9553}
9554_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009555if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009556
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009557$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009558
Matthias Klosec511b472010-05-08 11:01:39 +00009559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009560$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009561else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9563$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009564
9565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9568$as_echo_n "checking for symlink... " >&6; }
9569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009570/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009571#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009572int
9573main ()
9574{
9575void *x=symlink
9576 ;
9577 return 0;
9578}
9579_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009580if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009581
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009582$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009583
Matthias Klosec511b472010-05-08 11:01:39 +00009584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009585$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009586else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9588$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009589
9590fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9593$as_echo_n "checking for fchdir... " >&6; }
9594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009595/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009596#include <unistd.h>
9597int
9598main ()
9599{
9600void *x=fchdir
9601 ;
9602 return 0;
9603}
9604_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009605if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009606
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009607$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009608
Matthias Klosec511b472010-05-08 11:01:39 +00009609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009610$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009611else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9613$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009614
9615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9618$as_echo_n "checking for fsync... " >&6; }
9619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009620/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009621#include <unistd.h>
9622int
9623main ()
9624{
9625void *x=fsync
9626 ;
9627 return 0;
9628}
9629_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009630if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009631
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009632$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009633
Matthias Klosec511b472010-05-08 11:01:39 +00009634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009635$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9638$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009639
9640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9643$as_echo_n "checking for fdatasync... " >&6; }
9644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009645/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009646#include <unistd.h>
9647int
9648main ()
9649{
9650void *x=fdatasync
9651 ;
9652 return 0;
9653}
9654_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009655if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009656
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009657$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009658
Matthias Klosec511b472010-05-08 11:01:39 +00009659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009660$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009661else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9663$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009664
9665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9668$as_echo_n "checking for epoll... " >&6; }
9669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009670/* end confdefs.h. */
9671#include <sys/epoll.h>
9672int
9673main ()
9674{
9675void *x=epoll_create
9676 ;
9677 return 0;
9678}
9679_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009680if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009681
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009682$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009683
Matthias Klosec511b472010-05-08 11:01:39 +00009684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009685$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009686else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9688$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009689
9690fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9693$as_echo_n "checking for kqueue... " >&6; }
9694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009695/* end confdefs.h. */
9696
9697#include <sys/types.h>
9698#include <sys/event.h>
9699
9700int
9701main ()
9702{
9703int x=kqueue()
9704 ;
9705 return 0;
9706}
9707_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009708if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009709
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009710$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009711
Matthias Klosec511b472010-05-08 11:01:39 +00009712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009713$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009714else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9716$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009717
9718fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009720# On some systems (eg. FreeBSD 5), we would find a definition of the
9721# functions ctermid_r, setgroups in the library, but no prototype
9722# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9723# address to avoid compiler warnings and potential miscompilations
9724# because of the missing prototypes.
9725
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9727$as_echo_n "checking for ctermid_r... " >&6; }
9728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009729/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009730
Martin v. Löwisd5843682002-11-21 20:41:28 +00009731#include <stdio.h>
9732
Martin v. Löwisd5843682002-11-21 20:41:28 +00009733int
9734main ()
9735{
9736void* p = ctermid_r
9737 ;
9738 return 0;
9739}
9740_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009741if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009742
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009743$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009744
Matthias Klosec511b472010-05-08 11:01:39 +00009745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009746$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009747else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9749$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009750
9751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9753
Antoine Pitroub170f172010-09-10 18:47:36 +00009754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9755$as_echo_n "checking for flock declaration... " >&6; }
9756if test "${ac_cv_flock_decl+set}" = set; then :
9757 $as_echo_n "(cached) " >&6
9758else
9759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009760/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009761#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009762int
9763main ()
9764{
9765void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +00009766
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009767 ;
9768 return 0;
9769}
9770_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009771if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009772 ac_cv_flock_decl=yes
9773else
9774 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009775
9776fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +00009778
Antoine Pitroub170f172010-09-10 18:47:36 +00009779fi
9780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9781$as_echo "$ac_cv_flock_decl" >&6; }
9782if test "x${ac_cv_flock_decl}" = xyes; then
9783 for ac_func in flock
9784do :
9785 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
9786if test "x$ac_cv_func_flock" = x""yes; then :
9787 cat >>confdefs.h <<_ACEOF
9788#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +00009789_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +00009790
Antoine Pitrou85729812010-09-07 14:55:24 +00009791else
Antoine Pitroub170f172010-09-10 18:47:36 +00009792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +00009793$as_echo_n "checking for flock in -lbsd... " >&6; }
9794if test "${ac_cv_lib_bsd_flock+set}" = set; then :
9795 $as_echo_n "(cached) " >&6
9796else
9797 ac_check_lib_save_LIBS=$LIBS
9798LIBS="-lbsd $LIBS"
9799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9800/* end confdefs.h. */
9801
9802/* Override any GCC internal prototype to avoid an error.
9803 Use char because int might match the return type of a GCC
9804 builtin and then its argument prototype would still apply. */
9805#ifdef __cplusplus
9806extern "C"
9807#endif
9808char flock ();
9809int
9810main ()
9811{
9812return flock ();
9813 ;
9814 return 0;
9815}
9816_ACEOF
9817if ac_fn_c_try_link "$LINENO"; then :
9818 ac_cv_lib_bsd_flock=yes
9819else
9820 ac_cv_lib_bsd_flock=no
9821fi
9822rm -f core conftest.err conftest.$ac_objext \
9823 conftest$ac_exeext conftest.$ac_ext
9824LIBS=$ac_check_lib_save_LIBS
9825fi
9826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9827$as_echo "$ac_cv_lib_bsd_flock" >&6; }
9828if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009829 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +00009830
9831
9832$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9833
9834
9835fi
9836
9837
9838fi
Antoine Pitroub170f172010-09-10 18:47:36 +00009839done
9840
Antoine Pitrou85729812010-09-07 14:55:24 +00009841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009842
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9844$as_echo_n "checking for getpagesize... " >&6; }
9845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009846/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009847
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009848#include <unistd.h>
9849
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009850int
9851main ()
9852{
9853void* p = getpagesize
9854 ;
9855 return 0;
9856}
9857_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009858if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009859
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009860$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009861
Matthias Klosec511b472010-05-08 11:01:39 +00009862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009863$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009864else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9866$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009867
9868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009870
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009871for ac_prog in true
9872do
9873 # Extract the first word of "$ac_prog", so it can be a program name with args.
9874set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9876$as_echo_n "checking for $ac_word... " >&6; }
9877if test "${ac_cv_prog_TRUE+set}" = set; then :
9878 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009879else
9880 if test -n "$TRUE"; then
9881 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9882else
9883as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9884for as_dir in $PATH
9885do
9886 IFS=$as_save_IFS
9887 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009888 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00009889 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 +00009890 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009891 $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 +00009892 break 2
9893 fi
9894done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009895 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00009896IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009897
9898fi
9899fi
9900TRUE=$ac_cv_prog_TRUE
9901if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9903$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009904else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9906$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009907fi
9908
Martin v. Löwiseba40652007-08-30 20:10:57 +00009909
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009910 test -n "$TRUE" && break
9911done
9912test -n "$TRUE" || TRUE="/bin/true"
9913
9914
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9916$as_echo_n "checking for inet_aton in -lc... " >&6; }
9917if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9918 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009919else
9920 ac_check_lib_save_LIBS=$LIBS
9921LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009923/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009924
Martin v. Löwiseba40652007-08-30 20:10:57 +00009925/* Override any GCC internal prototype to avoid an error.
9926 Use char because int might match the return type of a GCC
9927 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009928#ifdef __cplusplus
9929extern "C"
9930#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009931char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009932int
9933main ()
9934{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009935return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009936 ;
9937 return 0;
9938}
9939_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009940if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009941 ac_cv_lib_c_inet_aton=yes
9942else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009943 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009944fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009945rm -f core conftest.err conftest.$ac_objext \
9946 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009947LIBS=$ac_check_lib_save_LIBS
9948fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9950$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9951if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009952 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009953else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9955$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9956if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9957 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009958else
9959 ac_check_lib_save_LIBS=$LIBS
9960LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009962/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009963
Martin v. Löwiseba40652007-08-30 20:10:57 +00009964/* Override any GCC internal prototype to avoid an error.
9965 Use char because int might match the return type of a GCC
9966 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009967#ifdef __cplusplus
9968extern "C"
9969#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009970char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009971int
9972main ()
9973{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009974return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009975 ;
9976 return 0;
9977}
9978_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009979if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009980 ac_cv_lib_resolv_inet_aton=yes
9981else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009982 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009983fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009984rm -f core conftest.err conftest.$ac_objext \
9985 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009986LIBS=$ac_check_lib_save_LIBS
9987fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9989$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9990if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009991 cat >>confdefs.h <<_ACEOF
9992#define HAVE_LIBRESOLV 1
9993_ACEOF
9994
9995 LIBS="-lresolv $LIBS"
9996
9997fi
9998
9999
10000fi
10001
10002
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010003# On Tru64, chflags seems to be present, but calling it will
10004# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10006$as_echo_n "checking for chflags... " >&6; }
10007if test "${ac_cv_have_chflags+set}" = set; then :
10008 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010009else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010010 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010011 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010012else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010014/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000010015[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010016#include <sys/stat.h>
10017#include <unistd.h>
10018int main(int argc, char*argv[])
10019{
10020 if(chflags(argv[0], 0) != 0)
10021 return 1;
10022 return 0;
10023}
Gregory P. Smith49437c22009-11-02 01:38:35 +000010024]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010025_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010026if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010027 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010028else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010029 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010031rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10032 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010033fi
10034
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010035
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010036fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10038$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010039if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010040 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
10041if test "x$ac_cv_func_chflags" = x""yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010042 ac_cv_have_chflags="yes"
10043else
10044 ac_cv_have_chflags="no"
10045fi
10046
10047fi
10048if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010049
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010050$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010051
10052fi
10053
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10055$as_echo_n "checking for lchflags... " >&6; }
10056if test "${ac_cv_have_lchflags+set}" = set; then :
10057 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010058else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010059 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010060 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010061else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010063/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000010064[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010065#include <sys/stat.h>
10066#include <unistd.h>
10067int main(int argc, char*argv[])
10068{
10069 if(lchflags(argv[0], 0) != 0)
10070 return 1;
10071 return 0;
10072}
Gregory P. Smith49437c22009-11-02 01:38:35 +000010073]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010074_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010075if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010076 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010078 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010079fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10081 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010082fi
10083
10084
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010085fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10087$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010088if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010089 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
10090if test "x$ac_cv_func_lchflags" = x""yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010091 ac_cv_have_lchflags="yes"
10092else
10093 ac_cv_have_lchflags="no"
10094fi
10095
10096fi
10097if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010098
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010099$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010100
10101fi
10102
Ronald Oussorenf8752642006-07-06 10:13:35 +000010103case $ac_sys_system/$ac_sys_release in
10104Darwin/*)
10105 _CUR_CFLAGS="${CFLAGS}"
10106 _CUR_LDFLAGS="${LDFLAGS}"
10107 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10108 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10109 ;;
10110esac
10111
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10113$as_echo_n "checking for inflateCopy in -lz... " >&6; }
10114if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
10115 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010116else
10117 ac_check_lib_save_LIBS=$LIBS
10118LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010120/* end confdefs.h. */
10121
Martin v. Löwiseba40652007-08-30 20:10:57 +000010122/* Override any GCC internal prototype to avoid an error.
10123 Use char because int might match the return type of a GCC
10124 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010125#ifdef __cplusplus
10126extern "C"
10127#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010128char inflateCopy ();
10129int
10130main ()
10131{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010132return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010133 ;
10134 return 0;
10135}
10136_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010137if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010138 ac_cv_lib_z_inflateCopy=yes
10139else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010140 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010141fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010142rm -f core conftest.err conftest.$ac_objext \
10143 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010144LIBS=$ac_check_lib_save_LIBS
10145fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10147$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
10148if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010149
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010150$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010151
10152fi
10153
10154
Ronald Oussorenf8752642006-07-06 10:13:35 +000010155case $ac_sys_system/$ac_sys_release in
10156Darwin/*)
10157 CFLAGS="${_CUR_CFLAGS}"
10158 LDFLAGS="${_CUR_LDFLAGS}"
10159 ;;
10160esac
10161
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10163$as_echo_n "checking for hstrerror... " >&6; }
10164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010165/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010166
Martin v. Löwise9416172003-05-03 10:12:45 +000010167#include <netdb.h>
10168
Martin v. Löwise9416172003-05-03 10:12:45 +000010169int
10170main ()
10171{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010172void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010173 ;
10174 return 0;
10175}
10176_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010177if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010178
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010179$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010180
Matthias Klosec511b472010-05-08 11:01:39 +000010181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010182$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010183else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10185$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010186
10187fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010188rm -f core conftest.err conftest.$ac_objext \
10189 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010190
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10192$as_echo_n "checking for inet_aton... " >&6; }
10193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010194/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010195
Martin v. Löwis86d66262006-02-17 08:40:11 +000010196#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010197#include <sys/socket.h>
10198#include <netinet/in.h>
10199#include <arpa/inet.h>
10200
Martin v. Löwise9416172003-05-03 10:12:45 +000010201int
10202main ()
10203{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010204void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010205 ;
10206 return 0;
10207}
10208_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010209if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010210
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010211$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010212
Matthias Klosec511b472010-05-08 11:01:39 +000010213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010214$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010215else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10217$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010218
10219fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010220rm -f core conftest.err conftest.$ac_objext \
10221 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010222
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10224$as_echo_n "checking for inet_pton... " >&6; }
10225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010226/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010227
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010228#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010229#include <sys/socket.h>
10230#include <netinet/in.h>
10231#include <arpa/inet.h>
10232
Martin v. Löwise9416172003-05-03 10:12:45 +000010233int
10234main ()
10235{
10236void* p = inet_pton
10237 ;
10238 return 0;
10239}
10240_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010241if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010242
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010243$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010244
Matthias Klosec511b472010-05-08 11:01:39 +000010245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010246$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010247else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10249$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010250
10251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010253
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010254# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10256$as_echo_n "checking for setgroups... " >&6; }
10257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010258/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010259
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010260#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010261#ifdef HAVE_GRP_H
10262#include <grp.h>
10263#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010264
Martin v. Löwisd5843682002-11-21 20:41:28 +000010265int
10266main ()
10267{
10268void* p = setgroups
10269 ;
10270 return 0;
10271}
10272_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010273if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010274
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010275$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010276
Matthias Klosec511b472010-05-08 11:01:39 +000010277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010278$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010279else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10281$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010282
10283fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010285
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010286# check for openpty and forkpty
10287
10288for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010289do :
10290 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10291if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010293#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010294_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010295
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010296else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10298$as_echo_n "checking for openpty in -lutil... " >&6; }
10299if test "${ac_cv_lib_util_openpty+set}" = set; then :
10300 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010301else
Martin v. Löwis11437992002-04-12 09:54:03 +000010302 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010303LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010305/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010306
Martin v. Löwiseba40652007-08-30 20:10:57 +000010307/* Override any GCC internal prototype to avoid an error.
10308 Use char because int might match the return type of a GCC
10309 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010310#ifdef __cplusplus
10311extern "C"
10312#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010313char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010314int
10315main ()
10316{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010317return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010318 ;
10319 return 0;
10320}
10321_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010322if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010324else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010325 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010326fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010327rm -f core conftest.err conftest.$ac_objext \
10328 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010329LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010330fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10332$as_echo "$ac_cv_lib_util_openpty" >&6; }
10333if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10334 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010335 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010336else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10338$as_echo_n "checking for openpty in -lbsd... " >&6; }
10339if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10340 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010341else
10342 ac_check_lib_save_LIBS=$LIBS
10343LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010345/* end confdefs.h. */
10346
Martin v. Löwiseba40652007-08-30 20:10:57 +000010347/* Override any GCC internal prototype to avoid an error.
10348 Use char because int might match the return type of a GCC
10349 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010350#ifdef __cplusplus
10351extern "C"
10352#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010353char openpty ();
10354int
10355main ()
10356{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010357return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010358 ;
10359 return 0;
10360}
10361_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010362if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010363 ac_cv_lib_bsd_openpty=yes
10364else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010365 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010366fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010367rm -f core conftest.err conftest.$ac_objext \
10368 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010369LIBS=$ac_check_lib_save_LIBS
10370fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10372$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10373if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10374 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010375 LIBS="$LIBS -lbsd"
10376fi
10377
10378
10379fi
10380
Fred Drake8cef4cf2000-06-28 16:40:38 +000010381
10382fi
10383done
10384
10385for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010386do :
10387 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10388if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010390#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010391_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010392
Fred Drake8cef4cf2000-06-28 16:40:38 +000010393else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10395$as_echo_n "checking for forkpty in -lutil... " >&6; }
10396if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10397 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010398else
Martin v. Löwis11437992002-04-12 09:54:03 +000010399 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010400LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010403
Martin v. Löwiseba40652007-08-30 20:10:57 +000010404/* Override any GCC internal prototype to avoid an error.
10405 Use char because int might match the return type of a GCC
10406 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010407#ifdef __cplusplus
10408extern "C"
10409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010410char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010411int
10412main ()
10413{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010414return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010415 ;
10416 return 0;
10417}
10418_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010419if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010420 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010421else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010422 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010423fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010424rm -f core conftest.err conftest.$ac_objext \
10425 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010426LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010427fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10429$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10430if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10431 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010432 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010433else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10435$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10436if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10437 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010438else
10439 ac_check_lib_save_LIBS=$LIBS
10440LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010442/* end confdefs.h. */
10443
Martin v. Löwiseba40652007-08-30 20:10:57 +000010444/* Override any GCC internal prototype to avoid an error.
10445 Use char because int might match the return type of a GCC
10446 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010447#ifdef __cplusplus
10448extern "C"
10449#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010450char forkpty ();
10451int
10452main ()
10453{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010454return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010455 ;
10456 return 0;
10457}
10458_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010459if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010460 ac_cv_lib_bsd_forkpty=yes
10461else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010462 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010463fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010464rm -f core conftest.err conftest.$ac_objext \
10465 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010466LIBS=$ac_check_lib_save_LIBS
10467fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10469$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10470if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10471 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010472 LIBS="$LIBS -lbsd"
10473fi
10474
10475
10476fi
10477
Fred Drake8cef4cf2000-06-28 16:40:38 +000010478
10479fi
10480done
10481
Jack Jansendd19cf82001-12-06 22:36:17 +000010482
Brett Cannonaa5778d2008-03-18 04:09:00 +000010483# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000010484for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010485do :
10486 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10487if test "x$ac_cv_func_memmove" = x""yes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000010488 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010489#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000010490_ACEOF
10491
10492fi
10493done
10494
10495
Michael W. Hudson54241132001-12-07 15:38:26 +000010496# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010497for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010498do :
10499 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10500ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10501eval as_val=\$$as_ac_var
10502 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010503 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010504#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010505_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010506
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010507fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010508done
10509
Michael W. Hudson54241132001-12-07 15:38:26 +000010510
Brett Cannonaa5778d2008-03-18 04:09:00 +000010511for ac_func in dup2 getcwd strdup
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010512do :
10513 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10514ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10515eval as_val=\$$as_ac_var
10516 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010517 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010518#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010519_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010520
Martin v. Löwis1142de32002-03-29 16:28:31 +000010521else
Martin v. Löwiseba40652007-08-30 20:10:57 +000010522 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010523 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010524 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
10525 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010526esac
10527
Martin v. Löwis1142de32002-03-29 16:28:31 +000010528fi
10529done
10530
10531
10532for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010533do :
10534 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10535if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010536 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010537#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010538_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010540/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010541#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010542int
10543main ()
10544{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010545getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010546 ;
10547 return 0;
10548}
10549_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010550if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010551
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010552$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010553
Guido van Rossum627b2d71993-12-24 10:39:16 +000010554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010556
Guido van Rossum627b2d71993-12-24 10:39:16 +000010557fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010558done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010559
Jack Jansen150753c2003-03-29 22:07:47 +000010560for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010561do :
10562 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10563if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010564 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010565#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010566_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010568/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010569#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010570int
10571main ()
10572{
10573setpgrp(0,0);
10574 ;
10575 return 0;
10576}
10577_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010578if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010579
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010580$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010581
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010584
10585fi
10586done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010587
Thomas Wouters3a584202000-08-05 23:28:51 +000010588for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010589do :
10590 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10591if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010592 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010593#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010594_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010596/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010597#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010598int
10599main ()
10600{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010601gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010602 ;
10603 return 0;
10604}
10605_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010606if ac_fn_c_try_compile "$LINENO"; then :
10607
Guido van Rossum627b2d71993-12-24 10:39:16 +000010608else
Skip Montanaro6dead952003-09-25 14:50:04 +000010609
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010610$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010611
Martin v. Löwis11437992002-04-12 09:54:03 +000010612
Guido van Rossum627b2d71993-12-24 10:39:16 +000010613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010615
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010616fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010617done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010618
Michael W. Hudson54241132001-12-07 15:38:26 +000010619
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10621$as_echo_n "checking for major... " >&6; }
10622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010623/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010624
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010625#if defined(MAJOR_IN_MKDEV)
10626#include <sys/mkdev.h>
10627#elif defined(MAJOR_IN_SYSMACROS)
10628#include <sys/sysmacros.h>
10629#else
10630#include <sys/types.h>
10631#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010632
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010633int
10634main ()
10635{
10636
10637 makedev(major(0),minor(0));
10638
10639 ;
10640 return 0;
10641}
10642_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010643if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010644
10645
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010646$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010647
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10649$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010650
10651else
Skip Montanaro6dead952003-09-25 14:50:04 +000010652
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10654$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010655
10656fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010657rm -f core conftest.err conftest.$ac_objext \
10658 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010659
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010660# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010661# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10663$as_echo_n "checking for getaddrinfo... " >&6; }
10664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010665/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010666
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010667#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010668#include <sys/socket.h>
10669#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010670#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010671
Martin v. Löwis11437992002-04-12 09:54:03 +000010672int
10673main ()
10674{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010675getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010676 ;
10677 return 0;
10678}
10679_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010680if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010681 have_getaddrinfo=yes
10682else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010683 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010684fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010685rm -f core conftest.err conftest.$ac_objext \
10686 conftest$ac_exeext conftest.$ac_ext
10687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10688$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010689if test $have_getaddrinfo = yes
10690then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10692$as_echo_n "checking getaddrinfo bug... " >&6; }
10693 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10694 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010695else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010696 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010697 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010698else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010700/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010701
10702#include <sys/types.h>
10703#include <netdb.h>
10704#include <string.h>
10705#include <sys/socket.h>
10706#include <netinet/in.h>
10707
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010708int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010709{
10710 int passive, gaierr, inet4 = 0, inet6 = 0;
10711 struct addrinfo hints, *ai, *aitop;
10712 char straddr[INET6_ADDRSTRLEN], strport[16];
10713
10714 for (passive = 0; passive <= 1; passive++) {
10715 memset(&hints, 0, sizeof(hints));
10716 hints.ai_family = AF_UNSPEC;
10717 hints.ai_flags = passive ? AI_PASSIVE : 0;
10718 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010719 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010720 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10721 (void)gai_strerror(gaierr);
10722 goto bad;
10723 }
10724 for (ai = aitop; ai; ai = ai->ai_next) {
10725 if (ai->ai_addr == NULL ||
10726 ai->ai_addrlen == 0 ||
10727 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10728 straddr, sizeof(straddr), strport, sizeof(strport),
10729 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10730 goto bad;
10731 }
10732 switch (ai->ai_family) {
10733 case AF_INET:
10734 if (strcmp(strport, "54321") != 0) {
10735 goto bad;
10736 }
10737 if (passive) {
10738 if (strcmp(straddr, "0.0.0.0") != 0) {
10739 goto bad;
10740 }
10741 } else {
10742 if (strcmp(straddr, "127.0.0.1") != 0) {
10743 goto bad;
10744 }
10745 }
10746 inet4++;
10747 break;
10748 case AF_INET6:
10749 if (strcmp(strport, "54321") != 0) {
10750 goto bad;
10751 }
10752 if (passive) {
10753 if (strcmp(straddr, "::") != 0) {
10754 goto bad;
10755 }
10756 } else {
10757 if (strcmp(straddr, "::1") != 0) {
10758 goto bad;
10759 }
10760 }
10761 inet6++;
10762 break;
10763 case AF_UNSPEC:
10764 goto bad;
10765 break;
10766 default:
10767 /* another family support? */
10768 break;
10769 }
10770 }
10771 }
10772
10773 if (!(inet4 == 0 || inet4 == 2))
10774 goto bad;
10775 if (!(inet6 == 0 || inet6 == 2))
10776 goto bad;
10777
10778 if (aitop)
10779 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010780 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010781
10782 bad:
10783 if (aitop)
10784 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010785 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010786}
10787
Martin v. Löwis11437992002-04-12 09:54:03 +000010788_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010789if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010790 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010791else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010792 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010793fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10795 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010796fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010797
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010798fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010799
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010801
Mark Dickinson0ef0b912009-12-31 21:11:48 +000010802if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010803then
10804 if test $ipv6 = yes
10805 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010806 echo 'Fatal: You must get working getaddrinfo() function.'
10807 echo ' or you can specify "--disable-ipv6"'.
10808 exit 1
10809 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010810else
Martin v. Löwis11437992002-04-12 09:54:03 +000010811
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010812$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010813
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010814fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010815for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010816do :
10817 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10818if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010819 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010820#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010821_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010822
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010823fi
10824done
10825
Michael W. Hudson54241132001-12-07 15:38:26 +000010826
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010827# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10829$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10830if test "${ac_cv_header_time+set}" = set; then :
10831 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010834/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010835#include <sys/types.h>
10836#include <sys/time.h>
10837#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010838
Martin v. Löwis11437992002-04-12 09:54:03 +000010839int
10840main ()
10841{
10842if ((struct tm *) 0)
10843return 0;
10844 ;
10845 return 0;
10846}
10847_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010848if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010849 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010850else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010851 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010852fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010854fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10856$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010857if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010858
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010859$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010860
10861fi
10862
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10864$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10865if test "${ac_cv_struct_tm+set}" = set; then :
10866 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010867else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010869/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010870#include <sys/types.h>
10871#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010872
Martin v. Löwis11437992002-04-12 09:54:03 +000010873int
10874main ()
10875{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010876struct tm tm;
10877 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010878 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010879 ;
10880 return 0;
10881}
10882_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010883if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010884 ac_cv_struct_tm=time.h
10885else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010886 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010889fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10891$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010892if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010893
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010894$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010895
10896fi
10897
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010898ac_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 +000010899#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010900
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010901"
10902if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010903
10904cat >>confdefs.h <<_ACEOF
10905#define HAVE_STRUCT_TM_TM_ZONE 1
10906_ACEOF
10907
10908
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010909fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010910
Martin v. Löwis11437992002-04-12 09:54:03 +000010911if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10912
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010913$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010914
10915else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010916 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10917"
10918if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10919 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000010920else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010921 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000010922fi
10923
Martin v. Löwiseba40652007-08-30 20:10:57 +000010924cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010925#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000010926_ACEOF
10927
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10929$as_echo_n "checking for tzname... " >&6; }
10930if test "${ac_cv_var_tzname+set}" = set; then :
10931 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000010932else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010934/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010935#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000010936#if !HAVE_DECL_TZNAME
10937extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010939
Martin v. Löwis11437992002-04-12 09:54:03 +000010940int
10941main ()
10942{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010943return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010944 ;
10945 return 0;
10946}
10947_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010948if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010949 ac_cv_var_tzname=yes
10950else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010951 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010952fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010953rm -f core conftest.err conftest.$ac_objext \
10954 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010955fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10957$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010958 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010959
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010960$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010961
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010962 fi
10963fi
10964
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010965ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10966if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010967
10968cat >>confdefs.h <<_ACEOF
10969#define HAVE_STRUCT_STAT_ST_RDEV 1
10970_ACEOF
10971
10972
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010973fi
10974
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010975ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10976if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010977
Martin v. Löwis11437992002-04-12 09:54:03 +000010978cat >>confdefs.h <<_ACEOF
10979#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10980_ACEOF
10981
10982
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010983fi
10984
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010985ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10986if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010987
10988cat >>confdefs.h <<_ACEOF
10989#define HAVE_STRUCT_STAT_ST_FLAGS 1
10990_ACEOF
10991
10992
10993fi
10994
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010995ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10996if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010997
10998cat >>confdefs.h <<_ACEOF
10999#define HAVE_STRUCT_STAT_ST_GEN 1
11000_ACEOF
11001
11002
11003fi
11004
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011005ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
11006if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011007
11008cat >>confdefs.h <<_ACEOF
11009#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11010_ACEOF
11011
11012
11013fi
11014
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011015ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11016if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011017
Martin v. Löwis11437992002-04-12 09:54:03 +000011018cat >>confdefs.h <<_ACEOF
11019#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11020_ACEOF
11021
11022
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011023$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011024
11025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011026 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011027 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011028 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11029 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011030esac
11031
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011032fi
11033
Michael W. Hudson54241132001-12-07 15:38:26 +000011034
Martin v. Löwis11437992002-04-12 09:54:03 +000011035
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11037$as_echo_n "checking for time.h that defines altzone... " >&6; }
11038if test "${ac_cv_header_time_altzone+set}" = set; then :
11039 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011040else
Matthias Klosec511b472010-05-08 11:01:39 +000011041
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011043/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011044#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011045int
11046main ()
11047{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011048return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011049 ;
11050 return 0;
11051}
11052_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011053if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011054 ac_cv_header_time_altzone=yes
11055else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011056 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011059
Martin v. Löwiseba40652007-08-30 20:10:57 +000011060fi
11061
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11063$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011064if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011065
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011066$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011067
11068fi
11069
Guido van Rossumda88dad1995-01-26 00:46:29 +000011070was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11072$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011074/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011075
11076#include <sys/types.h>
11077#include <sys/select.h>
11078#include <sys/time.h>
11079
Martin v. Löwis11437992002-04-12 09:54:03 +000011080int
11081main ()
11082{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011083;
Martin v. Löwis11437992002-04-12 09:54:03 +000011084 ;
11085 return 0;
11086}
11087_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011088if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011089
11090
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011091$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011092
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011093 was_it_defined=yes
11094
Martin v. Löwiseba40652007-08-30 20:10:57 +000011095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11098$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011099
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11101$as_echo_n "checking for addrinfo... " >&6; }
11102if test "${ac_cv_struct_addrinfo+set}" = set; then :
11103 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011104else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011106/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011107#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011108int
11109main ()
11110{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011111struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011112 ;
11113 return 0;
11114}
11115_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011116if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011117 ac_cv_struct_addrinfo=yes
11118else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011119 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11122fi
11123
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11125$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011126if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011127
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011128$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011129
11130fi
11131
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11133$as_echo_n "checking for sockaddr_storage... " >&6; }
11134if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
11135 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011136else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011138/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011139
11140# include <sys/types.h>
11141# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011142int
11143main ()
11144{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011145struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 ;
11147 return 0;
11148}
11149_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011150if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011151 ac_cv_struct_sockaddr_storage=yes
11152else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011153 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11156fi
11157
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11159$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011160if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011161
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011162$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011163
11164fi
11165
Guido van Rossum627b2d71993-12-24 10:39:16 +000011166# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011167
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11169$as_echo_n "checking whether char is unsigned... " >&6; }
11170if test "${ac_cv_c_char_unsigned+set}" = set; then :
11171 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011172else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011175$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011176int
11177main ()
11178{
11179static int test_array [1 - 2 * !(((char) -1) < 0)];
11180test_array [0] = 0
11181
11182 ;
11183 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011184}
Martin v. Löwis11437992002-04-12 09:54:03 +000011185_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011186if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011187 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011188else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011189 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011190fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011192fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11194$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011195if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011196 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011197
11198fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011199
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11201$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11202if test "${ac_cv_c_const+set}" = set; then :
11203 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011204else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011206/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011207
Martin v. Löwis11437992002-04-12 09:54:03 +000011208int
11209main ()
11210{
11211/* FIXME: Include the comments suggested by Paul. */
11212#ifndef __cplusplus
11213 /* Ultrix mips cc rejects this. */
11214 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000011215 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011216 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011217 char const *const *pcpcc;
11218 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011219 /* NEC SVR4.0.2 mips cc rejects this. */
11220 struct point {int x, y;};
11221 static struct point const zero = {0,0};
11222 /* AIX XL C 1.02.0.0 rejects this.
11223 It does not let you subtract one const X* pointer from another in
11224 an arm of an if-expression whose if-part is not a constant
11225 expression */
11226 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011227 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011228 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011229 ++pcpcc;
11230 ppc = (char**) pcpcc;
11231 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011232 { /* SCO 3.2v4 cc rejects this. */
11233 char *t;
11234 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011235
Martin v. Löwis11437992002-04-12 09:54:03 +000011236 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011237 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011238 }
11239 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11240 int x[] = {25, 17};
11241 const int *foo = &x[0];
11242 ++foo;
11243 }
11244 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11245 typedef const int *iptr;
11246 iptr p = 0;
11247 ++p;
11248 }
11249 { /* AIX XL C 1.02.0.0 rejects this saying
11250 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11251 struct s { int j; const int *ap[3]; };
11252 struct s *b; b->j = 5;
11253 }
11254 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11255 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011256 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011257 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011258 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011259#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011260
Martin v. Löwis11437992002-04-12 09:54:03 +000011261 ;
11262 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011263}
Martin v. Löwis11437992002-04-12 09:54:03 +000011264_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011265if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011266 ac_cv_c_const=yes
11267else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011268 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11273$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011274if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011275
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011276$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011277
11278fi
11279
Michael W. Hudson54241132001-12-07 15:38:26 +000011280
Guido van Rossumda88dad1995-01-26 00:46:29 +000011281works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11283$as_echo_n "checking for working volatile... " >&6; }
11284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011285/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011286
Martin v. Löwis11437992002-04-12 09:54:03 +000011287int
11288main ()
11289{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011290volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011291 ;
11292 return 0;
11293}
11294_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011295if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011296 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011297else
Skip Montanaro6dead952003-09-25 14:50:04 +000011298
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011299$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011300
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011301
Guido van Rossum627b2d71993-12-24 10:39:16 +000011302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11305$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011306
Guido van Rossumda88dad1995-01-26 00:46:29 +000011307works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11309$as_echo_n "checking for working signed char... " >&6; }
11310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011311/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011312
Martin v. Löwis11437992002-04-12 09:54:03 +000011313int
11314main ()
11315{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011316signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011317 ;
11318 return 0;
11319}
11320_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011321if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011322 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011323else
Skip Montanaro6dead952003-09-25 14:50:04 +000011324
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011325$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011326
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011327
Guido van Rossum7f43da71994-08-01 12:15:30 +000011328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11331$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011332
Guido van Rossumda88dad1995-01-26 00:46:29 +000011333have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11335$as_echo_n "checking for prototypes... " >&6; }
11336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011337/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011338int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011339int
11340main ()
11341{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011342return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011343 ;
11344 return 0;
11345}
11346_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011347if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011348
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011349$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011350
Matthias Klosec511b472010-05-08 11:01:39 +000011351 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11355$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011356
Guido van Rossumda88dad1995-01-26 00:46:29 +000011357works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11359$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011361/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011362
11363#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011364int foo(int x, ...) {
11365 va_list va;
11366 va_start(va, x);
11367 va_arg(va, int);
11368 va_arg(va, char *);
11369 va_arg(va, double);
11370 return 0;
11371}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011372
Martin v. Löwis11437992002-04-12 09:54:03 +000011373int
11374main ()
11375{
Guido van Rossum90eea071996-08-30 20:58:57 +000011376return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011377 ;
11378 return 0;
11379}
11380_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011381if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011382
11383
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011384$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011385
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011386 works=yes
11387
Guido van Rossum627b2d71993-12-24 10:39:16 +000011388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11391$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011392
Martin v. Löwisd6320502004-08-12 13:45:08 +000011393# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11395$as_echo_n "checking for socketpair... " >&6; }
11396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011397/* end confdefs.h. */
11398
11399#include <sys/types.h>
11400#include <sys/socket.h>
11401
11402int
11403main ()
11404{
11405void *x=socketpair
11406 ;
11407 return 0;
11408}
11409_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011410if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011411
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011412$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011413
Matthias Klosec511b472010-05-08 11:01:39 +000011414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011415$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011416else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11418$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011419
11420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011422
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011423# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11425$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011427/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011428#include <sys/types.h>
11429#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011430int
11431main ()
11432{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011433struct sockaddr x;
11434x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011435 ;
11436 return 0;
11437}
11438_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011439if ac_fn_c_try_compile "$LINENO"; then :
11440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11441$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011442
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011443$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011444
11445else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11447$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011448
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011449fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011451
Guido van Rossumda88dad1995-01-26 00:46:29 +000011452va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11454$as_echo_n "checking whether va_list is an array... " >&6; }
11455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011456/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011457
11458#ifdef HAVE_STDARG_PROTOTYPES
11459#include <stdarg.h>
11460#else
11461#include <varargs.h>
11462#endif
11463
Martin v. Löwis11437992002-04-12 09:54:03 +000011464int
11465main ()
11466{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011467va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011468 ;
11469 return 0;
11470}
11471_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011472if ac_fn_c_try_compile "$LINENO"; then :
11473
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011474else
Skip Montanaro6dead952003-09-25 14:50:04 +000011475
Martin v. Löwis11437992002-04-12 09:54:03 +000011476
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011477$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011478
Guido van Rossumda88dad1995-01-26 00:46:29 +000011479 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011480
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11484$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011485
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011486# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011487
11488
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011489ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11490if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011491
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011492 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011493
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11495$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011496 OLD_CFLAGS=$CFLAGS
11497 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011499/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011500
11501# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011502
Martin v. Löwis11437992002-04-12 09:54:03 +000011503int
11504main ()
11505{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011506
11507 char *name;
11508 struct hostent *he, *res;
11509 char buffer[2048];
11510 int buflen = 2048;
11511 int h_errnop;
11512
11513 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011514
11515 ;
11516 return 0;
11517}
11518_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011519if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011520
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011521 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011522
Martin v. Löwis11437992002-04-12 09:54:03 +000011523
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011524$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011525
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11527$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011528
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011529else
Skip Montanaro6dead952003-09-25 14:50:04 +000011530
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11532$as_echo "no" >&6; }
11533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11534$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011536/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011537
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011538# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011539
Martin v. Löwis11437992002-04-12 09:54:03 +000011540int
11541main ()
11542{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011543
11544 char *name;
11545 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000011546 char buffer[2048];
11547 int buflen = 2048;
11548 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011549
Matthias Klosec511b472010-05-08 11:01:39 +000011550 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011551
11552 ;
11553 return 0;
11554}
11555_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011556if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011557
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011558 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011559
Martin v. Löwis11437992002-04-12 09:54:03 +000011560
Matthias Klosec511b472010-05-08 11:01:39 +000011561$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011562
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11564$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011565
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011566else
Skip Montanaro6dead952003-09-25 14:50:04 +000011567
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11569$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11571$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11573/* end confdefs.h. */
11574
11575# include <netdb.h>
11576
11577int
11578main ()
11579{
11580
11581 char *name;
11582 struct hostent *he;
11583 struct hostent_data data;
11584
11585 (void) gethostbyname_r(name, he, &data);
11586
11587 ;
11588 return 0;
11589}
11590_ACEOF
11591if ac_fn_c_try_compile "$LINENO"; then :
11592
11593 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11594
11595
11596$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11597
11598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11599$as_echo "yes" >&6; }
11600
11601else
11602
11603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11604$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011605
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011608
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011611
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011614 CFLAGS=$OLD_CFLAGS
11615
11616else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011617
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011618 for ac_func in gethostbyname
11619do :
11620 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11621if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011622 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011623#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011624_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011625
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011626fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011627done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011628
Michael W. Hudson54241132001-12-07 15:38:26 +000011629
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011630fi
11631
Michael W. Hudson54241132001-12-07 15:38:26 +000011632
11633
11634
11635
11636
11637
Guido van Rossum627b2d71993-12-24 10:39:16 +000011638# checks for system services
11639# (none yet)
11640
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011641# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011642ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11643if test "x$ac_cv_func___fpu_control" = x""yes; then :
11644
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011645else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11647$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11648if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11649 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011650else
Martin v. Löwis11437992002-04-12 09:54:03 +000011651 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011652LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011655
Martin v. Löwiseba40652007-08-30 20:10:57 +000011656/* Override any GCC internal prototype to avoid an error.
11657 Use char because int might match the return type of a GCC
11658 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011659#ifdef __cplusplus
11660extern "C"
11661#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011662char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011663int
11664main ()
11665{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011666return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011667 ;
11668 return 0;
11669}
11670_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011671if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011672 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011673else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011674 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011675fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011676rm -f core conftest.err conftest.$ac_objext \
11677 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011678LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011679fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11681$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11682if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011683 cat >>confdefs.h <<_ACEOF
11684#define HAVE_LIBIEEE 1
11685_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011686
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011687 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011688
Guido van Rossum627b2d71993-12-24 10:39:16 +000011689fi
11690
Michael W. Hudson54241132001-12-07 15:38:26 +000011691
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011692fi
11693
Michael W. Hudson54241132001-12-07 15:38:26 +000011694
Guido van Rossum7f253911997-05-09 02:42:48 +000011695# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11697$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011698
Martin v. Löwiseba40652007-08-30 20:10:57 +000011699# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011700if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011701 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011702if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011703then
11704
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011705$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011706
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11708$as_echo "yes" >&6; }
11709else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11710$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011711fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011712else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11714$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011715fi
11716
Guido van Rossum7f253911997-05-09 02:42:48 +000011717
Guido van Rossum7f43da71994-08-01 12:15:30 +000011718# check for --with-libm=...
11719
Guido van Rossum563e7081996-09-10 18:20:48 +000011720case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011721Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011722BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011723*) LIBM=-lm
11724esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11726$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011727
Martin v. Löwiseba40652007-08-30 20:10:57 +000011728# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011729if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011730 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011731if test "$withval" = no
11732then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11734$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011735elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011736then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11738$as_echo "set LIBM=\"$withval\"" >&6; }
11739else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011740fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011741else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11743$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011744fi
11745
Guido van Rossum7f43da71994-08-01 12:15:30 +000011746
11747# check for --with-libc=...
11748
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11750$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011751
Martin v. Löwiseba40652007-08-30 20:10:57 +000011752# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011753if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011754 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011755if test "$withval" = no
11756then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11758$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011759elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011760then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11762$as_echo "set LIBC=\"$withval\"" >&6; }
11763else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011764fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011765else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11767$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011768fi
11769
Guido van Rossum7f43da71994-08-01 12:15:30 +000011770
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011771# **************************************************
11772# * Check for various properties of floating point *
11773# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000011774
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11776$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11777if test "${ac_cv_little_endian_double+set}" = set; then :
11778 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011779else
11780
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011781if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011782 ac_cv_little_endian_double=no
11783else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011785/* end confdefs.h. */
11786
11787#include <string.h>
11788int main() {
11789 double x = 9006104071832581.0;
11790 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11791 return 0;
11792 else
11793 return 1;
11794}
11795
11796_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011797if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011798 ac_cv_little_endian_double=yes
11799else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011800 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011801fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11803 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011804fi
11805
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011806fi
11807
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11809$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011810if test "$ac_cv_little_endian_double" = yes
11811then
11812
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011813$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011814
11815fi
11816
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11818$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11819if test "${ac_cv_big_endian_double+set}" = set; then :
11820 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011821else
11822
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011823if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011824 ac_cv_big_endian_double=no
11825else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011827/* end confdefs.h. */
11828
11829#include <string.h>
11830int main() {
11831 double x = 9006104071832581.0;
11832 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11833 return 0;
11834 else
11835 return 1;
11836}
11837
11838_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011839if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011840 ac_cv_big_endian_double=yes
11841else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011842 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011843fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11845 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011846fi
11847
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011848fi
11849
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11851$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011852if test "$ac_cv_big_endian_double" = yes
11853then
11854
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011855$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011856
11857fi
11858
11859# Some ARM platforms use a mixed-endian representation for doubles.
11860# While Python doesn't currently have full support for these platforms
11861# (see e.g., issue 1762561), we can at least make sure that float <-> string
11862# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11864$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11865if test "${ac_cv_mixed_endian_double+set}" = set; then :
11866 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011867else
11868
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011869if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011870 ac_cv_mixed_endian_double=no
11871else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011873/* end confdefs.h. */
11874
11875#include <string.h>
11876int main() {
11877 double x = 9006104071832581.0;
11878 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11879 return 0;
11880 else
11881 return 1;
11882}
11883
11884_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011885if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011886 ac_cv_mixed_endian_double=yes
11887else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011888 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011889fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11891 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011892fi
11893
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011894fi
11895
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11897$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011898if test "$ac_cv_mixed_endian_double" = yes
11899then
11900
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011901$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011902
11903fi
11904
11905# The short float repr introduced in Python 3.1 requires the
11906# correctly-rounded string <-> double conversion functions from
11907# Python/dtoa.c, which in turn require that the FPU uses 53-bit
11908# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000011909# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011910# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000011911
11912# This inline assembler syntax may also work for suncc and icc,
11913# so we try it on all platforms.
11914
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11916$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011918/* end confdefs.h. */
11919
11920int
11921main ()
11922{
11923
Mark Dickinsona548dee2009-11-15 13:12:43 +000011924 unsigned short cw;
11925 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11926 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011927
11928 ;
11929 return 0;
11930}
11931_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011932if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011933 have_gcc_asm_for_x87=yes
11934else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011935 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011936fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11939$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000011940if test "$have_gcc_asm_for_x87" = yes
11941then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011942
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011943$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011944
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011945fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000011946
Mark Dickinson04b27232009-01-04 12:29:36 +000011947# Detect whether system arithmetic is subject to x87-style double
11948# rounding issues. The result of this test has little meaning on non
11949# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11950# mode is round-to-nearest and double rounding issues are present, and
11951# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11953$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000011954# $BASECFLAGS may affect the result
11955ac_save_cc="$CC"
11956CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011957if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000011958 ac_cv_x87_double_rounding=no
11959else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000011961/* end confdefs.h. */
11962
11963#include <stdlib.h>
11964#include <math.h>
11965int main() {
11966 volatile double x, y, z;
11967 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11968 x = 0.99999999999999989; /* 1-2**-53 */
11969 y = 1./x;
11970 if (y != 1.)
11971 exit(0);
11972 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11973 x = 1e16;
11974 y = 2.99999;
11975 z = x + y;
11976 if (z != 1e16+4.)
11977 exit(0);
11978 /* both tests show evidence of double rounding */
11979 exit(1);
11980}
11981
11982_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011983if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000011984 ac_cv_x87_double_rounding=no
11985else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011986 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000011987fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011988rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11989 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000011990fi
11991
Mark Dickinson99abd142009-10-24 13:44:16 +000011992CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11994$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000011995if test "$ac_cv_x87_double_rounding" = yes
11996then
11997
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011998$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000011999
12000fi
12001
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012002# ************************************
12003# * Check for mathematical functions *
12004# ************************************
12005
12006LIBS_SAVE=$LIBS
12007LIBS="$LIBS $LIBM"
12008
Mark Dickinson265d7382008-04-21 22:32:24 +000012009# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12010# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12012$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
12013if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
12014 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012015else
12016
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012017if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012018 ac_cv_tanh_preserves_zero_sign=no
12019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012021/* end confdefs.h. */
12022
12023#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012024#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012025int main() {
12026 /* return 0 if either negative zeros don't exist
12027 on this platform or if negative zeros exist
12028 and tanh(-0.) == -0. */
12029 if (atan2(0., -1.) == atan2(-0., -1.) ||
12030 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12031 else exit(1);
12032}
12033
12034_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012035if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012036 ac_cv_tanh_preserves_zero_sign=yes
12037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012038 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012039fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12041 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012042fi
12043
Mark Dickinson265d7382008-04-21 22:32:24 +000012044fi
12045
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12047$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012048if test "$ac_cv_tanh_preserves_zero_sign" = yes
12049then
12050
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012051$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012052
12053fi
12054
Mark Dickinson65898e02009-09-05 10:27:00 +000012055for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012056do :
12057 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12058ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12059eval as_val=\$$as_ac_var
12060 if test "x$as_val" = x""yes; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012061 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012062#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012063_ACEOF
12064
12065fi
12066done
12067
Mark Dickinson65898e02009-09-05 10:27:00 +000012068for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012069do :
12070 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12071ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12072eval as_val=\$$as_ac_var
12073 if test "x$as_val" = x""yes; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012074 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012075#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012076_ACEOF
12077
12078fi
12079done
12080
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012081ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12082"
12083if test "x$ac_cv_have_decl_isinf" = x""yes; then :
12084 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012086 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012087fi
12088
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012089cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012090#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012091_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012092ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12093"
12094if test "x$ac_cv_have_decl_isnan" = x""yes; then :
12095 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012096else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012097 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012098fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012099
12100cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012101#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012102_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012103ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12104"
12105if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
12106 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012107else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012108 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012109fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012110
12111cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012112#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012113_ACEOF
12114
12115
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012116LIBS=$LIBS_SAVE
12117
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012118# For multiprocessing module, check that sem_open
12119# actually works. For FreeBSD versions <= 7.2,
12120# the kernel module that provides POSIX semaphores
12121# isn't loaded by default, so an attempt to call
12122# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12124$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
12125if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
12126 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012127else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012128 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012129 ac_cv_posix_semaphores_enabled=yes
12130else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012132/* end confdefs.h. */
12133
12134#include <unistd.h>
12135#include <fcntl.h>
12136#include <stdio.h>
12137#include <semaphore.h>
12138#include <sys/stat.h>
12139
12140int main(void) {
12141 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12142 if (a == SEM_FAILED) {
12143 perror("sem_open");
12144 return 1;
12145 }
12146 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012147 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012148 return 0;
12149}
12150
12151_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012152if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012153 ac_cv_posix_semaphores_enabled=yes
12154else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012155 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012156fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12158 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012159fi
12160
12161
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012162fi
12163
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12165$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012166if test $ac_cv_posix_semaphores_enabled = no
12167then
12168
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012169$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012170
12171fi
12172
12173# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12175$as_echo_n "checking for broken sem_getvalue... " >&6; }
12176if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
12177 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012178else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012179 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012180 ac_cv_broken_sem_getvalue=yes
12181else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012183/* end confdefs.h. */
12184
12185#include <unistd.h>
12186#include <fcntl.h>
12187#include <stdio.h>
12188#include <semaphore.h>
12189#include <sys/stat.h>
12190
12191int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012192 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012193 int count;
12194 int res;
12195 if(a==SEM_FAILED){
12196 perror("sem_open");
12197 return 1;
12198
12199 }
12200 res = sem_getvalue(a, &count);
12201 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012202 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012203 return res==-1 ? 1 : 0;
12204}
12205
12206_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012207if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012208 ac_cv_broken_sem_getvalue=no
12209else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012210 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012211fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012212rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12213 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012214fi
12215
12216
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012217fi
12218
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12220$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012221if test $ac_cv_broken_sem_getvalue = yes
12222then
12223
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012224$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012225
12226fi
12227
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012228# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12230$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012231# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012232if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012233 enableval=$enable_big_digits; case $enable_big_digits in
12234yes)
12235 enable_big_digits=30 ;;
12236no)
12237 enable_big_digits=15 ;;
1223815|30)
12239 ;;
12240*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012241 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 +000012242esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12244$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012245
12246cat >>confdefs.h <<_ACEOF
12247#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12248_ACEOF
12249
12250
12251else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12253$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012254fi
12255
12256
Guido van Rossumef2255b2000-03-10 22:30:29 +000012257# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012258ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12259if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012260
12261
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012262$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012263
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012264 wchar_h="yes"
12265
Guido van Rossumef2255b2000-03-10 22:30:29 +000012266else
Martin v. Löwis11437992002-04-12 09:54:03 +000012267 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012268
12269fi
12270
Michael W. Hudson54241132001-12-07 15:38:26 +000012271
Martin v. Löwis11437992002-04-12 09:54:03 +000012272
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012273# determine wchar_t size
12274if test "$wchar_h" = yes
12275then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012276 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012277# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12278# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12279# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12281$as_echo_n "checking size of wchar_t... " >&6; }
12282if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12283 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012284else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012285 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12286"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012287
Martin v. Löwis11437992002-04-12 09:54:03 +000012288else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012289 if test "$ac_cv_type_wchar_t" = yes; then
12290 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12291$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12292{ as_fn_set_status 77
12293as_fn_error "cannot compute sizeof (wchar_t)
12294See \`config.log' for more details." "$LINENO" 5; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012295 else
12296 ac_cv_sizeof_wchar_t=0
12297 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012298fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012299
Martin v. Löwis11437992002-04-12 09:54:03 +000012300fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12302$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012303
12304
12305
Martin v. Löwis11437992002-04-12 09:54:03 +000012306cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012307#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012308_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012309
Michael W. Hudson54241132001-12-07 15:38:26 +000012310
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012311fi
12312
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12314$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012315have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012317/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012318
12319#include <tcl.h>
12320#if TCL_UTF_MAX != 6
12321# error "NOT UCS4_TCL"
12322#endif
12323int
12324main ()
12325{
12326
12327 ;
12328 return 0;
12329}
12330_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012331if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012332
12333
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012334$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012335
12336 have_ucs4_tcl=yes
12337
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12341$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012342
Skip Montanaro6dead952003-09-25 14:50:04 +000012343# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012344if test "$wchar_h" = yes
12345then
12346 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12348$as_echo_n "checking whether wchar_t is signed... " >&6; }
12349 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12350 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012351else
12352
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012353 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012354 ac_cv_wchar_t_signed=yes
12355else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012357/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012358
12359 #include <wchar.h>
12360 int main()
12361 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000012362 /* Success: exit code 0 */
12363 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012364 }
12365
12366_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012367if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012368 ac_cv_wchar_t_signed=yes
12369else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012370 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012371fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012372rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12373 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012374fi
12375
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012376fi
12377
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12379$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012380fi
12381
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
12383$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012384# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012385if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012386 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012387else
12388 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000012389fi
12390
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012391
12392if test $enable_unicode = yes
12393then
Martin v. Löwisfd917792001-06-27 20:22:04 +000012394 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012395 case "$have_ucs4_tcl" in
12396 yes) enable_unicode="ucs4"
12397 ;;
12398 *) enable_unicode="ucs2"
12399 ;;
12400 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012401fi
12402
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012403
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012404case "$enable_unicode" in
12405ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012406 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012407
12408 ;;
12409ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012410 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012411
12412 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012413*) 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 +000012414esac
12415
Michael W. Hudson54241132001-12-07 15:38:26 +000012416
Martin v. Löwis11437992002-04-12 09:54:03 +000012417
12418
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012419if test "$enable_unicode" = "no"
12420then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012421 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
12423$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012424else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012425 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000012426
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012427$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012428
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012429
12430 # wchar_t is only usable if it maps to an unsigned type
12431 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012432 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012433 then
12434 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012435
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012436$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012437
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012438 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012439
12440 elif test "$ac_cv_sizeof_short" = "$unicode_size"
12441 then
12442 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012443 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012444
12445 elif test "$ac_cv_sizeof_long" = "$unicode_size"
12446 then
12447 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012448 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012449
12450 else
12451 PY_UNICODE_TYPE="no type found"
12452 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12454$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012455fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012456
12457# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12459$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12460if test "${ac_cv_c_bigendian+set}" = set; then :
12461 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012462else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012463 ac_cv_c_bigendian=unknown
12464 # See if we're dealing with a universal compiler.
12465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12466/* end confdefs.h. */
12467#ifndef __APPLE_CC__
12468 not a universal capable compiler
12469 #endif
12470 typedef int dummy;
12471
Skip Montanaro6dead952003-09-25 14:50:04 +000012472_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012473if ac_fn_c_try_compile "$LINENO"; then :
12474
12475 # Check for potential -arch flags. It is not universal unless
12476 # there are at least two -arch flags with different values.
12477 ac_arch=
12478 ac_prev=
12479 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12480 if test -n "$ac_prev"; then
12481 case $ac_word in
12482 i?86 | x86_64 | ppc | ppc64)
12483 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12484 ac_arch=$ac_word
12485 else
12486 ac_cv_c_bigendian=universal
12487 break
12488 fi
12489 ;;
12490 esac
12491 ac_prev=
12492 elif test "x$ac_word" = "x-arch"; then
12493 ac_prev=arch
12494 fi
12495 done
12496fi
12497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12498 if test $ac_cv_c_bigendian = unknown; then
12499 # See if sys/param.h defines the BYTE_ORDER macro.
12500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012501/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012502#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012503 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012504
Martin v. Löwis11437992002-04-12 09:54:03 +000012505int
12506main ()
12507{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012508#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12509 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12510 && LITTLE_ENDIAN)
12511 bogus endian macros
12512 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012513
12514 ;
12515 return 0;
12516}
12517_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012518if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012519 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012521/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012522#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012523 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012524
Martin v. Löwis11437992002-04-12 09:54:03 +000012525int
12526main ()
12527{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012528#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012529 not big endian
12530 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012531
12532 ;
12533 return 0;
12534}
12535_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012536if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012537 ac_cv_c_bigendian=yes
12538else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012539 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012542fi
12543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12544 fi
12545 if test $ac_cv_c_bigendian = unknown; then
12546 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012548/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012549#include <limits.h>
12550
Martin v. Löwis11437992002-04-12 09:54:03 +000012551int
12552main ()
12553{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012554#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12555 bogus endian macros
12556 #endif
12557
Martin v. Löwis11437992002-04-12 09:54:03 +000012558 ;
12559 return 0;
12560}
12561_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012562if ac_fn_c_try_compile "$LINENO"; then :
12563 # It does; now see whether it defined to _BIG_ENDIAN or not.
12564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12565/* end confdefs.h. */
12566#include <limits.h>
12567
12568int
12569main ()
12570{
12571#ifndef _BIG_ENDIAN
12572 not big endian
12573 #endif
12574
12575 ;
12576 return 0;
12577}
12578_ACEOF
12579if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012580 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012581else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012582 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012583fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12585fi
12586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12587 fi
12588 if test $ac_cv_c_bigendian = unknown; then
12589 # Compile a test program.
12590 if test "$cross_compiling" = yes; then :
12591 # Try to guess by grepping values from an object file.
12592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12593/* end confdefs.h. */
12594short int ascii_mm[] =
12595 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12596 short int ascii_ii[] =
12597 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12598 int use_ascii (int i) {
12599 return ascii_mm[i] + ascii_ii[i];
12600 }
12601 short int ebcdic_ii[] =
12602 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12603 short int ebcdic_mm[] =
12604 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12605 int use_ebcdic (int i) {
12606 return ebcdic_mm[i] + ebcdic_ii[i];
12607 }
12608 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012609
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012610int
12611main ()
12612{
12613return use_ascii (foo) == use_ebcdic (foo);
12614 ;
12615 return 0;
12616}
12617_ACEOF
12618if ac_fn_c_try_compile "$LINENO"; then :
12619 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12620 ac_cv_c_bigendian=yes
12621 fi
12622 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12623 if test "$ac_cv_c_bigendian" = unknown; then
12624 ac_cv_c_bigendian=no
12625 else
12626 # finding both strings is unlikely to happen, but who knows?
12627 ac_cv_c_bigendian=unknown
12628 fi
12629 fi
12630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012632else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012634/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012635$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012636int
12637main ()
12638{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012639
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012640 /* Are we little or big endian? From Harbison&Steele. */
12641 union
12642 {
12643 long int l;
12644 char c[sizeof (long int)];
12645 } u;
12646 u.l = 1;
12647 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012648
12649 ;
12650 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012651}
Martin v. Löwis11437992002-04-12 09:54:03 +000012652_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012653if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012654 ac_cv_c_bigendian=no
12655else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012656 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012657fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12659 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012661
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012662 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012663fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12665$as_echo "$ac_cv_c_bigendian" >&6; }
12666 case $ac_cv_c_bigendian in #(
12667 yes)
12668 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12669;; #(
12670 no)
12671 ;; #(
12672 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012673
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012674$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012675
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012676 ;; #(
12677 *)
12678 as_fn_error "unknown endianness
12679 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12680 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012681
Michael W. Hudson54241132001-12-07 15:38:26 +000012682
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012683# Check whether right shifting a negative integer extends the sign bit
12684# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12686$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12687if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12688 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012689else
Martin v. Löwis11437992002-04-12 09:54:03 +000012690
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012691if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012692 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012693else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012695/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012696
12697int main()
12698{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012699 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012700}
12701
Martin v. Löwis11437992002-04-12 09:54:03 +000012702_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012703if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012704 ac_cv_rshift_extends_sign=yes
12705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012706 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012707fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012708rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12709 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012710fi
12711
Martin v. Löwiseba40652007-08-30 20:10:57 +000012712fi
12713
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12715$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012716if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012717then
Martin v. Löwis11437992002-04-12 09:54:03 +000012718
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012719$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012720
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012721fi
12722
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012723# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12725$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12726if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12727 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012728else
Martin v. Löwis11437992002-04-12 09:54:03 +000012729
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012731/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012732#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012733int
12734main ()
12735{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012736
12737 FILE *f = fopen("/dev/null", "r");
12738 flockfile(f);
12739 getc_unlocked(f);
12740 funlockfile(f);
12741
Martin v. Löwis11437992002-04-12 09:54:03 +000012742 ;
12743 return 0;
12744}
12745_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012746if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012747 ac_cv_have_getc_unlocked=yes
12748else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012749 ac_cv_have_getc_unlocked=no
12750fi
12751rm -f core conftest.err conftest.$ac_objext \
12752 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012754
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12756$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012757if test "$ac_cv_have_getc_unlocked" = yes
12758then
Martin v. Löwis11437992002-04-12 09:54:03 +000012759
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012760$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012761
12762fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012763
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012764# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012765# save the value of LIBS so we don't actually link Python with readline
12766LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012767
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012768# On some systems we need to link readline to a termcap compatible
12769# library. NOTE: Keep the precedence of listed libraries synchronised
12770# with setup.py.
12771py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12773$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012774for py_libtermcap in "" ncursesw ncurses curses termcap; do
12775 if test -z "$py_libtermcap"; then
12776 READLINE_LIBS="-lreadline"
12777 else
12778 READLINE_LIBS="-lreadline -l$py_libtermcap"
12779 fi
12780 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012782/* end confdefs.h. */
12783
Martin v. Löwiseba40652007-08-30 20:10:57 +000012784/* Override any GCC internal prototype to avoid an error.
12785 Use char because int might match the return type of a GCC
12786 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012787#ifdef __cplusplus
12788extern "C"
12789#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012790char readline ();
12791int
12792main ()
12793{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012794return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012795 ;
12796 return 0;
12797}
12798_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012799if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012800 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012801fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012802rm -f core conftest.err conftest.$ac_objext \
12803 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012804 if test $py_cv_lib_readline = yes; then
12805 break
12806 fi
12807done
12808# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12809#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000012810if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12812$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012813else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12815$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012816
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012817$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012818
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012819fi
12820
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012821# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12823$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12824if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12825 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012826else
12827 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012828LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012830/* end confdefs.h. */
12831
Martin v. Löwiseba40652007-08-30 20:10:57 +000012832/* Override any GCC internal prototype to avoid an error.
12833 Use char because int might match the return type of a GCC
12834 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012835#ifdef __cplusplus
12836extern "C"
12837#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012838char rl_callback_handler_install ();
12839int
12840main ()
12841{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012842return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012843 ;
12844 return 0;
12845}
12846_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012847if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012848 ac_cv_lib_readline_rl_callback_handler_install=yes
12849else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012850 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012851fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012852rm -f core conftest.err conftest.$ac_objext \
12853 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012854LIBS=$ac_check_lib_save_LIBS
12855fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12857$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12858if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012859
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012860$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012861
12862fi
12863
12864
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012865# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012867/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012868#include <readline/readline.h>
12869_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012870if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012871 have_readline=yes
12872else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012873 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000012874
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012875fi
12876rm -f conftest.err conftest.$ac_ext
12877if test $have_readline = yes
12878then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012880/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012881#include <readline/readline.h>
12882
12883_ACEOF
12884if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012885 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012886
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012887$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012888
12889fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012890rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012891
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012893/* end confdefs.h. */
12894#include <readline/readline.h>
12895
12896_ACEOF
12897if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012898 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012899
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012900$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012901
12902fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012903rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012904
12905fi
12906
Martin v. Löwis0daad592001-09-30 21:09:59 +000012907# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12909$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12910if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12911 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012912else
Martin v. Löwis11437992002-04-12 09:54:03 +000012913 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012914LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012916/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012917
Martin v. Löwiseba40652007-08-30 20:10:57 +000012918/* Override any GCC internal prototype to avoid an error.
12919 Use char because int might match the return type of a GCC
12920 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012921#ifdef __cplusplus
12922extern "C"
12923#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012924char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012925int
12926main ()
12927{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012928return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 ;
12930 return 0;
12931}
12932_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012933if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012934 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012935else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012936 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012937fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012938rm -f core conftest.err conftest.$ac_objext \
12939 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012940LIBS=$ac_check_lib_save_LIBS
12941fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12943$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12944if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012945
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012946$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012947
Martin v. Löwis0daad592001-09-30 21:09:59 +000012948fi
12949
Michael W. Hudson54241132001-12-07 15:38:26 +000012950
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012951# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12953$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12954if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12955 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012956else
12957 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012958LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012960/* end confdefs.h. */
12961
12962/* Override any GCC internal prototype to avoid an error.
12963 Use char because int might match the return type of a GCC
12964 builtin and then its argument prototype would still apply. */
12965#ifdef __cplusplus
12966extern "C"
12967#endif
12968char rl_completion_display_matches_hook ();
12969int
12970main ()
12971{
12972return rl_completion_display_matches_hook ();
12973 ;
12974 return 0;
12975}
12976_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012977if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012978 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12979else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012980 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012981fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012982rm -f core conftest.err conftest.$ac_objext \
12983 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012984LIBS=$ac_check_lib_save_LIBS
12985fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12987$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12988if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012989
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012990$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012991
12992fi
12993
12994
Martin v. Löwis0daad592001-09-30 21:09:59 +000012995# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12997$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12998if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12999 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013000else
Martin v. Löwis11437992002-04-12 09:54:03 +000013001 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013002LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013005
Martin v. Löwiseba40652007-08-30 20:10:57 +000013006/* Override any GCC internal prototype to avoid an error.
13007 Use char because int might match the return type of a GCC
13008 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013009#ifdef __cplusplus
13010extern "C"
13011#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013012char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013013int
13014main ()
13015{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013016return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013017 ;
13018 return 0;
13019}
13020_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013021if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013022 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013023else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013024 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013025fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013026rm -f core conftest.err conftest.$ac_objext \
13027 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013028LIBS=$ac_check_lib_save_LIBS
13029fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13031$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
13032if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013033
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013034$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013035
Guido van Rossum353ae582001-07-10 16:45:32 +000013036fi
13037
Jack Jansendd19cf82001-12-06 22:36:17 +000013038
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013039# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013041/* end confdefs.h. */
13042#include <readline/readline.h>
13043_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013044if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013045 have_readline=yes
13046else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013047 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013048
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013049fi
13050rm -f conftest.err conftest.$ac_ext
13051if test $have_readline = yes
13052then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013054/* end confdefs.h. */
13055#include <readline/readline.h>
13056
13057_ACEOF
13058if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013059 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013060
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013061$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013062
13063fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013064rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013065
13066fi
13067
Martin v. Löwis82bca632006-02-10 20:49:30 +000013068# End of readline checks: restore LIBS
13069LIBS=$LIBS_no_readline
13070
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13072$as_echo_n "checking for broken nice()... " >&6; }
13073if test "${ac_cv_broken_nice+set}" = set; then :
13074 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013075else
Martin v. Löwis11437992002-04-12 09:54:03 +000013076
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013077if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013078 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013079else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013081/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013082
13083int main()
13084{
13085 int val1 = nice(1);
13086 if (val1 != -1 && val1 == nice(2))
13087 exit(0);
13088 exit(1);
13089}
13090
Martin v. Löwis11437992002-04-12 09:54:03 +000013091_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013092if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013093 ac_cv_broken_nice=yes
13094else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013095 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013096fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13098 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013099fi
13100
Martin v. Löwiseba40652007-08-30 20:10:57 +000013101fi
13102
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13104$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013105if test "$ac_cv_broken_nice" = yes
13106then
Martin v. Löwis11437992002-04-12 09:54:03 +000013107
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013108$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013109
13110fi
13111
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13113$as_echo_n "checking for broken poll()... " >&6; }
13114if test "${ac_cv_broken_poll+set}" = set; then :
13115 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013116else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013117 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013118 ac_cv_broken_poll=no
13119else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013121/* end confdefs.h. */
13122
13123#include <poll.h>
13124
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013125int main()
13126{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013127 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013128 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013129
13130 close (42);
13131
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013132 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013133 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013134 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013135 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013136 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013137 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013138 return 1;
13139}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013140
13141_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013142if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013143 ac_cv_broken_poll=yes
13144else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013145 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013146fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013147rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13148 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013150
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013151fi
13152
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13154$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013155if test "$ac_cv_broken_poll" = yes
13156then
13157
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013158$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013159
13160fi
13161
Brett Cannon43802422005-02-10 20:48:03 +000013162# 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 +000013163# (which is not required by ISO C or UNIX spec) and/or if we support
13164# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013165ac_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 +000013166#include <$ac_cv_struct_tm>
13167
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013168"
13169if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013170
13171cat >>confdefs.h <<_ACEOF
13172#define HAVE_STRUCT_TM_TM_ZONE 1
13173_ACEOF
13174
13175
13176fi
13177
13178if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13179
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013180$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013181
13182else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013183 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13184"
13185if test "x$ac_cv_have_decl_tzname" = x""yes; then :
13186 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013187else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013188 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013189fi
13190
Martin v. Löwiseba40652007-08-30 20:10:57 +000013191cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013192#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013193_ACEOF
13194
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13196$as_echo_n "checking for tzname... " >&6; }
13197if test "${ac_cv_var_tzname+set}" = set; then :
13198 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013199else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013201/* end confdefs.h. */
13202#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013203#if !HAVE_DECL_TZNAME
13204extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013205#endif
13206
13207int
13208main ()
13209{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013210return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013211 ;
13212 return 0;
13213}
13214_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013215if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013216 ac_cv_var_tzname=yes
13217else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013218 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013219fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013220rm -f core conftest.err conftest.$ac_objext \
13221 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013222fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13224$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013225 if test $ac_cv_var_tzname = yes; then
13226
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013227$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013228
13229 fi
13230fi
13231
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013232
Martin v. Löwis1d459062005-03-14 21:23:33 +000013233# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13235$as_echo_n "checking for working tzset()... " >&6; }
13236if test "${ac_cv_working_tzset+set}" = set; then :
13237 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013238else
13239
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013240if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013241 ac_cv_working_tzset=no
13242else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013244/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013245
13246#include <stdlib.h>
13247#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013248#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013249
13250#if HAVE_TZNAME
13251extern char *tzname[];
13252#endif
13253
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013254int main()
13255{
Brett Cannon18367812003-09-19 00:59:16 +000013256 /* Note that we need to ensure that not only does tzset(3)
13257 do 'something' with localtime, but it works as documented
13258 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013259 This includes making sure that tzname is set properly if
13260 tm->tm_zone does not exist since it is the alternative way
13261 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013262
13263 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013264 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013265 */
13266
Martin v. Löwis1d459062005-03-14 21:23:33 +000013267 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013268 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13269
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013270 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013271 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013272 if (localtime(&groundhogday)->tm_hour != 0)
13273 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013274#if HAVE_TZNAME
13275 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13276 if (strcmp(tzname[0], "UTC") ||
13277 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13278 exit(1);
13279#endif
Brett Cannon18367812003-09-19 00:59:16 +000013280
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013281 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013282 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013283 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013284 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013285#if HAVE_TZNAME
13286 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13287 exit(1);
13288#endif
Brett Cannon18367812003-09-19 00:59:16 +000013289
13290 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13291 tzset();
13292 if (localtime(&groundhogday)->tm_hour != 11)
13293 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013294#if HAVE_TZNAME
13295 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13296 exit(1);
13297#endif
13298
13299#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013300 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13301 exit(1);
13302 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13303 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013304#endif
Brett Cannon18367812003-09-19 00:59:16 +000013305
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013306 exit(0);
13307}
13308
13309_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013310if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013311 ac_cv_working_tzset=yes
13312else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013313 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013314fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013315rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13316 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013317fi
13318
Martin v. Löwiseba40652007-08-30 20:10:57 +000013319fi
13320
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13322$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013323if test "$ac_cv_working_tzset" = yes
13324then
13325
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013326$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013327
13328fi
13329
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013330# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13332$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13333if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13334 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013335else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013337/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013338#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013339int
13340main ()
13341{
13342
13343struct stat st;
13344st.st_mtim.tv_nsec = 1;
13345
13346 ;
13347 return 0;
13348}
13349_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013350if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013351 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013352else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013353 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13356fi
13357
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13359$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013360if test "$ac_cv_stat_tv_nsec" = yes
13361then
13362
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013363$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013364
13365fi
13366
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013367# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13369$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13370if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13371 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013372else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013374/* end confdefs.h. */
13375#include <sys/stat.h>
13376int
13377main ()
13378{
13379
13380struct stat st;
13381st.st_mtimespec.tv_nsec = 1;
13382
13383 ;
13384 return 0;
13385}
13386_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013387if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013388 ac_cv_stat_tv_nsec2=yes
13389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013390 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013391fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13393fi
13394
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13396$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013397if test "$ac_cv_stat_tv_nsec2" = yes
13398then
13399
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013400$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013401
13402fi
13403
Jack Jansen666b1e72001-10-31 12:11:48 +000013404# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13406$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13407if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13408 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013409else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013411/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013412#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013413int
13414main ()
13415{
Jack Jansen666b1e72001-10-31 12:11:48 +000013416
13417 int rtn;
13418 rtn = mvwdelch(0,0,0);
13419
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 ;
13421 return 0;
13422}
13423_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013424if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013425 ac_cv_mvwdelch_is_expression=yes
13426else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013427 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013428fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13430fi
13431
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13433$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013434
13435if test "$ac_cv_mvwdelch_is_expression" = yes
13436then
Martin v. Löwis11437992002-04-12 09:54:03 +000013437
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013438$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013439
13440fi
13441
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13443$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13444if test "${ac_cv_window_has_flags+set}" = set; then :
13445 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013446else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013448/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013449#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013450int
13451main ()
13452{
Jack Jansen666b1e72001-10-31 12:11:48 +000013453
13454 WINDOW *w;
13455 w->_flags = 0;
13456
Martin v. Löwis11437992002-04-12 09:54:03 +000013457 ;
13458 return 0;
13459}
13460_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013461if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013462 ac_cv_window_has_flags=yes
13463else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013464 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13467fi
13468
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13470$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013471
Jack Jansen666b1e72001-10-31 12:11:48 +000013472
13473if test "$ac_cv_window_has_flags" = yes
13474then
Martin v. Löwis11437992002-04-12 09:54:03 +000013475
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013476$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013477
13478fi
13479
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13481$as_echo_n "checking for is_term_resized... " >&6; }
13482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013483/* end confdefs.h. */
13484#include <curses.h>
13485int
13486main ()
13487{
13488void *x=is_term_resized
13489 ;
13490 return 0;
13491}
13492_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013493if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013494
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013495$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013496
Matthias Klosec511b472010-05-08 11:01:39 +000013497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013498$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013499else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13501$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013502
13503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13505
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13507$as_echo_n "checking for resize_term... " >&6; }
13508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013509/* end confdefs.h. */
13510#include <curses.h>
13511int
13512main ()
13513{
13514void *x=resize_term
13515 ;
13516 return 0;
13517}
13518_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013519if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013520
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013521$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013522
Matthias Klosec511b472010-05-08 11:01:39 +000013523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013524$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013525else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13527$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013528
13529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13531
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13533$as_echo_n "checking for resizeterm... " >&6; }
13534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013535/* end confdefs.h. */
13536#include <curses.h>
13537int
13538main ()
13539{
13540void *x=resizeterm
13541 ;
13542 return 0;
13543}
13544_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013545if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013546
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013547$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013548
Matthias Klosec511b472010-05-08 11:01:39 +000013549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013550$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013551else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13553$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013554
13555fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13557
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13559$as_echo_n "checking for /dev/ptmx... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013560
13561if test -r /dev/ptmx
13562then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13564$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013565
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013566$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013567
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013568else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13570$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013571fi
13572
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13574$as_echo_n "checking for /dev/ptc... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013575
13576if test -r /dev/ptc
13577then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13579$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013580
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013581$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013582
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013583else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13585$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013586fi
13587
Mark Dickinson82864d12009-11-15 16:18:58 +000013588if test "$have_long_long" = yes
13589then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13591$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13592 if test "${ac_cv_have_long_long_format+set}" = set; then :
13593 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000013594else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013595 if test "$cross_compiling" = yes; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013596 ac_cv_have_long_long_format=no
13597else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013599/* end confdefs.h. */
13600
13601 #include <stdio.h>
13602 #include <stddef.h>
13603 #include <string.h>
13604
13605 #ifdef HAVE_SYS_TYPES_H
13606 #include <sys/types.h>
13607 #endif
13608
13609 int main()
13610 {
13611 char buffer[256];
13612
13613 if (sprintf(buffer, "%lld", (long long)123) < 0)
13614 return 1;
13615 if (strcmp(buffer, "123"))
13616 return 1;
13617
13618 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13619 return 1;
13620 if (strcmp(buffer, "-123"))
13621 return 1;
13622
13623 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13624 return 1;
13625 if (strcmp(buffer, "123"))
13626 return 1;
13627
13628 return 0;
13629 }
13630
13631_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013632if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013633 ac_cv_have_long_long_format=yes
13634else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013635 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000013636fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013637rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13638 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013639fi
13640
13641
Mark Dickinson82864d12009-11-15 16:18:58 +000013642fi
13643
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13645$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000013646fi
13647
Mark Dickinson5ce84742009-12-31 20:48:04 +000013648if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000013649then
13650
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013651$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000013652
13653fi
13654
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000013655if test $ac_sys_system = Darwin
13656then
13657 LIBS="$LIBS -framework CoreFoundation"
13658fi
13659
Mark Dickinson82864d12009-11-15 16:18:58 +000013660
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13662$as_echo_n "checking for %zd printf() format support... " >&6; }
13663if test "${ac_cv_have_size_t_format+set}" = set; then :
13664 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013665else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013666 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013667 ac_cv_have_size_t_format="cross -- assuming yes"
13668
Brett Cannon09d12362006-05-11 05:11:33 +000013669else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000013671/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013672
Brett Cannon09d12362006-05-11 05:11:33 +000013673#include <stdio.h>
13674#include <stddef.h>
13675#include <string.h>
13676
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013677#ifdef HAVE_SYS_TYPES_H
13678#include <sys/types.h>
13679#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013680
13681#ifdef HAVE_SSIZE_T
13682typedef ssize_t Py_ssize_t;
13683#elif SIZEOF_VOID_P == SIZEOF_LONG
13684typedef long Py_ssize_t;
13685#else
13686typedef int Py_ssize_t;
13687#endif
Brett Cannon09d12362006-05-11 05:11:33 +000013688
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013689int main()
13690{
13691 char buffer[256];
13692
Brett Cannon09d12362006-05-11 05:11:33 +000013693 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13694 return 1;
13695
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013696 if (strcmp(buffer, "123"))
13697 return 1;
13698
13699 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13700 return 1;
13701
13702 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000013703 return 1;
13704
13705 return 0;
13706}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013707
Brett Cannon09d12362006-05-11 05:11:33 +000013708_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013709if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013710 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013711else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013712 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013713fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13715 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013716fi
13717
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013718fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13720$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013721if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013722
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013723$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013724
13725fi
13726
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013727ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013728#ifdef HAVE_SYS_TYPES_H
13729#include <sys/types.h>
13730#endif
13731#ifdef HAVE_SYS_SOCKET_H
13732#include <sys/socket.h>
13733#endif
13734
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013735"
13736if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013737
Martin v. Löwis11437992002-04-12 09:54:03 +000013738else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013739
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013740$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013741
13742fi
13743
Michael W. Hudson54241132001-12-07 15:38:26 +000013744
Benjamin Peterson7497e912010-10-16 00:53:39 +000013745case $ac_sys_system in
13746AIX*)
13747
13748$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13749 ;;
13750esac
13751
13752
Michael W. Hudson54241132001-12-07 15:38:26 +000013753
13754
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013755for h in `(cd $srcdir;echo Python/thread_*.h)`
13756do
13757 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13758done
13759
Michael W. Hudson54241132001-12-07 15:38:26 +000013760
Neal Norwitzd24499d2005-12-18 21:36:39 +000013761SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13763$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013764for dir in $SRCDIRS; do
13765 if test ! -d $dir; then
13766 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013767 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013768done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13770$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013771
Guido van Rossum627b2d71993-12-24 10:39:16 +000013772# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000013773ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013774
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000013775ac_config_files="$ac_config_files Modules/ld_so_aix"
13776
Martin v. Löwis11437992002-04-12 09:54:03 +000013777cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013778# This file is a shell script that caches the results of configure
13779# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013780# scripts and configure runs, see configure's option --config-cache.
13781# It is not useful on other systems. If it contains results you don't
13782# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013783#
Martin v. Löwis11437992002-04-12 09:54:03 +000013784# config.status only pays attention to the cache file if you give it
13785# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013786#
Skip Montanaro6dead952003-09-25 14:50:04 +000013787# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013788# loading this file, other *unset* `ac_cv_foo' will be assigned the
13789# following values.
13790
13791_ACEOF
13792
Guido van Rossumf78abae1997-01-21 22:02:36 +000013793# The following way of writing the cache mishandles newlines in values,
13794# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013795# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013796# Ultrix sh set writes to stderr and can't be redirected directly,
13797# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013798(
13799 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13800 eval ac_val=\$$ac_var
13801 case $ac_val in #(
13802 *${as_nl}*)
13803 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013804 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13805$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013806 esac
13807 case $ac_var in #(
13808 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013809 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13810 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013811 esac ;;
13812 esac
13813 done
13814
Martin v. Löwis11437992002-04-12 09:54:03 +000013815 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000013816 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13817 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013818 # `set' does not quote correctly, so add quotes: double-quote
13819 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013820 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013821 "s/'/'\\\\''/g;
13822 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013823 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013824 *)
13825 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013826 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013827 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013828 esac |
13829 sort
13830) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013831 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000013832 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013833 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000013834 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013835 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13836 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000013837 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13838 :end' >>confcache
13839if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13840 if test -w "$cache_file"; then
13841 test "x$cache_file" != "x/dev/null" &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013842 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13843$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013844 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013845 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013846 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13847$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013848 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013849fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013850rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013851
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013852test "x$prefix" = xNONE && prefix=$ac_default_prefix
13853# Let make expand exec_prefix.
13854test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013855
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013856DEFS=-DHAVE_CONFIG_H
13857
Skip Montanaro6dead952003-09-25 14:50:04 +000013858ac_libobjs=
13859ac_ltlibobjs=
13860for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13861 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013862 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013863 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000013864 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13865 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013866 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13867 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013868done
13869LIBOBJS=$ac_libobjs
13870
13871LTLIBOBJS=$ac_ltlibobjs
13872
13873
Martin v. Löwis11437992002-04-12 09:54:03 +000013874
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013875
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013876: ${CONFIG_STATUS=./config.status}
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013877ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013878ac_clean_files_save=$ac_clean_files
13879ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013880{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13881$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13882as_write_fail=0
13883cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013884#! $SHELL
13885# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013886# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013887# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013888# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013889
Martin v. Löwis11437992002-04-12 09:54:03 +000013890debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013891ac_cs_recheck=false
13892ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013893
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013894SHELL=\${CONFIG_SHELL-$SHELL}
13895export SHELL
13896_ASEOF
13897cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13898## -------------------- ##
13899## M4sh Initialization. ##
13900## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013901
Martin v. Löwiseba40652007-08-30 20:10:57 +000013902# Be more Bourne compatible
13903DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013904if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013905 emulate sh
13906 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013907 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013908 # is contrary to our usage. Disable this feature.
13909 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013910 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000013911else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013912 case `(set -o) 2>/dev/null` in #(
13913 *posix*) :
13914 set -o posix ;; #(
13915 *) :
13916 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013917esac
Martin v. Löwis11437992002-04-12 09:54:03 +000013918fi
Michael W. Hudson54241132001-12-07 15:38:26 +000013919
Skip Montanaro6dead952003-09-25 14:50:04 +000013920
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013921as_nl='
13922'
13923export as_nl
13924# Printing a long string crashes Solaris 7 /usr/bin/printf.
13925as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13926as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13927as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13928# Prefer a ksh shell builtin over an external printf program on Solaris,
13929# but without wasting forks for bash or zsh.
13930if test -z "$BASH_VERSION$ZSH_VERSION" \
13931 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13932 as_echo='print -r --'
13933 as_echo_n='print -rn --'
13934elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13935 as_echo='printf %s\n'
13936 as_echo_n='printf %s'
13937else
13938 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13939 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13940 as_echo_n='/usr/ucb/echo -n'
13941 else
13942 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13943 as_echo_n_body='eval
13944 arg=$1;
13945 case $arg in #(
13946 *"$as_nl"*)
13947 expr "X$arg" : "X\\(.*\\)$as_nl";
13948 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13949 esac;
13950 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13951 '
13952 export as_echo_n_body
13953 as_echo_n='sh -c $as_echo_n_body as_echo'
13954 fi
13955 export as_echo_body
13956 as_echo='sh -c $as_echo_body as_echo'
13957fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013958
13959# The user is always right.
13960if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013961 PATH_SEPARATOR=:
13962 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13963 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13964 PATH_SEPARATOR=';'
13965 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013966fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013967
Martin v. Löwiseba40652007-08-30 20:10:57 +000013968
13969# IFS
13970# We need space, tab and new line, in precisely that order. Quoting is
13971# there to prevent editors from complaining about space-tab.
13972# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13973# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013974IFS=" "" $as_nl"
13975
13976# Find who we are. Look in the path if we contain no directory separator.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013977case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000013978 *[\\/]* ) as_myself=$0 ;;
13979 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013980for as_dir in $PATH
13981do
13982 IFS=$as_save_IFS
13983 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013984 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13985 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000013986IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013987
Martin v. Löwiseba40652007-08-30 20:10:57 +000013988 ;;
13989esac
13990# We did not find ourselves, most probably we were run as `sh COMMAND'
13991# in which case we are not to be found in the path.
13992if test "x$as_myself" = x; then
13993 as_myself=$0
13994fi
13995if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013996 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13997 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013998fi
13999
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014000# Unset variables that we do not need and which cause bugs (e.g. in
14001# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14002# suppresses any "Segmentation fault" message there. '((' could
14003# trigger a bug in pdksh 5.2.14.
14004for as_var in BASH_ENV ENV MAIL MAILPATH
14005do eval test x\${$as_var+set} = xset \
14006 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014007done
14008PS1='$ '
14009PS2='> '
14010PS4='+ '
14011
14012# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014013LC_ALL=C
14014export LC_ALL
14015LANGUAGE=C
14016export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014017
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014018# CDPATH.
14019(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14020
14021
14022# as_fn_error ERROR [LINENO LOG_FD]
14023# ---------------------------------
14024# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14025# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14026# script with status $?, using 1 if that was 0.
14027as_fn_error ()
14028{
14029 as_status=$?; test $as_status -eq 0 && as_status=1
14030 if test "$3"; then
14031 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14032 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
14033 fi
14034 $as_echo "$as_me: error: $1" >&2
14035 as_fn_exit $as_status
14036} # as_fn_error
14037
14038
14039# as_fn_set_status STATUS
14040# -----------------------
14041# Set $? to STATUS, without forking.
14042as_fn_set_status ()
14043{
14044 return $1
14045} # as_fn_set_status
14046
14047# as_fn_exit STATUS
14048# -----------------
14049# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14050as_fn_exit ()
14051{
14052 set +e
14053 as_fn_set_status $1
14054 exit $1
14055} # as_fn_exit
14056
14057# as_fn_unset VAR
14058# ---------------
14059# Portably unset VAR.
14060as_fn_unset ()
14061{
14062 { eval $1=; unset $1;}
14063}
14064as_unset=as_fn_unset
14065# as_fn_append VAR VALUE
14066# ----------------------
14067# Append the text in VALUE to the end of the definition contained in VAR. Take
14068# advantage of any shell optimizations that allow amortized linear growth over
14069# repeated appends, instead of the typical quadratic growth present in naive
14070# implementations.
14071if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14072 eval 'as_fn_append ()
14073 {
14074 eval $1+=\$2
14075 }'
14076else
14077 as_fn_append ()
14078 {
14079 eval $1=\$$1\$2
14080 }
14081fi # as_fn_append
14082
14083# as_fn_arith ARG...
14084# ------------------
14085# Perform arithmetic evaluation on the ARGs, and store the result in the
14086# global $as_val. Take advantage of shells that can avoid forks. The arguments
14087# must be portable across $(()) and expr.
14088if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14089 eval 'as_fn_arith ()
14090 {
14091 as_val=$(( $* ))
14092 }'
14093else
14094 as_fn_arith ()
14095 {
14096 as_val=`expr "$@" || test $? -eq 1`
14097 }
14098fi # as_fn_arith
14099
14100
Martin v. Löwiseba40652007-08-30 20:10:57 +000014101if expr a : '\(a\)' >/dev/null 2>&1 &&
14102 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14103 as_expr=expr
14104else
14105 as_expr=false
14106fi
14107
14108if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14109 as_basename=basename
14110else
14111 as_basename=false
14112fi
14113
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014114if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14115 as_dirname=dirname
14116else
14117 as_dirname=false
14118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014119
Martin v. Löwiseba40652007-08-30 20:10:57 +000014120as_me=`$as_basename -- "$0" ||
14121$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14122 X"$0" : 'X\(//\)$' \| \
14123 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014124$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014125 sed '/^.*\/\([^/][^/]*\)\/*$/{
14126 s//\1/
14127 q
14128 }
14129 /^X\/\(\/\/\)$/{
14130 s//\1/
14131 q
14132 }
14133 /^X\/\(\/\).*/{
14134 s//\1/
14135 q
14136 }
14137 s/.*/./; q'`
14138
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014139# Avoid depending upon Character Ranges.
14140as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14141as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14142as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14143as_cr_digits='0123456789'
14144as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014145
14146ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014147case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014148-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014149 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014150 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014151 xy) ECHO_C='\c';;
14152 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14153 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014154 esac;;
14155*)
14156 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014157esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014158
Martin v. Löwis11437992002-04-12 09:54:03 +000014159rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014160if test -d conf$$.dir; then
14161 rm -f conf$$.dir/conf$$.file
14162else
14163 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014164 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014165fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014166if (echo >conf$$.file) 2>/dev/null; then
14167 if ln -s conf$$.file conf$$ 2>/dev/null; then
14168 as_ln_s='ln -s'
14169 # ... but there are two gotchas:
14170 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14171 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14172 # In both cases, we have to default to `cp -p'.
14173 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14174 as_ln_s='cp -p'
14175 elif ln conf$$.file conf$$ 2>/dev/null; then
14176 as_ln_s=ln
14177 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014178 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014179 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014180else
14181 as_ln_s='cp -p'
14182fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014183rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14184rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014185
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014186
14187# as_fn_mkdir_p
14188# -------------
14189# Create "$as_dir" as a directory, including parents if necessary.
14190as_fn_mkdir_p ()
14191{
14192
14193 case $as_dir in #(
14194 -*) as_dir=./$as_dir;;
14195 esac
14196 test -d "$as_dir" || eval $as_mkdir_p || {
14197 as_dirs=
14198 while :; do
14199 case $as_dir in #(
14200 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14201 *) as_qdir=$as_dir;;
14202 esac
14203 as_dirs="'$as_qdir' $as_dirs"
14204 as_dir=`$as_dirname -- "$as_dir" ||
14205$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14206 X"$as_dir" : 'X\(//\)[^/]' \| \
14207 X"$as_dir" : 'X\(//\)$' \| \
14208 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14209$as_echo X"$as_dir" |
14210 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14211 s//\1/
14212 q
14213 }
14214 /^X\(\/\/\)[^/].*/{
14215 s//\1/
14216 q
14217 }
14218 /^X\(\/\/\)$/{
14219 s//\1/
14220 q
14221 }
14222 /^X\(\/\).*/{
14223 s//\1/
14224 q
14225 }
14226 s/.*/./; q'`
14227 test -d "$as_dir" && break
14228 done
14229 test -z "$as_dirs" || eval "mkdir $as_dirs"
14230 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
14231
14232
14233} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014234if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014235 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014236else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014237 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014238 as_mkdir_p=false
14239fi
14240
Martin v. Löwiseba40652007-08-30 20:10:57 +000014241if test -x / >/dev/null 2>&1; then
14242 as_test_x='test -x'
14243else
14244 if ls -dL / >/dev/null 2>&1; then
14245 as_ls_L_option=L
14246 else
14247 as_ls_L_option=
14248 fi
14249 as_test_x='
14250 eval sh -c '\''
14251 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014252 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000014253 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014254 case $1 in #(
14255 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014256 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014257 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014258 ???[sx]*):;;*)false;;esac;fi
14259 '\'' sh
14260 '
14261fi
14262as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014263
14264# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014265as_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 +000014266
14267# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014268as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014269
14270
Martin v. Löwis11437992002-04-12 09:54:03 +000014271exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014272## ----------------------------------- ##
14273## Main body of $CONFIG_STATUS script. ##
14274## ----------------------------------- ##
14275_ASEOF
14276test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014277
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014278cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14279# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014280# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000014281# values after options handling.
14282ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000014283This file was extended by python $as_me 2.7, which was
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014284generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014285
14286 CONFIG_FILES = $CONFIG_FILES
14287 CONFIG_HEADERS = $CONFIG_HEADERS
14288 CONFIG_LINKS = $CONFIG_LINKS
14289 CONFIG_COMMANDS = $CONFIG_COMMANDS
14290 $ $0 $@
14291
Martin v. Löwiseba40652007-08-30 20:10:57 +000014292on `(hostname || uname -n) 2>/dev/null | sed 1q`
14293"
14294
Martin v. Löwis11437992002-04-12 09:54:03 +000014295_ACEOF
14296
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014297case $ac_config_files in *"
14298"*) set x $ac_config_files; shift; ac_config_files=$*;;
14299esac
14300
14301case $ac_config_headers in *"
14302"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14303esac
14304
14305
14306cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014307# Files that config.status was made for.
Benjamin Peterson7497e912010-10-16 00:53:39 +000014308config_files="$ac_config_files"
14309config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014310
Martin v. Löwiseba40652007-08-30 20:10:57 +000014311_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014312
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014313cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014314ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014315\`$as_me' instantiates files and other configuration actions
14316from templates according to the current configuration. Unless the files
14317and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014318
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014319Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014320
14321 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000014322 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014323 --config print configuration, then exit
14324 -q, --quiet, --silent
14325 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014326 -d, --debug don't remove temporary files
14327 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014328 --file=FILE[:TEMPLATE]
14329 instantiate the configuration file FILE
14330 --header=FILE[:TEMPLATE]
14331 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014332
14333Configuration files:
14334$config_files
14335
14336Configuration headers:
14337$config_headers
14338
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014339Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000014340
Martin v. Löwiseba40652007-08-30 20:10:57 +000014341_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014342cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14343ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014344ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000014345python config.status 2.7
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014346configured by $0, generated by GNU Autoconf 2.65,
14347 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014348
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014349Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014350This config.status script is free software; the Free Software Foundation
14351gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000014352
14353ac_pwd='$ac_pwd'
14354srcdir='$srcdir'
14355INSTALL='$INSTALL'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014356test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014357_ACEOF
14358
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014359cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14360# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014361ac_need_defaults=:
14362while test $# != 0
14363do
14364 case $1 in
14365 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014366 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14367 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014368 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014369 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014370 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014371 ac_option=$1
14372 ac_optarg=$2
14373 ac_shift=shift
14374 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014375 esac
14376
Skip Montanaro6dead952003-09-25 14:50:04 +000014377 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014378 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014379 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14380 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014381 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014382 $as_echo "$ac_cs_version"; exit ;;
14383 --config | --confi | --conf | --con | --co | --c )
14384 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014385 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014386 debug=: ;;
14387 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014388 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014389 case $ac_optarg in
14390 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14391 esac
14392 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014393 ac_need_defaults=false;;
14394 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014395 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014396 case $ac_optarg in
14397 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14398 esac
14399 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014400 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014401 --he | --h)
14402 # Conflict between --help and --header
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014403 as_fn_error "ambiguous option: \`$1'
14404Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014405 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014406 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014407 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14408 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14409 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014410
14411 # This is an error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014412 -*) as_fn_error "unrecognized option: \`$1'
14413Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014414
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014415 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014416 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014417
14418 esac
14419 shift
14420done
14421
Skip Montanaro6dead952003-09-25 14:50:04 +000014422ac_configure_extra_args=
14423
14424if $ac_cs_silent; then
14425 exec 6>/dev/null
14426 ac_configure_extra_args="$ac_configure_extra_args --silent"
14427fi
14428
14429_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014430cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014431if \$ac_cs_recheck; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014432 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14433 shift
14434 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14435 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014436 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014437 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014438fi
14439
Martin v. Löwis11437992002-04-12 09:54:03 +000014440_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014441cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014442exec 5>>config.log
14443{
14444 echo
14445 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14446## Running $as_me. ##
14447_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014448 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014449} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014450
Martin v. Löwiseba40652007-08-30 20:10:57 +000014451_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014452cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014453_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014454
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014455cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014456
14457# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014458for ac_config_target in $ac_config_targets
14459do
Martin v. Löwiseba40652007-08-30 20:10:57 +000014460 case $ac_config_target in
14461 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14462 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14463 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
14464 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000014465 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14466 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014467 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14468 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014469 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014470 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014471
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014472 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014473 esac
14474done
14475
Martin v. Löwiseba40652007-08-30 20:10:57 +000014476
Martin v. Löwis11437992002-04-12 09:54:03 +000014477# If the user did not use the arguments to specify the items to instantiate,
14478# then the envvar interface is used. Set only those that are not.
14479# We use the long form for the default assignment because of an extremely
14480# bizarre bug on SunOS 4.1.3.
14481if $ac_need_defaults; then
14482 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14483 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14484fi
14485
Skip Montanaro6dead952003-09-25 14:50:04 +000014486# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000014487# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014488# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014489# Hook for its removal unless debugging.
14490# Note that there is a small window in which the directory will not be cleaned:
14491# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014492$debug ||
14493{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014494 tmp=
14495 trap 'exit_status=$?
14496 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14497' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014498 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014499}
Martin v. Löwis11437992002-04-12 09:54:03 +000014500# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014501
Martin v. Löwis11437992002-04-12 09:54:03 +000014502{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014503 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014504 test -n "$tmp" && test -d "$tmp"
14505} ||
14506{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014507 tmp=./conf$$-$RANDOM
14508 (umask 077 && mkdir "$tmp")
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014509} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014510
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014511# Set up the scripts for CONFIG_FILES section.
14512# No need to generate them if there are no CONFIG_FILES.
14513# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014514if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014515
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014516
14517ac_cr=`echo X | tr X '\015'`
14518# On cygwin, bash can eat \r inside `` if the user requested igncr.
14519# But we know of no other shell where ac_cr would be empty at this
14520# point, so we can use a bashism as a fallback.
14521if test "x$ac_cr" = x; then
14522 eval ac_cr=\$\'\\r\'
14523fi
14524ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14525if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14526 ac_cs_awk_cr='\r'
14527else
14528 ac_cs_awk_cr=$ac_cr
14529fi
14530
14531echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014532_ACEOF
14533
Martin v. Löwiseba40652007-08-30 20:10:57 +000014534
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014535{
14536 echo "cat >conf$$subs.awk <<_ACEOF" &&
14537 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14538 echo "_ACEOF"
14539} >conf$$subs.sh ||
14540 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14541ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014542ac_delim='%!_!# '
14543for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014544 . ./conf$$subs.sh ||
14545 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014546
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014547 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14548 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014549 break
14550 elif $ac_last_try; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014551 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014552 else
14553 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014554 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014555done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014556rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000014557
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014558cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14559cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000014560_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014561sed -n '
14562h
14563s/^/S["/; s/!.*/"]=/
14564p
14565g
14566s/^[^!]*!//
14567:repl
14568t repl
14569s/'"$ac_delim"'$//
14570t delim
14571:nl
14572h
14573s/\(.\{148\}\)..*/\1/
14574t more1
14575s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14576p
14577n
14578b repl
14579:more1
14580s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14581p
14582g
14583s/.\{148\}//
14584t nl
14585:delim
14586h
14587s/\(.\{148\}\)..*/\1/
14588t more2
14589s/["\\]/\\&/g; s/^/"/; s/$/"/
14590p
14591b
14592:more2
14593s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14594p
14595g
14596s/.\{148\}//
14597t delim
14598' <conf$$subs.awk | sed '
14599/^[^""]/{
14600 N
14601 s/\n//
14602}
14603' >>$CONFIG_STATUS || ac_write_fail=1
14604rm -f conf$$subs.awk
14605cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14606_ACAWK
14607cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14608 for (key in S) S_is_set[key] = 1
14609 FS = ""
14610
14611}
14612{
14613 line = $ 0
14614 nfields = split(line, field, "@")
14615 substed = 0
14616 len = length(field[1])
14617 for (i = 2; i < nfields; i++) {
14618 key = field[i]
14619 keylen = length(key)
14620 if (S_is_set[key]) {
14621 value = S[key]
14622 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14623 len += length(value) + length(field[++i])
14624 substed = 1
14625 } else
14626 len += 1 + keylen
14627 }
14628
14629 print line
14630}
14631
14632_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000014633_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014634cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14635if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14636 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14637else
14638 cat
14639fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14640 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014641_ACEOF
14642
Martin v. Löwiseba40652007-08-30 20:10:57 +000014643# VPATH may cause trouble with some makes, so we remove $(srcdir),
14644# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14645# trailing colons and then remove the whole line if VPATH becomes empty
14646# (actually we leave an empty line to preserve line numbers).
14647if test "x$srcdir" = x.; then
14648 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14649s/:*\$(srcdir):*/:/
14650s/:*\${srcdir}:*/:/
14651s/:*@srcdir@:*/:/
14652s/^\([^=]*=[ ]*\):*/\1/
14653s/:*$//
14654s/^[^=]*=[ ]*$//
14655}'
14656fi
14657
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014658cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014659fi # test -n "$CONFIG_FILES"
14660
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014661# Set up the scripts for CONFIG_HEADERS section.
14662# No need to generate them if there are no CONFIG_HEADERS.
14663# This happens for instance with `./config.status Makefile'.
14664if test -n "$CONFIG_HEADERS"; then
14665cat >"$tmp/defines.awk" <<\_ACAWK ||
14666BEGIN {
14667_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014668
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014669# Transform confdefs.h into an awk script `defines.awk', embedded as
14670# here-document in config.status, that substitutes the proper values into
14671# config.h.in to produce config.h.
14672
14673# Create a delimiter string that does not exist in confdefs.h, to ease
14674# handling of long lines.
14675ac_delim='%!_!# '
14676for ac_last_try in false false :; do
14677 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14678 if test -z "$ac_t"; then
14679 break
14680 elif $ac_last_try; then
14681 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14682 else
14683 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14684 fi
14685done
14686
14687# For the awk script, D is an array of macro values keyed by name,
14688# likewise P contains macro parameters if any. Preserve backslash
14689# newline sequences.
14690
14691ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14692sed -n '
14693s/.\{148\}/&'"$ac_delim"'/g
14694t rset
14695:rset
14696s/^[ ]*#[ ]*define[ ][ ]*/ /
14697t def
14698d
14699:def
14700s/\\$//
14701t bsnl
14702s/["\\]/\\&/g
14703s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14704D["\1"]=" \3"/p
14705s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14706d
14707:bsnl
14708s/["\\]/\\&/g
14709s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14710D["\1"]=" \3\\\\\\n"\\/p
14711t cont
14712s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14713t cont
14714d
14715:cont
14716n
14717s/.\{148\}/&'"$ac_delim"'/g
14718t clear
14719:clear
14720s/\\$//
14721t bsnlc
14722s/["\\]/\\&/g; s/^/"/; s/$/"/p
14723d
14724:bsnlc
14725s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14726b cont
14727' <confdefs.h | sed '
14728s/'"$ac_delim"'/"\\\
14729"/g' >>$CONFIG_STATUS || ac_write_fail=1
14730
14731cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14732 for (key in D) D_is_set[key] = 1
14733 FS = ""
14734}
14735/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14736 line = \$ 0
14737 split(line, arg, " ")
14738 if (arg[1] == "#") {
14739 defundef = arg[2]
14740 mac1 = arg[3]
14741 } else {
14742 defundef = substr(arg[1], 2)
14743 mac1 = arg[2]
14744 }
14745 split(mac1, mac2, "(") #)
14746 macro = mac2[1]
14747 prefix = substr(line, 1, index(line, defundef) - 1)
14748 if (D_is_set[macro]) {
14749 # Preserve the white space surrounding the "#".
14750 print prefix "define", macro P[macro] D[macro]
14751 next
14752 } else {
14753 # Replace #undef with comments. This is necessary, for example,
14754 # in the case of _POSIX_SOURCE, which is predefined and required
14755 # on some systems where configure will not decide to define it.
14756 if (defundef == "undef") {
14757 print "/*", prefix defundef, macro, "*/"
14758 next
14759 }
14760 }
14761}
14762{ print }
14763_ACAWK
14764_ACEOF
14765cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14766 as_fn_error "could not setup config headers machinery" "$LINENO" 5
14767fi # test -n "$CONFIG_HEADERS"
14768
14769
14770eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14771shift
14772for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000014773do
14774 case $ac_tag in
14775 :[FHLC]) ac_mode=$ac_tag; continue;;
14776 esac
14777 case $ac_mode$ac_tag in
14778 :[FHL]*:*);;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014779 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014780 :[FH]-) ac_tag=-:-;;
14781 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14782 esac
14783 ac_save_IFS=$IFS
14784 IFS=:
14785 set x $ac_tag
14786 IFS=$ac_save_IFS
14787 shift
14788 ac_file=$1
14789 shift
14790
14791 case $ac_mode in
14792 :L) ac_source=$1;;
14793 :[FH])
14794 ac_file_inputs=
14795 for ac_f
14796 do
14797 case $ac_f in
14798 -) ac_f="$tmp/stdin";;
14799 *) # Look for the file first in the build tree, then in the source tree
14800 # (if the path is not absolute). The absolute path cannot be DOS-style,
14801 # because $ac_f cannot contain `:'.
14802 test -f "$ac_f" ||
14803 case $ac_f in
14804 [\\/$]*) false;;
14805 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14806 esac ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014807 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014808 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014809 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14810 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014811 done
14812
14813 # Let's still pretend it is `configure' which instantiates (i.e., don't
14814 # use $as_me), people would be surprised to read:
14815 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014816 configure_input='Generated from '`
14817 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14818 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014819 if test x"$ac_file" != x-; then
14820 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014821 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14822$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014823 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014824 # Neutralize special characters interpreted by sed in replacement strings.
14825 case $configure_input in #(
14826 *\&* | *\|* | *\\* )
14827 ac_sed_conf_input=`$as_echo "$configure_input" |
14828 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14829 *) ac_sed_conf_input=$configure_input;;
14830 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014831
14832 case $ac_tag in
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014833 *:-:* | *:-) cat >"$tmp/stdin" \
14834 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014835 esac
14836 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014837 esac
14838
Martin v. Löwiseba40652007-08-30 20:10:57 +000014839 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014840$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014841 X"$ac_file" : 'X\(//\)[^/]' \| \
14842 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000014843 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014844$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014845 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14846 s//\1/
14847 q
14848 }
14849 /^X\(\/\/\)[^/].*/{
14850 s//\1/
14851 q
14852 }
14853 /^X\(\/\/\)$/{
14854 s//\1/
14855 q
14856 }
14857 /^X\(\/\).*/{
14858 s//\1/
14859 q
14860 }
14861 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014862 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014863 ac_builddir=.
14864
Martin v. Löwiseba40652007-08-30 20:10:57 +000014865case "$ac_dir" in
14866.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14867*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014868 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014869 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014870 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014871 case $ac_top_builddir_sub in
14872 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14873 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14874 esac ;;
14875esac
14876ac_abs_top_builddir=$ac_pwd
14877ac_abs_builddir=$ac_pwd$ac_dir_suffix
14878# for backward compatibility:
14879ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014880
14881case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014882 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014883 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014884 ac_top_srcdir=$ac_top_builddir_sub
14885 ac_abs_top_srcdir=$ac_pwd ;;
14886 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014887 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014888 ac_top_srcdir=$srcdir
14889 ac_abs_top_srcdir=$srcdir ;;
14890 *) # Relative name.
14891 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14892 ac_top_srcdir=$ac_top_build_prefix$srcdir
14893 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014894esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014895ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014896
Martin v. Löwis11437992002-04-12 09:54:03 +000014897
Martin v. Löwiseba40652007-08-30 20:10:57 +000014898 case $ac_mode in
14899 :F)
14900 #
14901 # CONFIG_FILE
14902 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014903
14904 case $INSTALL in
14905 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014906 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014907 esac
Brett Cannon19fab762007-06-02 03:02:29 +000014908_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014909
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014910cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014911# If the template does not know about datarootdir, expand it.
14912# FIXME: This hack should be removed a few years after 2.60.
14913ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014914ac_sed_dataroot='
14915/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000014916 p
14917 q
14918}
14919/@datadir@/p
14920/@docdir@/p
14921/@infodir@/p
14922/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014923/@mandir@/p'
14924case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014925*datarootdir*) ac_datarootdir_seen=yes;;
14926*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14928$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014929_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014930cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014931 ac_datarootdir_hack='
14932 s&@datadir@&$datadir&g
14933 s&@docdir@&$docdir&g
14934 s&@infodir@&$infodir&g
14935 s&@localedir@&$localedir&g
14936 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014937 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014938esac
14939_ACEOF
14940
14941# Neutralize VPATH when `$srcdir' = `.'.
14942# Shell code in configure.ac might set extrasub.
14943# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014944cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14945ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014946$extrasub
14947_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014948cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014949:t
14950/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014951s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000014952s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014953s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000014954s&@srcdir@&$ac_srcdir&;t t
14955s&@abs_srcdir@&$ac_abs_srcdir&;t t
14956s&@top_srcdir@&$ac_top_srcdir&;t t
14957s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14958s&@builddir@&$ac_builddir&;t t
14959s&@abs_builddir@&$ac_abs_builddir&;t t
14960s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14961s&@INSTALL@&$ac_INSTALL&;t t
14962$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014963"
14964eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
14965 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014966
Martin v. Löwiseba40652007-08-30 20:10:57 +000014967test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14968 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14969 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014970 { $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 +000014971which seems to be undefined. Please make sure it is defined." >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014972$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014973which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014974
Martin v. Löwiseba40652007-08-30 20:10:57 +000014975 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014976 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014977 -) cat "$tmp/out" && rm -f "$tmp/out";;
14978 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14979 esac \
14980 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014981 ;;
14982 :H)
14983 #
14984 # CONFIG_HEADER
14985 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014986 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014987 {
14988 $as_echo "/* $configure_input */" \
14989 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14990 } >"$tmp/config.h" \
14991 || as_fn_error "could not create $ac_file" "$LINENO" 5
14992 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14993 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14994$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014995 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014996 rm -f "$ac_file"
14997 mv "$tmp/config.h" "$ac_file" \
14998 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014999 fi
15000 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015001 $as_echo "/* $configure_input */" \
15002 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
15003 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015004 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015005 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015006
Martin v. Löwiseba40652007-08-30 20:10:57 +000015007
15008 esac
15009
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015010
15011 case $ac_file$ac_mode in
15012 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15013
15014 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015015done # for ac_tag
15016
Guido van Rossum627b2d71993-12-24 10:39:16 +000015017
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015018as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015019_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015020ac_clean_files=$ac_clean_files_save
15021
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015022test $ac_write_fail = 0 ||
15023 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
15024
Martin v. Löwis11437992002-04-12 09:54:03 +000015025
15026# configure is writing to config.log, and then calls config.status.
15027# config.status does its own redirection, appending to config.log.
15028# Unfortunately, on DOS this fails, as config.log is still kept open
15029# by configure, so config.status won't be able to write to it; its
15030# output is simply discarded. So we exec the FD to /dev/null,
15031# effectively closing config.log, so it can be properly (re)opened and
15032# appended to by config.status. When coming back to configure, we
15033# need to make the FD available again.
15034if test "$no_create" != yes; then
15035 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015036 ac_config_status_args=
15037 test "$silent" = yes &&
15038 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015039 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015040 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015041 exec 5>>config.log
15042 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15043 # would make configure fail if this is the last instruction.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015044 $ac_cs_success || as_fn_exit $?
15045fi
15046if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15047 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15048$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015049fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015050
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015051
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015052echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015053if test ! -f Modules/Setup
15054then
15055 cp $srcdir/Modules/Setup.dist Modules/Setup
15056fi
15057
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015058echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015059if test ! -f Modules/Setup.local
15060then
15061 echo "# Edit this file for local setup changes" >Modules/Setup.local
15062fi
15063
15064echo "creating Makefile"
15065$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15066 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015067 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015068
15069case $ac_sys_system in
15070BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015071 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015072
15073 Support for BeOS is deprecated as of Python 2.6.
15074 See PEP 11 for the gory details.
15075 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015076$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015077
15078 Support for BeOS is deprecated as of Python 2.6.
15079 See PEP 11 for the gory details.
15080 " >&2;}
15081 ;;
15082*) ;;
15083esac
15084
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015085mv config.c Modules