blob: fbecb6dd0517a371029a4c83c9c5a5a707a21d2f [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002# From configure.in Revision: 84379 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00004# Generated by GNU Autoconf 2.67 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000012#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
220 BASH_ENV=/dev/null
221 ENV=/dev/null
222 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
223 export CONFIG_SHELL
224 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
225fi
226
227 if test x$as_have_required = xno; then :
228 $as_echo "$0: This script requires a shell more modern than all"
229 $as_echo "$0: the shells that I found on your system."
230 if test x${ZSH_VERSION+set} = xset ; then
231 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
232 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
233 else
234 $as_echo "$0: Please tell bug-autoconf@gnu.org and
235$0: http://bugs.python.org/ about your system, including
236$0: any error possibly output before this message. Then
237$0: install a modern shell, or manually run the script
238$0: under such a shell if you do have one."
239 fi
240 exit 1
241fi
242fi
243fi
244SHELL=${CONFIG_SHELL-/bin/sh}
245export SHELL
246# Unset more variables known to interfere with behavior of common tools.
247CLICOLOR_FORCE= GREP_OPTIONS=
248unset CLICOLOR_FORCE GREP_OPTIONS
249
250## --------------------- ##
251## M4sh Shell Functions. ##
252## --------------------- ##
253# as_fn_unset VAR
254# ---------------
255# Portably unset VAR.
256as_fn_unset ()
257{
258 { eval $1=; unset $1;}
259}
260as_unset=as_fn_unset
261
262# as_fn_set_status STATUS
263# -----------------------
264# Set $? to STATUS, without forking.
265as_fn_set_status ()
266{
267 return $1
268} # as_fn_set_status
269
270# as_fn_exit STATUS
271# -----------------
272# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
273as_fn_exit ()
274{
275 set +e
276 as_fn_set_status $1
277 exit $1
278} # as_fn_exit
279
280# as_fn_mkdir_p
281# -------------
282# Create "$as_dir" as a directory, including parents if necessary.
283as_fn_mkdir_p ()
284{
285
286 case $as_dir in #(
287 -*) as_dir=./$as_dir;;
288 esac
289 test -d "$as_dir" || eval $as_mkdir_p || {
290 as_dirs=
291 while :; do
292 case $as_dir in #(
293 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
294 *) as_qdir=$as_dir;;
295 esac
296 as_dirs="'$as_qdir' $as_dirs"
297 as_dir=`$as_dirname -- "$as_dir" ||
298$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
299 X"$as_dir" : 'X\(//\)[^/]' \| \
300 X"$as_dir" : 'X\(//\)$' \| \
301 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
302$as_echo X"$as_dir" |
303 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)[^/].*/{
308 s//\1/
309 q
310 }
311 /^X\(\/\/\)$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\).*/{
316 s//\1/
317 q
318 }
319 s/.*/./; q'`
320 test -d "$as_dir" && break
321 done
322 test -z "$as_dirs" || eval "mkdir $as_dirs"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000323 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000324
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
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000363# as_fn_error STATUS ERROR [LINENO LOG_FD]
364# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000365# 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
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000367# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000370 as_status=$1; test $as_status -eq 0 && as_status=1
371 if test "$4"; then
372 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000374 fi
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000375 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000376 as_fn_exit $as_status
377} # as_fn_error
378
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000379if expr a : '\(a\)' >/dev/null 2>&1 &&
380 test "X`expr 00001 : '.*\(...\)'`" = X001; then
381 as_expr=expr
382else
383 as_expr=false
384fi
385
386if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
387 as_basename=basename
388else
389 as_basename=false
390fi
391
Matthias Kloseb9621712010-04-24 17:59:49 +0000392if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
393 as_dirname=dirname
394else
395 as_dirname=false
396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000397
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000398as_me=`$as_basename -- "$0" ||
399$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
400 X"$0" : 'X\(//\)$' \| \
401 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000402$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000403 sed '/^.*\/\([^/][^/]*\)\/*$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\/\)$/{
408 s//\1/
409 q
410 }
411 /^X\/\(\/\).*/{
412 s//\1/
413 q
414 }
415 s/.*/./; q'`
416
Matthias Kloseb9621712010-04-24 17:59:49 +0000417# Avoid depending upon Character Ranges.
418as_cr_letters='abcdefghijklmnopqrstuvwxyz'
419as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
420as_cr_Letters=$as_cr_letters$as_cr_LETTERS
421as_cr_digits='0123456789'
422as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000423
424
Matthias Kloseb9621712010-04-24 17:59:49 +0000425 as_lineno_1=$LINENO as_lineno_1a=$LINENO
426 as_lineno_2=$LINENO as_lineno_2a=$LINENO
427 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
428 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
429 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430 sed -n '
431 p
432 /[$]LINENO/=
433 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000434 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000435 s/[$]LINENO.*/&-/
436 t lineno
437 b
438 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000439 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440 :loop
441 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000443 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000444 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000445 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000446 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000447
448 # Don't try to exec as it changes $[0], causing all sort of problems
449 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 # original and so on. Autoconf is especially sensitive to this).
451 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 # Exit status is that of the last command.
453 exit
454}
455
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000457case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000458-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000459 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000460 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000461 xy) ECHO_C='\c';;
462 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
463 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000464 esac;;
465*)
466 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000467esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000468
Martin v. Löwis11437992002-04-12 09:54:03 +0000469rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000470if test -d conf$$.dir; then
471 rm -f conf$$.dir/conf$$.file
472else
473 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000474 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000475fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000476if (echo >conf$$.file) 2>/dev/null; then
477 if ln -s conf$$.file conf$$ 2>/dev/null; then
478 as_ln_s='ln -s'
479 # ... but there are two gotchas:
480 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
481 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
482 # In both cases, we have to default to `cp -p'.
483 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
484 as_ln_s='cp -p'
485 elif ln conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s=ln
487 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000490else
491 as_ln_s='cp -p'
492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000493rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
494rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000495
Skip Montanaro6dead952003-09-25 14:50:04 +0000496if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000497 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000498else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000499 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000500 as_mkdir_p=false
501fi
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503if test -x / >/dev/null 2>&1; then
504 as_test_x='test -x'
505else
506 if ls -dL / >/dev/null 2>&1; then
507 as_ls_L_option=L
508 else
509 as_ls_L_option=
510 fi
511 as_test_x='
512 eval sh -c '\''
513 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000514 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000515 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000516 case $1 in #(
517 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000519 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000520 ???[sx]*):;;*)false;;esac;fi
521 '\'' sh
522 '
523fi
524as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000525
526# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000527as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000528
529# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000530as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000531
532
Matthias Kloseb9621712010-04-24 17:59:49 +0000533test -n "$DJDIR" || exec 7<&0 </dev/null
534exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000535
536# Name of the host.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000537# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000538# so uname gets run too.
539ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
540
Martin v. Löwis11437992002-04-12 09:54:03 +0000541#
542# Initializations.
543#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000545ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000546ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000547LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000548cross_compiling=no
549subdirs=
550MFLAGS=
551MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
Martin v. Löwis11437992002-04-12 09:54:03 +0000553# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000554PACKAGE_NAME='python'
555PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000556PACKAGE_VERSION='3.2'
557PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000558PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000559PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
561ac_unique_file="Include/object.h"
562# Factoring default headers for most tests.
563ac_includes_default="\
564#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000565#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# include <sys/types.h>
567#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000569# include <sys/stat.h>
570#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000571#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000572# include <stdlib.h>
573# include <stddef.h>
574#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <stdlib.h>
577# endif
578#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000579#ifdef HAVE_STRING_H
580# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# include <memory.h>
582# endif
583# include <string.h>
584#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000585#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000586# include <strings.h>
587#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000588#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000590#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000591#ifdef HAVE_STDINT_H
592# include <stdint.h>
593#endif
594#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000595# include <unistd.h>
596#endif"
597
Matthias Kloseb9621712010-04-24 17:59:49 +0000598ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000599SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000600THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000601SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000602LIBC
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
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000642USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000643GNULD
644LINKCC
645RUNSHARED
646INSTSONAME
647LDLIBRARYDIR
648BLDLIBRARY
649DLLLIBRARY
650LDLIBRARY
651LIBRARY
652BUILDEXEEXT
653EGREP
654GREP
655CPP
656MAINCC
657CXX
658OBJEXT
659EXEEXT
660ac_ct_CC
661CPPFLAGS
662LDFLAGS
663CFLAGS
664CC
665EXPORT_MACOSX_DEPLOYMENT_TARGET
666CONFIGURE_MACOSX_DEPLOYMENT_TARGET
667SGI_ABI
668MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000669FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000670FRAMEWORKUNIXTOOLSPREFIX
671FRAMEWORKALTINSTALLLAST
672FRAMEWORKALTINSTALLFIRST
673FRAMEWORKINSTALLLAST
674FRAMEWORKINSTALLFIRST
675PYTHONFRAMEWORKINSTALLDIR
676PYTHONFRAMEWORKPREFIX
677PYTHONFRAMEWORKDIR
678PYTHONFRAMEWORKIDENTIFIER
679PYTHONFRAMEWORK
680LIPO_32BIT_FLAGS
681ARCH_RUN_32BIT
682UNIVERSALSDK
683CONFIG_ARGS
684SOVERSION
685VERSION
686target_alias
687host_alias
688build_alias
689LIBS
690ECHO_T
691ECHO_N
692ECHO_C
693DEFS
694mandir
695localedir
696libdir
697psdir
698pdfdir
699dvidir
700htmldir
701infodir
702docdir
703oldincludedir
704includedir
705localstatedir
706sharedstatedir
707sysconfdir
708datadir
709datarootdir
710libexecdir
711sbindir
712bindir
713program_transform_name
714prefix
715exec_prefix
716PACKAGE_URL
717PACKAGE_BUGREPORT
718PACKAGE_STRING
719PACKAGE_VERSION
720PACKAGE_TARNAME
721PACKAGE_NAME
722PATH_SEPARATOR
723SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000724ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000725ac_user_opts='
726enable_option_checking
727enable_universalsdk
728with_universal_archs
729with_framework_name
730enable_framework
731with_gcc
732with_cxx_main
733with_suffix
734enable_shared
735enable_profiling
736with_pydebug
737with_libs
738with_system_expat
739with_system_ffi
740with_dbmliborder
741with_signal_module
742with_dec_threads
743with_threads
744with_thread
745enable_ipv6
746with_doc_strings
747with_tsc
748with_pymalloc
749with_valgrind
750with_wctype_functions
751with_fpectl
752with_libm
753with_libc
754enable_big_digits
755with_wide_unicode
756with_computed_gotos
757'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000758 ac_precious_vars='build_alias
759host_alias
760target_alias
761CC
762CFLAGS
763LDFLAGS
764LIBS
765CPPFLAGS
766CPP'
767
Guido van Rossum627b2d71993-12-24 10:39:16 +0000768
Guido van Rossum7f43da71994-08-01 12:15:30 +0000769# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000770ac_init_help=
771ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000772ac_unrecognized_opts=
773ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000774# The variables have the same names as the options, with
775# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000776cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000777exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000778no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000779no_recursion=
780prefix=NONE
781program_prefix=NONE
782program_suffix=NONE
783program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000785site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000786srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000787verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000788x_includes=NONE
789x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000790
791# Installation directory options.
792# These are left unexpanded so users can "make install exec_prefix=/foo"
793# and all the variables that are supposed to be based on exec_prefix
794# by default will actually change.
795# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000796# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000797bindir='${exec_prefix}/bin'
798sbindir='${exec_prefix}/sbin'
799libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000800datarootdir='${prefix}/share'
801datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000802sysconfdir='${prefix}/etc'
803sharedstatedir='${prefix}/com'
804localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000805includedir='${prefix}/include'
806oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000807docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
808infodir='${datarootdir}/info'
809htmldir='${docdir}'
810dvidir='${docdir}'
811pdfdir='${docdir}'
812psdir='${docdir}'
813libdir='${exec_prefix}/lib'
814localedir='${datarootdir}/locale'
815mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000816
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000818ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000820do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821 # If the previous option needs an argument, assign it.
822 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000823 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824 ac_prev=
825 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000826 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000828 case $ac_option in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000829 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
830 *=) ac_optarg= ;;
831 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000832 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834 # Accept the important Cygnus configure options, so we can diagnose typos.
835
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000836 case $ac_dashdash$ac_option in
837 --)
838 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000840 -bindir | --bindir | --bindi | --bind | --bin | --bi)
841 ac_prev=bindir ;;
842 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844
845 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000846 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000847 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850 -cache-file | --cache-file | --cache-fil | --cache-fi \
851 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
852 ac_prev=cache_file ;;
853 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
854 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000855 cache_file=$ac_optarg ;;
856
857 --config-cache | -C)
858 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000861 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000863 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000864
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000865 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
866 | --dataroo | --dataro | --datar)
867 ac_prev=datarootdir ;;
868 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
869 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
870 datarootdir=$ac_optarg ;;
871
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000873 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000875 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000876 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000877 ac_useropt_orig=$ac_useropt
878 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
879 case $ac_user_opts in
880 *"
881"enable_$ac_useropt"
882"*) ;;
883 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
884 ac_unrecognized_sep=', ';;
885 esac
886 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000887
888 -docdir | --docdir | --docdi | --doc | --do)
889 ac_prev=docdir ;;
890 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
891 docdir=$ac_optarg ;;
892
893 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
894 ac_prev=dvidir ;;
895 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
896 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
898 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000899 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000900 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000901 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000902 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000903 ac_useropt_orig=$ac_useropt
904 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
905 case $ac_user_opts in
906 *"
907"enable_$ac_useropt"
908"*) ;;
909 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
910 ac_unrecognized_sep=', ';;
911 esac
912 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
915 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
916 | --exec | --exe | --ex)
917 ac_prev=exec_prefix ;;
918 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
919 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
920 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
923 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924 # Obsolete; use --with-gas.
925 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 -help | --help | --hel | --he | -h)
928 ac_init_help=long ;;
929 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
930 ac_init_help=recursive ;;
931 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
932 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
934 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000939 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
940 ac_prev=htmldir ;;
941 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
942 | --ht=*)
943 htmldir=$ac_optarg ;;
944
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945 -includedir | --includedir | --includedi | --included | --include \
946 | --includ | --inclu | --incl | --inc)
947 ac_prev=includedir ;;
948 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
949 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
952 -infodir | --infodir | --infodi | --infod | --info | --inf)
953 ac_prev=infodir ;;
954 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956
957 -libdir | --libdir | --libdi | --libd)
958 ac_prev=libdir ;;
959 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000960 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961
962 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
963 | --libexe | --libex | --libe)
964 ac_prev=libexecdir ;;
965 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
966 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000967 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000969 -localedir | --localedir | --localedi | --localed | --locale)
970 ac_prev=localedir ;;
971 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
972 localedir=$ac_optarg ;;
973
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000974 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000975 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976 ac_prev=localstatedir ;;
977 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000978 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000979 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000980
981 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
982 ac_prev=mandir ;;
983 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000984 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000985
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000987 # Obsolete; use --without-fp.
988 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992 no_create=yes ;;
993
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
995 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
996 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000998 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
999 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1000 | --oldin | --oldi | --old | --ol | --o)
1001 ac_prev=oldincludedir ;;
1002 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1003 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1004 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001006
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1008 ac_prev=prefix ;;
1009 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
1012 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1013 | --program-pre | --program-pr | --program-p)
1014 ac_prev=program_prefix ;;
1015 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1016 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1020 | --program-suf | --program-su | --program-s)
1021 ac_prev=program_suffix ;;
1022 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1023 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -program-transform-name | --program-transform-name \
1027 | --program-transform-nam | --program-transform-na \
1028 | --program-transform-n | --program-transform- \
1029 | --program-transform | --program-transfor \
1030 | --program-transfo | --program-transf \
1031 | --program-trans | --program-tran \
1032 | --progr-tra | --program-tr | --program-t)
1033 ac_prev=program_transform_name ;;
1034 -program-transform-name=* | --program-transform-name=* \
1035 | --program-transform-nam=* | --program-transform-na=* \
1036 | --program-transform-n=* | --program-transform-=* \
1037 | --program-transform=* | --program-transfor=* \
1038 | --program-transfo=* | --program-transf=* \
1039 | --program-trans=* | --program-tran=* \
1040 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001043 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1044 ac_prev=pdfdir ;;
1045 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1046 pdfdir=$ac_optarg ;;
1047
1048 -psdir | --psdir | --psdi | --psd | --ps)
1049 ac_prev=psdir ;;
1050 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1051 psdir=$ac_optarg ;;
1052
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1054 | -silent | --silent | --silen | --sile | --sil)
1055 silent=yes ;;
1056
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1058 ac_prev=sbindir ;;
1059 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1060 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062
1063 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1064 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1065 | --sharedst | --shareds | --shared | --share | --shar \
1066 | --sha | --sh)
1067 ac_prev=sharedstatedir ;;
1068 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1069 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1070 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1071 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 -site | --site | --sit)
1075 ac_prev=site ;;
1076 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001078
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1080 ac_prev=srcdir ;;
1081 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001084 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1085 | --syscon | --sysco | --sysc | --sys | --sy)
1086 ac_prev=sysconfdir ;;
1087 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1088 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
1096 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1097 verbose=yes ;;
1098
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 -version | --version | --versio | --versi | --vers | -V)
1100 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
1102 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001103 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001104 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001105 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001106 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001107 ac_useropt_orig=$ac_useropt
1108 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1109 case $ac_user_opts in
1110 *"
1111"with_$ac_useropt"
1112"*) ;;
1113 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1114 ac_unrecognized_sep=', ';;
1115 esac
1116 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117
1118 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001119 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001120 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001121 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001122 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001123 ac_useropt_orig=$ac_useropt
1124 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1125 case $ac_user_opts in
1126 *"
1127"with_$ac_useropt"
1128"*) ;;
1129 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1130 ac_unrecognized_sep=', ';;
1131 esac
1132 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 --x)
1135 # Obsolete; use --with-x.
1136 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
1138 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1139 | --x-incl | --x-inc | --x-in | --x-i)
1140 ac_prev=x_includes ;;
1141 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1142 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144
1145 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1146 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1147 ac_prev=x_libraries ;;
1148 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1149 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001152 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1153Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154 ;;
1155
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 *=*)
1157 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1158 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001159 case $ac_envvar in #(
1160 '' | [0-9]* | *[!_$as_cr_alnum]* )
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001161 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001162 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001163 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 export $ac_envvar ;;
1165
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001168 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001170 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172 ;;
1173
1174 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001175done
1176
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001179 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180fi
1181
Matthias Kloseb9621712010-04-24 17:59:49 +00001182if test -n "$ac_unrecognized_opts"; then
1183 case $enable_option_checking in
1184 no) ;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001185 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001186 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1187 esac
1188fi
1189
1190# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001191for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1192 datadir sysconfdir sharedstatedir localstatedir includedir \
1193 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1194 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001196 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 # Remove trailing slashes.
1198 case $ac_val in
1199 */ )
1200 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1201 eval $ac_var=\$ac_val;;
1202 esac
1203 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001205 [\\/$]* | ?:[\\/]* ) continue;;
1206 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207 esac
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001208 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001209done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210
Martin v. Löwis11437992002-04-12 09:54:03 +00001211# There might be people who depend on the old broken behavior: `$host'
1212# used to hold the argument of --host etc.
1213# FIXME: To remove some day.
1214build=$build_alias
1215host=$host_alias
1216target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217
Martin v. Löwis11437992002-04-12 09:54:03 +00001218# FIXME: To remove some day.
1219if test "x$host_alias" != x; then
1220 if test "x$build_alias" = x; then
1221 cross_compiling=maybe
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001222 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1223 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 elif test "x$build_alias" != "x$host_alias"; then
1225 cross_compiling=yes
1226 fi
1227fi
1228
1229ac_tool_prefix=
1230test -n "$host_alias" && ac_tool_prefix=$host_alias-
1231
1232test "$silent" = yes && exec 6>/dev/null
1233
Guido van Rossum627b2d71993-12-24 10:39:16 +00001234
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001235ac_pwd=`pwd` && test -n "$ac_pwd" &&
1236ac_ls_di=`ls -di .` &&
1237ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001238 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001239test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001240 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001241
1242
Guido van Rossum627b2d71993-12-24 10:39:16 +00001243# Find the source files, if location was not specified.
1244if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001246 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001247 ac_confdir=`$as_dirname -- "$as_myself" ||
1248$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1249 X"$as_myself" : 'X\(//\)[^/]' \| \
1250 X"$as_myself" : 'X\(//\)$' \| \
1251 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1252$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001253 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1254 s//\1/
1255 q
1256 }
1257 /^X\(\/\/\)[^/].*/{
1258 s//\1/
1259 q
1260 }
1261 /^X\(\/\/\)$/{
1262 s//\1/
1263 q
1264 }
1265 /^X\(\/\).*/{
1266 s//\1/
1267 q
1268 }
1269 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001271 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272 srcdir=..
1273 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001274else
1275 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277if test ! -r "$srcdir/$ac_unique_file"; then
1278 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001279 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001281ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1282ac_abs_confdir=`(
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001283 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284 pwd)`
1285# When building in place, set srcdir=.
1286if test "$ac_abs_confdir" = "$ac_pwd"; then
1287 srcdir=.
1288fi
1289# Remove unnecessary trailing slashes from srcdir.
1290# Double slashes in file names in object file debugging info
1291# mess up M-x gdb in Emacs.
1292case $srcdir in
1293*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1294esac
1295for ac_var in $ac_precious_vars; do
1296 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1297 eval ac_env_${ac_var}_value=\$${ac_var}
1298 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1299 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1300done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001301
Martin v. Löwis11437992002-04-12 09:54:03 +00001302#
1303# Report the --help message.
1304#
1305if test "$ac_init_help" = "long"; then
1306 # Omit some internal or obsolete options to make the list less imposing.
1307 # This message is too long to be a string in the A/UX 3.1 sh.
1308 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001309\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001310
1311Usage: $0 [OPTION]... [VAR=VALUE]...
1312
1313To assign environment variables (e.g., CC, CFLAGS...), specify them as
1314VAR=VALUE. See below for descriptions of some of the useful variables.
1315
1316Defaults for the options are specified in brackets.
1317
1318Configuration:
1319 -h, --help display this help and exit
1320 --help=short display options specific to this package
1321 --help=recursive display the short help of all the included packages
1322 -V, --version display version information and exit
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001323 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001324 --cache-file=FILE cache test results in FILE [disabled]
1325 -C, --config-cache alias for \`--cache-file=config.cache'
1326 -n, --no-create do not create output files
1327 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1328
Martin v. Löwis11437992002-04-12 09:54:03 +00001329Installation directories:
1330 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001331 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001332 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001333 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001334
1335By default, \`make install' will install all the files in
1336\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1337an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1338for instance \`--prefix=\$HOME'.
1339
1340For better control, use the options below.
1341
1342Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001343 --bindir=DIR user executables [EPREFIX/bin]
1344 --sbindir=DIR system admin executables [EPREFIX/sbin]
1345 --libexecdir=DIR program executables [EPREFIX/libexec]
1346 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1347 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1348 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1349 --libdir=DIR object code libraries [EPREFIX/lib]
1350 --includedir=DIR C header files [PREFIX/include]
1351 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1352 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1353 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1354 --infodir=DIR info documentation [DATAROOTDIR/info]
1355 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1356 --mandir=DIR man documentation [DATAROOTDIR/man]
1357 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1358 --htmldir=DIR html documentation [DOCDIR]
1359 --dvidir=DIR dvi documentation [DOCDIR]
1360 --pdfdir=DIR pdf documentation [DOCDIR]
1361 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001362_ACEOF
1363
1364 cat <<\_ACEOF
1365_ACEOF
1366fi
1367
1368if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001369 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001370 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001371 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001372 cat <<\_ACEOF
1373
1374Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001375 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001376 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1377 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001378 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001379 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001380 --enable-framework[=INSTALLDIR]
1381 Build (MacOSX|Darwin) framework
1382 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001383 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001384 --enable-ipv6 Enable ipv6 (with ipv4) support
1385 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001386 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001387 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001388
1389Optional Packages:
1390 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1391 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001392 --with-universal-archs=ARCH
1393 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001394 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001395 --with-framework-name=FRAMEWORK
1396 specify an alternate name of the framework built
1397 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001398 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001399 --with-cxx-main=<compiler>
1400 compile main() and link python executable with C++
1401 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001402 --with-suffix=.exe set executable suffix
1403 --with-pydebug build with Py_DEBUG defined
1404 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001405 --with-system-expat build pyexpat module using an installed expat
1406 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001407 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001408 --with-dbmliborder=db1:db2:...
1409 order to check db backends for dbm. Valid value is a
1410 colon separated string with the backend names
1411 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001412 --with-signal-module disable/enable signal module
1413 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1414 --with(out)-threads[=DIRECTORY]
1415 disable/enable thread support
1416 --with(out)-thread[=DIRECTORY]
1417 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001419 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001421 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001422 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001423 --with-fpectl enable SIGFPE catching
1424 --with-libm=STRING math library
1425 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001426 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001427 --with(out)-computed-gotos
1428 Use computed gotos in evaluation loop (enabled by
1429 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001430
1431Some influential environment variables:
1432 CC C compiler command
1433 CFLAGS C compiler flags
1434 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1435 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001436 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001437 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001439 CPP C preprocessor
1440
1441Use these variables to override the choices made by `configure' or to help
1442it to find libraries and programs with nonstandard names/locations.
1443
Georg Brandle2e15612009-05-20 18:25:10 +00001444Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001445_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001446ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001447fi
1448
1449if test "$ac_init_help" = "recursive"; then
1450 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001451 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001452 test -d "$ac_dir" ||
1453 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1454 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001455 ac_builddir=.
1456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001457case "$ac_dir" in
1458.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1459*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001460 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001462 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001463 case $ac_top_builddir_sub in
1464 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1465 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1466 esac ;;
1467esac
1468ac_abs_top_builddir=$ac_pwd
1469ac_abs_builddir=$ac_pwd$ac_dir_suffix
1470# for backward compatibility:
1471ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001472
1473case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001474 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476 ac_top_srcdir=$ac_top_builddir_sub
1477 ac_abs_top_srcdir=$ac_pwd ;;
1478 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480 ac_top_srcdir=$srcdir
1481 ac_abs_top_srcdir=$srcdir ;;
1482 *) # Relative name.
1483 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1484 ac_top_srcdir=$ac_top_build_prefix$srcdir
1485 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001486esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001487ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001488
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001489 cd "$ac_dir" || { ac_status=$?; continue; }
1490 # Check for guested configure.
1491 if test -f "$ac_srcdir/configure.gnu"; then
1492 echo &&
1493 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1494 elif test -f "$ac_srcdir/configure"; then
1495 echo &&
1496 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001497 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001498 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499 fi || ac_status=$?
1500 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001501 done
1502fi
1503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001505if $ac_init_version; then
1506 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001507python configure 3.2
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001508generated by GNU Autoconf 2.67
Martin v. Löwis11437992002-04-12 09:54:03 +00001509
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001510Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001511This configure script is free software; the Free Software Foundation
1512gives unlimited permission to copy, distribute and modify it.
1513_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001514 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001516
1517## ------------------------ ##
1518## Autoconf initialization. ##
1519## ------------------------ ##
1520
1521# ac_fn_c_try_compile LINENO
1522# --------------------------
1523# Try to compile conftest.$ac_ext, and return whether this succeeded.
1524ac_fn_c_try_compile ()
1525{
1526 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1527 rm -f conftest.$ac_objext
1528 if { { ac_try="$ac_compile"
1529case "(($ac_try" in
1530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1531 *) ac_try_echo=$ac_try;;
1532esac
1533eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1534$as_echo "$ac_try_echo"; } >&5
1535 (eval "$ac_compile") 2>conftest.err
1536 ac_status=$?
1537 if test -s conftest.err; then
1538 grep -v '^ *+' conftest.err >conftest.er1
1539 cat conftest.er1 >&5
1540 mv -f conftest.er1 conftest.err
1541 fi
1542 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1543 test $ac_status = 0; } && {
1544 test -z "$ac_c_werror_flag" ||
1545 test ! -s conftest.err
1546 } && test -s conftest.$ac_objext; then :
1547 ac_retval=0
1548else
1549 $as_echo "$as_me: failed program was:" >&5
1550sed 's/^/| /' conftest.$ac_ext >&5
1551
1552 ac_retval=1
1553fi
1554 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1555 as_fn_set_status $ac_retval
1556
1557} # ac_fn_c_try_compile
1558
1559# ac_fn_c_try_cpp LINENO
1560# ----------------------
1561# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1562ac_fn_c_try_cpp ()
1563{
1564 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1565 if { { ac_try="$ac_cpp conftest.$ac_ext"
1566case "(($ac_try" in
1567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1568 *) ac_try_echo=$ac_try;;
1569esac
1570eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1571$as_echo "$ac_try_echo"; } >&5
1572 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1573 ac_status=$?
1574 if test -s conftest.err; then
1575 grep -v '^ *+' conftest.err >conftest.er1
1576 cat conftest.er1 >&5
1577 mv -f conftest.er1 conftest.err
1578 fi
1579 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001580 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001581 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1582 test ! -s conftest.err
1583 }; then :
1584 ac_retval=0
1585else
1586 $as_echo "$as_me: failed program was:" >&5
1587sed 's/^/| /' conftest.$ac_ext >&5
1588
1589 ac_retval=1
1590fi
1591 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1592 as_fn_set_status $ac_retval
1593
1594} # ac_fn_c_try_cpp
1595
1596# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1597# -------------------------------------------------------
1598# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1599# the include files in INCLUDES and setting the cache variable VAR
1600# accordingly.
1601ac_fn_c_check_header_mongrel ()
1602{
1603 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001604 if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1606$as_echo_n "checking for $2... " >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001607if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 $as_echo_n "(cached) " >&6
1609fi
1610eval ac_res=\$$3
1611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1612$as_echo "$ac_res" >&6; }
1613else
1614 # Is the header compilable?
1615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1616$as_echo_n "checking $2 usability... " >&6; }
1617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1618/* end confdefs.h. */
1619$4
1620#include <$2>
1621_ACEOF
1622if ac_fn_c_try_compile "$LINENO"; then :
1623 ac_header_compiler=yes
1624else
1625 ac_header_compiler=no
1626fi
1627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1629$as_echo "$ac_header_compiler" >&6; }
1630
1631# Is the header present?
1632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1633$as_echo_n "checking $2 presence... " >&6; }
1634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1635/* end confdefs.h. */
1636#include <$2>
1637_ACEOF
1638if ac_fn_c_try_cpp "$LINENO"; then :
1639 ac_header_preproc=yes
1640else
1641 ac_header_preproc=no
1642fi
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001643rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1645$as_echo "$ac_header_preproc" >&6; }
1646
1647# So? What about this header?
1648case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1649 yes:no: )
1650 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1651$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1653$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1654 ;;
1655 no:yes:* )
1656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1657$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1659$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1661$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1663$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1665$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001666( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001667## Report this to http://bugs.python.org/ ##
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001668## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001669 ) | sed "s/^/$as_me: WARNING: /" >&2
1670 ;;
1671esac
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1673$as_echo_n "checking for $2... " >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001674if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001675 $as_echo_n "(cached) " >&6
1676else
1677 eval "$3=\$ac_header_compiler"
1678fi
1679eval ac_res=\$$3
1680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1681$as_echo "$ac_res" >&6; }
1682fi
1683 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1684
1685} # ac_fn_c_check_header_mongrel
1686
1687# ac_fn_c_try_run LINENO
1688# ----------------------
1689# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1690# that executables *can* be run.
1691ac_fn_c_try_run ()
1692{
1693 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1694 if { { ac_try="$ac_link"
1695case "(($ac_try" in
1696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1697 *) ac_try_echo=$ac_try;;
1698esac
1699eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1700$as_echo "$ac_try_echo"; } >&5
1701 (eval "$ac_link") 2>&5
1702 ac_status=$?
1703 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1704 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1705 { { case "(($ac_try" in
1706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1707 *) ac_try_echo=$ac_try;;
1708esac
1709eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1710$as_echo "$ac_try_echo"; } >&5
1711 (eval "$ac_try") 2>&5
1712 ac_status=$?
1713 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1714 test $ac_status = 0; }; }; then :
1715 ac_retval=0
1716else
1717 $as_echo "$as_me: program exited with status $ac_status" >&5
1718 $as_echo "$as_me: failed program was:" >&5
1719sed 's/^/| /' conftest.$ac_ext >&5
1720
1721 ac_retval=$ac_status
1722fi
1723 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1724 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1725 as_fn_set_status $ac_retval
1726
1727} # ac_fn_c_try_run
1728
1729# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1730# -------------------------------------------------------
1731# Tests whether HEADER exists and can be compiled using the include files in
1732# INCLUDES, setting the cache variable VAR accordingly.
1733ac_fn_c_check_header_compile ()
1734{
1735 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1737$as_echo_n "checking for $2... " >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001738if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001739 $as_echo_n "(cached) " >&6
1740else
1741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1742/* end confdefs.h. */
1743$4
1744#include <$2>
1745_ACEOF
1746if ac_fn_c_try_compile "$LINENO"; then :
1747 eval "$3=yes"
1748else
1749 eval "$3=no"
1750fi
1751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1752fi
1753eval ac_res=\$$3
1754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1755$as_echo "$ac_res" >&6; }
1756 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1757
1758} # ac_fn_c_check_header_compile
1759
1760# ac_fn_c_try_link LINENO
1761# -----------------------
1762# Try to link conftest.$ac_ext, and return whether this succeeded.
1763ac_fn_c_try_link ()
1764{
1765 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1766 rm -f conftest.$ac_objext conftest$ac_exeext
1767 if { { ac_try="$ac_link"
1768case "(($ac_try" in
1769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1770 *) ac_try_echo=$ac_try;;
1771esac
1772eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1773$as_echo "$ac_try_echo"; } >&5
1774 (eval "$ac_link") 2>conftest.err
1775 ac_status=$?
1776 if test -s conftest.err; then
1777 grep -v '^ *+' conftest.err >conftest.er1
1778 cat conftest.er1 >&5
1779 mv -f conftest.er1 conftest.err
1780 fi
1781 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1782 test $ac_status = 0; } && {
1783 test -z "$ac_c_werror_flag" ||
1784 test ! -s conftest.err
1785 } && test -s conftest$ac_exeext && {
1786 test "$cross_compiling" = yes ||
1787 $as_test_x conftest$ac_exeext
1788 }; then :
1789 ac_retval=0
1790else
1791 $as_echo "$as_me: failed program was:" >&5
1792sed 's/^/| /' conftest.$ac_ext >&5
1793
1794 ac_retval=1
1795fi
1796 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1797 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1798 # interfere with the next link command; also delete a directory that is
1799 # left behind by Apple's compiler. We do this before executing the actions.
1800 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1801 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1802 as_fn_set_status $ac_retval
1803
1804} # ac_fn_c_try_link
1805
1806# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1807# -------------------------------------------
1808# Tests whether TYPE exists after having included INCLUDES, setting cache
1809# variable VAR accordingly.
1810ac_fn_c_check_type ()
1811{
1812 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1814$as_echo_n "checking for $2... " >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001815if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001816 $as_echo_n "(cached) " >&6
1817else
1818 eval "$3=no"
1819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1820/* end confdefs.h. */
1821$4
1822int
1823main ()
1824{
1825if (sizeof ($2))
1826 return 0;
1827 ;
1828 return 0;
1829}
1830_ACEOF
1831if ac_fn_c_try_compile "$LINENO"; then :
1832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1833/* end confdefs.h. */
1834$4
1835int
1836main ()
1837{
1838if (sizeof (($2)))
1839 return 0;
1840 ;
1841 return 0;
1842}
1843_ACEOF
1844if ac_fn_c_try_compile "$LINENO"; then :
1845
1846else
1847 eval "$3=yes"
1848fi
1849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1850fi
1851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1852fi
1853eval ac_res=\$$3
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855$as_echo "$ac_res" >&6; }
1856 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1857
1858} # ac_fn_c_check_type
1859
1860# ac_fn_c_find_uintX_t LINENO BITS VAR
1861# ------------------------------------
1862# Finds an unsigned integer type with width BITS, setting cache variable VAR
1863# accordingly.
1864ac_fn_c_find_uintX_t ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1868$as_echo_n "checking for uint$2_t... " >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001869if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001870 $as_echo_n "(cached) " >&6
1871else
1872 eval "$3=no"
1873 # Order is important - never check a type that is potentially smaller
1874 # than half of the expected target width.
1875 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1876 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1878/* end confdefs.h. */
1879$ac_includes_default
1880int
1881main ()
1882{
1883static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1884test_array [0] = 0
1885
1886 ;
1887 return 0;
1888}
1889_ACEOF
1890if ac_fn_c_try_compile "$LINENO"; then :
1891 case $ac_type in #(
1892 uint$2_t) :
1893 eval "$3=yes" ;; #(
1894 *) :
1895 eval "$3=\$ac_type" ;;
1896esac
1897fi
1898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001899 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001900
1901else
1902 break
1903fi
1904 done
1905fi
1906eval ac_res=\$$3
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1908$as_echo "$ac_res" >&6; }
1909 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1910
1911} # ac_fn_c_find_uintX_t
1912
1913# ac_fn_c_find_intX_t LINENO BITS VAR
1914# -----------------------------------
1915# Finds a signed integer type with width BITS, setting cache variable VAR
1916# accordingly.
1917ac_fn_c_find_intX_t ()
1918{
1919 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1921$as_echo_n "checking for int$2_t... " >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001922if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001923 $as_echo_n "(cached) " >&6
1924else
1925 eval "$3=no"
1926 # Order is important - never check a type that is potentially smaller
1927 # than half of the expected target width.
1928 for ac_type in int$2_t 'int' 'long int' \
1929 'long long int' 'short int' 'signed char'; do
1930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1931/* end confdefs.h. */
1932$ac_includes_default
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001933 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001934int
1935main ()
1936{
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001937static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001938test_array [0] = 0
1939
1940 ;
1941 return 0;
1942}
1943_ACEOF
1944if ac_fn_c_try_compile "$LINENO"; then :
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$ac_includes_default
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001948 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001949int
1950main ()
1951{
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001952static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001953 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1954test_array [0] = 0
1955
1956 ;
1957 return 0;
1958}
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961
1962else
1963 case $ac_type in #(
1964 int$2_t) :
1965 eval "$3=yes" ;; #(
1966 *) :
1967 eval "$3=\$ac_type" ;;
1968esac
1969fi
1970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1971fi
1972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00001973 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001974
1975else
1976 break
1977fi
1978 done
1979fi
1980eval ac_res=\$$3
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982$as_echo "$ac_res" >&6; }
1983 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1984
1985} # ac_fn_c_find_intX_t
1986
1987# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1988# --------------------------------------------
1989# Tries to find the compile-time value of EXPR in a program that includes
1990# INCLUDES, setting VAR accordingly. Returns whether the value could be
1991# computed
1992ac_fn_c_compute_int ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 if test "$cross_compiling" = yes; then
1996 # Depending upon the size, compute the lo and hi bounds.
1997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) >= 0)];
2004test_array [0] = 0
2005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 ac_lo=0 ac_mid=0
2012 while :; do
2013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2020test_array [0] = 0
2021
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 ac_hi=$ac_mid; break
2028else
2029 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2030 if test $ac_lo -le $ac_mid; then
2031 ac_lo= ac_hi=
2032 break
2033 fi
2034 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2035fi
2036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2037 done
2038else
2039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h. */
2041$4
2042int
2043main ()
2044{
2045static int test_array [1 - 2 * !(($2) < 0)];
2046test_array [0] = 0
2047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 ac_hi=-1 ac_mid=-1
2054 while :; do
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2062test_array [0] = 0
2063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_lo=$ac_mid; break
2070else
2071 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2072 if test $ac_mid -le $ac_hi; then
2073 ac_lo= ac_hi=
2074 break
2075 fi
2076 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079 done
2080else
2081 ac_lo= ac_hi=
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086# Binary search between lo and hi bounds.
2087while test "x$ac_lo" != "x$ac_hi"; do
2088 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2090/* end confdefs.h. */
2091$4
2092int
2093main ()
2094{
2095static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2096test_array [0] = 0
2097
2098 ;
2099 return 0;
2100}
2101_ACEOF
2102if ac_fn_c_try_compile "$LINENO"; then :
2103 ac_hi=$ac_mid
2104else
2105 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108done
2109case $ac_lo in #((
2110?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2111'') ac_retval=1 ;;
2112esac
2113 else
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117static long int longval () { return $2; }
2118static unsigned long int ulongval () { return $2; }
2119#include <stdio.h>
2120#include <stdlib.h>
2121int
2122main ()
2123{
2124
2125 FILE *f = fopen ("conftest.val", "w");
2126 if (! f)
2127 return 1;
2128 if (($2) < 0)
2129 {
2130 long int i = longval ();
2131 if (i != ($2))
2132 return 1;
2133 fprintf (f, "%ld", i);
2134 }
2135 else
2136 {
2137 unsigned long int i = ulongval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%lu", i);
2141 }
2142 /* Do not output a trailing newline, as this causes \r\n confusion
2143 on some platforms. */
2144 return ferror (f) || fclose (f) != 0;
2145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_run "$LINENO"; then :
2151 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2152else
2153 ac_retval=1
2154fi
2155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2156 conftest.$ac_objext conftest.beam conftest.$ac_ext
2157rm -f conftest.val
2158
2159 fi
2160 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2161 as_fn_set_status $ac_retval
2162
2163} # ac_fn_c_compute_int
2164
2165# ac_fn_c_check_func LINENO FUNC VAR
2166# ----------------------------------
2167# Tests whether FUNC exists, setting the cache variable VAR accordingly
2168ac_fn_c_check_func ()
2169{
2170 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2172$as_echo_n "checking for $2... " >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002173if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002174 $as_echo_n "(cached) " >&6
2175else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2179 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2180#define $2 innocuous_$2
2181
2182/* System header to define __stub macros and hopefully few prototypes,
2183 which can conflict with char $2 (); below.
2184 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2185 <limits.h> exists even on freestanding compilers. */
2186
2187#ifdef __STDC__
2188# include <limits.h>
2189#else
2190# include <assert.h>
2191#endif
2192
2193#undef $2
2194
2195/* Override any GCC internal prototype to avoid an error.
2196 Use char because int might match the return type of a GCC
2197 builtin and then its argument prototype would still apply. */
2198#ifdef __cplusplus
2199extern "C"
2200#endif
2201char $2 ();
2202/* The GNU C library defines this for functions which it implements
2203 to always fail with ENOSYS. Some functions are actually named
2204 something starting with __ and the normal name is an alias. */
2205#if defined __stub_$2 || defined __stub___$2
2206choke me
2207#endif
2208
2209int
2210main ()
2211{
2212return $2 ();
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_link "$LINENO"; then :
2218 eval "$3=yes"
2219else
2220 eval "$3=no"
2221fi
2222rm -f core conftest.err conftest.$ac_objext \
2223 conftest$ac_exeext conftest.$ac_ext
2224fi
2225eval ac_res=\$$3
2226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2227$as_echo "$ac_res" >&6; }
2228 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2229
2230} # ac_fn_c_check_func
2231
2232# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2233# ----------------------------------------------------
2234# Tries to find if the field MEMBER exists in type AGGR, after including
2235# INCLUDES, setting cache variable VAR accordingly.
2236ac_fn_c_check_member ()
2237{
2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2240$as_echo_n "checking for $2.$3... " >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002241if eval "test \"\${$4+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002242 $as_echo_n "(cached) " >&6
2243else
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h. */
2246$5
2247int
2248main ()
2249{
2250static $2 ac_aggr;
2251if (ac_aggr.$3)
2252return 0;
2253 ;
2254 return 0;
2255}
2256_ACEOF
2257if ac_fn_c_try_compile "$LINENO"; then :
2258 eval "$4=yes"
2259else
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
2262$5
2263int
2264main ()
2265{
2266static $2 ac_aggr;
2267if (sizeof ac_aggr.$3)
2268return 0;
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"; then :
2274 eval "$4=yes"
2275else
2276 eval "$4=no"
2277fi
2278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279fi
2280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2281fi
2282eval ac_res=\$$4
2283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2284$as_echo "$ac_res" >&6; }
2285 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2286
2287} # ac_fn_c_check_member
2288
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002289# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2290# ---------------------------------------------
2291# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2292# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002293ac_fn_c_check_decl ()
2294{
2295 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002296 as_decl_name=`echo $2|sed 's/ *(.*//'`
2297 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2299$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2300if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002301 $as_echo_n "(cached) " >&6
2302else
2303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h. */
2305$4
2306int
2307main ()
2308{
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002309#ifndef $as_decl_name
2310#ifdef __cplusplus
2311 (void) $as_decl_use;
2312#else
2313 (void) $as_decl_name;
2314#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002315#endif
2316
2317 ;
2318 return 0;
2319}
2320_ACEOF
2321if ac_fn_c_try_compile "$LINENO"; then :
2322 eval "$3=yes"
2323else
2324 eval "$3=no"
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327fi
2328eval ac_res=\$$3
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2330$as_echo "$ac_res" >&6; }
2331 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2332
2333} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002334cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002335This file contains any messages produced by compilers while
2336running configure, to aid debugging if configure makes a mistake.
2337
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002338It was created by python $as_me 3.2, which was
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002339generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002340
2341 $ $0 $@
2342
2343_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002344exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002345{
2346cat <<_ASUNAME
2347## --------- ##
2348## Platform. ##
2349## --------- ##
2350
2351hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2352uname -m = `(uname -m) 2>/dev/null || echo unknown`
2353uname -r = `(uname -r) 2>/dev/null || echo unknown`
2354uname -s = `(uname -s) 2>/dev/null || echo unknown`
2355uname -v = `(uname -v) 2>/dev/null || echo unknown`
2356
2357/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2358/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2359
2360/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2361/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2362/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002363/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002364/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2365/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2366/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2367
2368_ASUNAME
2369
2370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2371for as_dir in $PATH
2372do
2373 IFS=$as_save_IFS
2374 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002375 $as_echo "PATH: $as_dir"
2376 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002378
2379} >&5
2380
2381cat >&5 <<_ACEOF
2382
2383
2384## ----------- ##
2385## Core tests. ##
2386## ----------- ##
2387
2388_ACEOF
2389
2390
2391# Keep a trace of the command line.
2392# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002393# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002394# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002395# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002396ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002397ac_configure_args0=
2398ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002399ac_must_keep_next=false
2400for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002401do
Skip Montanaro6dead952003-09-25 14:50:04 +00002402 for ac_arg
2403 do
2404 case $ac_arg in
2405 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2406 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2407 | -silent | --silent | --silen | --sile | --sil)
2408 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 esac
2412 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002417 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002419 case $ac_arg in
2420 *=* | --config-cache | -C | -disable-* | --disable-* \
2421 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2422 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2423 | -with-* | --with-* | -without-* | --without-* | --x)
2424 case "$ac_configure_args0 " in
2425 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2426 esac
2427 ;;
2428 -* ) ac_must_keep_next=true ;;
2429 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 ;;
2433 esac
2434 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002435done
Matthias Kloseb9621712010-04-24 17:59:49 +00002436{ ac_configure_args0=; unset ac_configure_args0;}
2437{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002438
2439# When interrupted or exit'd, cleanup temporary files, and complete
2440# config.log. We remove comments because anyway the quotes in there
2441# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002442# WARNING: Use '\'' to represent an apostrophe within the trap.
2443# 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 +00002444trap 'exit_status=$?
2445 # Save into config.log some information that might help in debugging.
2446 {
2447 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002448
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002449 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002450## Cache variables. ##
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002451## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002452 echo
2453 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Kloseb9621712010-04-24 17:59:49 +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;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac
2463 case $ac_var in #(
2464 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2466 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac ;;
2468 esac
2469 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002470 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 "s/'\''/'\''\\\\'\'''\''/g;
2475 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2476 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002477 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002479 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 esac |
2481 sort
2482)
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002484
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002485 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002486## Output variables. ##
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002487## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 echo
2489 for ac_var in $ac_subst_vars
2490 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 eval ac_val=\$$ac_var
2492 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 done | sort
2497 echo
2498
2499 if test -n "$ac_subst_files"; then
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002500 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501## File substitutions. ##
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002502## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_files
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513 fi
2514
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 if test -s confdefs.h; then
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002516 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002517## confdefs.h. ##
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002518## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
2522 fi
2523 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$as_me: caught signal $ac_signal"
2525 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 rm -f core *.core core.conftest.* &&
2528 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002531for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002533done
2534ac_signal=0
2535
2536# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002538
Matthias Kloseb9621712010-04-24 17:59:49 +00002539$as_echo "/* confdefs.h */" > confdefs.h
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541# Predefined preprocessor variables.
2542
2543cat >>confdefs.h <<_ACEOF
2544#define PACKAGE_NAME "$PACKAGE_NAME"
2545_ACEOF
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_VERSION "$PACKAGE_VERSION"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_STRING "$PACKAGE_STRING"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2561_ACEOF
2562
Matthias Kloseb9621712010-04-24 17:59:49 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_URL "$PACKAGE_URL"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567
2568# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002569# Prefer an explicitly selected file to automatically selected ones.
2570ac_site_file1=NONE
2571ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572if test -n "$CONFIG_SITE"; then
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002573 # We do not want a PATH search for config.site.
2574 case $CONFIG_SITE in #((
2575 -*) ac_site_file1=./$CONFIG_SITE;;
2576 */*) ac_site_file1=$CONFIG_SITE;;
2577 *) ac_site_file1=./$CONFIG_SITE;;
2578 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 ac_site_file1=$prefix/share/config.site
2581 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582else
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 ac_site_file1=$ac_default_prefix/share/config.site
2584 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002586for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587do
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 test "x$ac_site_file" = xNONE && continue
2589 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2590 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2591$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 sed 's/^/| /' "$ac_site_file" >&5
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002593 . "$ac_site_file" \
2594 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2596as_fn_error $? "failed to load site script $ac_site_file
2597See \`config.log' for more details" "$LINENO" 5 ; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002598 fi
2599done
2600
2601if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 # Some versions of bash will fail to source /dev/null (special files
2603 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2604 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2606$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2609 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 esac
2611 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612else
Matthias Kloseb9621712010-04-24 17:59:49 +00002613 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2614$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 >$cache_file
2616fi
2617
2618# Check that the precious variables saved in the cache have kept the same
2619# value.
2620ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2623 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2625 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 case $ac_old_set,$ac_new_set in
2627 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2629$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 +00002630 ac_cache_corrupted=: ;;
2631 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2633$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 ac_cache_corrupted=: ;;
2635 ,);;
2636 *)
2637 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 # differences in whitespace do not lead to failure.
2639 ac_old_val_w=`echo x $ac_old_val`
2640 ac_new_val_w=`echo x $ac_new_val`
2641 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2643$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2644 ac_cache_corrupted=:
2645 else
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2647$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2648 eval $ac_var=\$ac_old_val
2649 fi
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2651$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2653$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 fi;;
2655 esac
2656 # Pass precious variables to config.status.
2657 if test "$ac_new_set" = set; then
2658 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 *) ac_arg=$ac_var=$ac_new_val ;;
2661 esac
2662 case " $ac_configure_args " in
2663 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 esac
2666 fi
2667done
2668if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2670$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2672$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002673 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002675## -------------------- ##
2676## Main body of script. ##
2677## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002678
Guido van Rossum7f43da71994-08-01 12:15:30 +00002679ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002681ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2682ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2683ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684
Guido van Rossum627b2d71993-12-24 10:39:16 +00002685
Michael W. Hudson54241132001-12-07 15:38:26 +00002686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002687ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002688
2689
Martin v. Löwis11437992002-04-12 09:54:03 +00002690
Benjamin Petersond23f8222009-04-05 19:13:16 +00002691if test "$prefix" != "/"; then
2692 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2693fi
2694
2695
Martin v. Löwis11437992002-04-12 09:54:03 +00002696
2697
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002698# We don't use PACKAGE_ variables, and they cause conflicts
2699# with other autoconf-based packages that include Python.h
2700grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2701rm confdefs.h
2702mv confdefs.h.new confdefs.h
2703
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002704
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002705VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002706
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002707# Version number or Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002708
2709SOVERSION=1.0
2710
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002711# The later defininition of _XOPEN_SOURCE disables certain features
2712# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2713
Matthias Kloseb9621712010-04-24 17:59:49 +00002714$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002715
2716
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002717# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2718# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2719# them.
2720
Matthias Kloseb9621712010-04-24 17:59:49 +00002721$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002722
2723
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002724# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2725# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2726# them.
2727
Matthias Kloseb9621712010-04-24 17:59:49 +00002728$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002729
2730
Martin v. Löwisd6320502004-08-12 13:45:08 +00002731# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2732# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2733
Matthias Kloseb9621712010-04-24 17:59:49 +00002734$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002735
2736
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002737# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2738# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2739# them.
2740
Matthias Kloseb9621712010-04-24 17:59:49 +00002741$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002742
2743
2744
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002745define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002746
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002747# Arguments passed to configure.
2748
2749CONFIG_ARGS="$ac_configure_args"
2750
Matthias Kloseb9621712010-04-24 17:59:49 +00002751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2752$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002753# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002754if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002755 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002756 case $enableval in
2757 yes)
2758 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002759 if test ! -d "${enableval}"
2760 then
2761 enableval=/
2762 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002763 ;;
2764 esac
2765 case $enableval in
2766 no)
2767 UNIVERSALSDK=
2768 enable_universalsdk=
2769 ;;
2770 *)
2771 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002772 if test ! -d "${UNIVERSALSDK}"
2773 then
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00002774 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002775 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002776 ;;
2777 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002778
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002779
Thomas Wouters477c8d52006-05-27 19:21:47 +00002780else
2781
2782 UNIVERSALSDK=
2783 enable_universalsdk=
2784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002785fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002786
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002787if test -n "${UNIVERSALSDK}"
2788then
Matthias Kloseb9621712010-04-24 17:59:49 +00002789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2790$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002791else
Matthias Kloseb9621712010-04-24 17:59:49 +00002792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2793$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002794fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002796
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002797
2798
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002799UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002800
Matthias Kloseb9621712010-04-24 17:59:49 +00002801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2802$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002803
2804# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002805if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002806 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2808$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002809 UNIVERSAL_ARCHS="$withval"
2810
2811else
2812
Matthias Kloseb9621712010-04-24 17:59:49 +00002813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2814$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002815
2816fi
2817
2818
2819
2820
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002821
2822# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002823if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002824 withval=$with_framework_name;
2825 PYTHONFRAMEWORK=${withval}
2826 PYTHONFRAMEWORKDIR=${withval}.framework
2827 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2828
2829else
2830
2831 PYTHONFRAMEWORK=Python
2832 PYTHONFRAMEWORKDIR=Python.framework
2833 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2834
2835fi
2836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002837# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002838if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002839 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002840 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002841 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002842 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002843 esac
2844 case $enableval in
2845 no)
2846 PYTHONFRAMEWORK=
2847 PYTHONFRAMEWORKDIR=no-framework
2848 PYTHONFRAMEWORKPREFIX=
2849 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002850 FRAMEWORKINSTALLFIRST=
2851 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002852 FRAMEWORKALTINSTALLFIRST=
2853 FRAMEWORKALTINSTALLLAST=
2854 if test "x${prefix}" = "xNONE"; then
2855 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2856 else
2857 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2858 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002859 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002860 ;;
2861 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002862 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002863 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002864 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002865 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002866 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2867 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002868 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002869
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002870 if test "x${prefix}" = "xNONE" ; then
2871 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002872
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002873 else
2874 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2875 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002876
2877 case "${enableval}" in
2878 /System*)
2879 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2880 if test "${prefix}" = "NONE" ; then
2881 # See below
2882 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2883 fi
2884 ;;
2885
2886 /Library*)
2887 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2888 ;;
2889
2890 */Library/Frameworks)
2891 MDIR="`dirname "${enableval}"`"
2892 MDIR="`dirname "${MDIR}"`"
2893 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2894
2895 if test "${prefix}" = "NONE"; then
2896 # User hasn't specified the
2897 # --prefix option, but wants to install
2898 # the framework in a non-default location,
2899 # ensure that the compatibility links get
2900 # installed relative to that prefix as well
2901 # instead of in /usr/local.
2902 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2903 fi
2904 ;;
2905
2906 *)
2907 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2908 ;;
2909 esac
2910
Jack Jansen127e56e2001-09-11 14:41:54 +00002911 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002912
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002913 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002914 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002915 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002917 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002918
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002919 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2920
2921 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2922
Jack Jansene578a632001-08-15 01:27:14 +00002923 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002924
Guido van Rossum563e7081996-09-10 18:20:48 +00002925else
Martin v. Löwis11437992002-04-12 09:54:03 +00002926
Jack Jansene578a632001-08-15 01:27:14 +00002927 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002928 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002929 PYTHONFRAMEWORKPREFIX=
2930 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002931 FRAMEWORKINSTALLFIRST=
2932 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002933 FRAMEWORKALTINSTALLFIRST=
2934 FRAMEWORKALTINSTALLLAST=
2935 if test "x${prefix}" = "xNONE" ; then
2936 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2937 else
2938 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2939 fi
Jack Jansene578a632001-08-15 01:27:14 +00002940 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002941
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002943fi
2944
Thomas Wouters477c8d52006-05-27 19:21:47 +00002945
2946
Michael W. Hudson54241132001-12-07 15:38:26 +00002947
2948
2949
2950
Jack Jansene578a632001-08-15 01:27:14 +00002951
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002952
2953
2954
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002955
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002956
Jack Jansene578a632001-08-15 01:27:14 +00002957##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002958## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002959## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002960##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002961# Set name for machine-dependent library files
2962
Matthias Kloseb9621712010-04-24 17:59:49 +00002963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2964$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002965if test -z "$MACHDEP"
2966then
Guido van Rossum563e7081996-09-10 18:20:48 +00002967 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002968 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002969 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002970 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002971 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002972 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002973 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002974 ac_md_system=`echo $ac_sys_system |
2975 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2976 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002977 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002978 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002979
Guido van Rossum07397971997-04-29 21:49:50 +00002980 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002981 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002982 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002983 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002984 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002985 esac
2986fi
Guido van Rossum91922671997-10-09 20:24:13 +00002987
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002988# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2989# disable features if it is defined, without any means to access these
2990# features as extensions. For these systems, we skip the definition of
2991# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2992# some feature, make sure there is no alternative way to access this
2993# feature. Also, when using wildcards, make sure you have verified the
2994# need for not defining _XOPEN_SOURCE on all systems matching the
2995# wildcard, and that the wildcard does not include future systems
2996# (which may remove their limitations).
2997case $ac_sys_system/$ac_sys_release in
2998 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2999 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003000 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003001 # In addition, Stefan Krah confirms that issue #1244610 exists through
3002 # OpenBSD 4.6, but is fixed in 4.7.
3003 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003004 define_xopen_source=no
3005 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3006 # also defined. This can be overridden by defining _BSD_SOURCE
3007 # As this has a different meaning on Linux, only define it on OpenBSD
3008
Matthias Kloseb9621712010-04-24 17:59:49 +00003009$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003010
3011 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003012 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003013 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3014 # also defined. This can be overridden by defining _BSD_SOURCE
3015 # As this has a different meaning on Linux, only define it on OpenBSD
3016
Matthias Kloseb9621712010-04-24 17:59:49 +00003017$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003018
3019 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003020 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3021 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3022 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003023 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003024 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003025 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3026 # request to enable features supported by the standard as a request
3027 # to disable features not supported by the standard. The best way
3028 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3029 # entirely and define __EXTENSIONS__ instead.
3030 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003031 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003032 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3033 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003034 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003035 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003036 define_xopen_source=no;;
3037 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003038 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003039 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003040 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003041 # On FreeBSD 4, the math functions C89 does not cover are never defined
3042 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3043 FreeBSD/4.*)
3044 define_xopen_source=no;;
3045 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3046 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3047 # identifies itself as Darwin/7.*
3048 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3049 # disables platform specific features beyond repair.
3050 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3051 # has no effect, don't bother defining them
3052 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003053 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003054 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003055 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003056 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3057 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3058 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003059 AIX/4)
3060 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003061 AIX/5)
3062 if test `uname -r` -eq 1; then
3063 define_xopen_source=no
3064 fi
3065 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003066 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3067 # defining NI_NUMERICHOST.
3068 QNX/6.3.2)
3069 define_xopen_source=no
3070 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003071
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003072esac
3073
3074if test $define_xopen_source = yes
3075then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003076
Matthias Kloseb9621712010-04-24 17:59:49 +00003077$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003078
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003079
3080 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3081 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3082 # several APIs are not declared. Since this is also needed in some
3083 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003084
Matthias Kloseb9621712010-04-24 17:59:49 +00003085$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003086
3087
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003088
Matthias Kloseb9621712010-04-24 17:59:49 +00003089$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003090
3091
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003092fi
3093
Guido van Rossum91922671997-10-09 20:24:13 +00003094#
3095# SGI compilers allow the specification of the both the ABI and the
3096# ISA on the command line. Depending on the values of these switches,
3097# different and often incompatable code will be generated.
3098#
3099# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3100# thus supply support for various ABI/ISA combinations. The MACHDEP
3101# variable is also adjusted.
3102#
3103
3104if test ! -z "$SGI_ABI"
3105then
3106 CC="cc $SGI_ABI"
3107 LDFLAGS="$SGI_ABI $LDFLAGS"
3108 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3111$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003112
Jack Jansen6b08a402004-06-03 12:41:45 +00003113# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3114# it may influence the way we can build extensions, so distutils
3115# needs to check it
3116
Thomas Wouters477c8d52006-05-27 19:21:47 +00003117
Jack Jansen6b08a402004-06-03 12:41:45 +00003118CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003119EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003120
Matthias Kloseb9621712010-04-24 17:59:49 +00003121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3122$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003123ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3125$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003126
Guido van Rossum627b2d71993-12-24 10:39:16 +00003127# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003128
3129# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3130# for debug/optimization stuff. BASECFLAGS is for flags that are required
3131# just to get things to compile and link. Users are free to override OPT
3132# when running configure or make. The build should not break if they do.
3133# BASECFLAGS should generally not be messed with, however.
3134
3135# XXX shouldn't some/most/all of this code be merged with the stuff later
3136# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3138$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003140# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003141if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003142 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003143 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003144 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003145 without_gcc=yes;;
3146 yes) CC=gcc
3147 without_gcc=no;;
3148 *) CC=$withval
3149 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003150 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003151else
Martin v. Löwis11437992002-04-12 09:54:03 +00003152
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003153 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003154 AIX*) CC=cc_r
3155 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003156 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003157 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003158fi
3159
Matthias Kloseb9621712010-04-24 17:59:49 +00003160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3161$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003162
Guido van Rossum8b131c51995-03-09 14:10:13 +00003163# If the user switches compilers, we can't believe the cache
3164if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3165then
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00003166 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003167(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003168fi
3169
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003170# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3171# when the compiler supports them, but we don't always want -O2, and
3172# we set -g later.
3173if test -z "$CFLAGS"; then
3174 CFLAGS=
3175fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003176ac_ext=c
3177ac_cpp='$CPP $CPPFLAGS'
3178ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3179ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3180ac_compiler_gnu=$ac_cv_c_compiler_gnu
3181if test -n "$ac_tool_prefix"; then
3182 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3183set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185$as_echo_n "checking for $ac_word... " >&6; }
3186if test "${ac_cv_prog_CC+set}" = set; then :
3187 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003188else
3189 if test -n "$CC"; then
3190 ac_cv_prog_CC="$CC" # Let the user override the test.
3191else
Martin v. Löwis11437992002-04-12 09:54:03 +00003192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3193for as_dir in $PATH
3194do
3195 IFS=$as_save_IFS
3196 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003197 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198 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 +00003199 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003200 $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 +00003201 break 2
3202 fi
3203done
Matthias Kloseb9621712010-04-24 17:59:49 +00003204 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003205IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003206
Jack Jansendd19cf82001-12-06 22:36:17 +00003207fi
3208fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003209CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003210if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3212$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003213else
Matthias Kloseb9621712010-04-24 17:59:49 +00003214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3215$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003216fi
3217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003218
Martin v. Löwis11437992002-04-12 09:54:03 +00003219fi
3220if test -z "$ac_cv_prog_CC"; then
3221 ac_ct_CC=$CC
3222 # Extract the first word of "gcc", so it can be a program name with args.
3223set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3225$as_echo_n "checking for $ac_word... " >&6; }
3226if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3227 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003228else
3229 if test -n "$ac_ct_CC"; then
3230 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3231else
3232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3233for as_dir in $PATH
3234do
3235 IFS=$as_save_IFS
3236 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003237 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003238 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 +00003239 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003240 $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 +00003241 break 2
3242 fi
3243done
Matthias Kloseb9621712010-04-24 17:59:49 +00003244 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003245IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003246
3247fi
3248fi
3249ac_ct_CC=$ac_cv_prog_ac_ct_CC
3250if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3252$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003253else
Matthias Kloseb9621712010-04-24 17:59:49 +00003254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3255$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003256fi
3257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003258 if test "x$ac_ct_CC" = x; then
3259 CC=""
3260 else
3261 case $cross_compiling:$ac_tool_warned in
3262yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003263{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3264$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003265ac_tool_warned=yes ;;
3266esac
3267 CC=$ac_ct_CC
3268 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003269else
3270 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003271fi
3272
Jack Jansendd19cf82001-12-06 22:36:17 +00003273if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003274 if test -n "$ac_tool_prefix"; then
3275 # 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 +00003276set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3278$as_echo_n "checking for $ac_word... " >&6; }
3279if test "${ac_cv_prog_CC+set}" = set; then :
3280 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003281else
3282 if test -n "$CC"; then
3283 ac_cv_prog_CC="$CC" # Let the user override the test.
3284else
Martin v. Löwis11437992002-04-12 09:54:03 +00003285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3286for as_dir in $PATH
3287do
3288 IFS=$as_save_IFS
3289 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003290 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003291 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 +00003292 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003293 $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 +00003294 break 2
3295 fi
3296done
Matthias Kloseb9621712010-04-24 17:59:49 +00003297 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003298IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003299
3300fi
3301fi
3302CC=$ac_cv_prog_CC
3303if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3305$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003306else
Matthias Kloseb9621712010-04-24 17:59:49 +00003307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3308$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003309fi
3310
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311
Martin v. Löwis11437992002-04-12 09:54:03 +00003312 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003313fi
3314if test -z "$CC"; then
3315 # Extract the first word of "cc", so it can be a program name with args.
3316set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3318$as_echo_n "checking for $ac_word... " >&6; }
3319if test "${ac_cv_prog_CC+set}" = set; then :
3320 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003321else
3322 if test -n "$CC"; then
3323 ac_cv_prog_CC="$CC" # Let the user override the test.
3324else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003325 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3327for as_dir in $PATH
3328do
3329 IFS=$as_save_IFS
3330 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003331 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003332 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 +00003333 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3334 ac_prog_rejected=yes
3335 continue
3336 fi
3337 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003338 $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 +00003339 break 2
3340 fi
3341done
Matthias Kloseb9621712010-04-24 17:59:49 +00003342 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003343IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003344
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003345if test $ac_prog_rejected = yes; then
3346 # We found a bogon in the path, so make sure we never use it.
3347 set dummy $ac_cv_prog_CC
3348 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003349 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003350 # We chose a different compiler from the bogus one.
3351 # However, it has the same basename, so the bogon will be chosen
3352 # first if we set CC to just the basename; use the full file name.
3353 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003354 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003355 fi
3356fi
3357fi
3358fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003359CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003360if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3362$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003363else
Matthias Kloseb9621712010-04-24 17:59:49 +00003364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3365$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003366fi
3367
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003368
Martin v. Löwis11437992002-04-12 09:54:03 +00003369fi
3370if test -z "$CC"; then
3371 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003372 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003373 do
3374 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3375set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3377$as_echo_n "checking for $ac_word... " >&6; }
3378if test "${ac_cv_prog_CC+set}" = set; then :
3379 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003380else
3381 if test -n "$CC"; then
3382 ac_cv_prog_CC="$CC" # Let the user override the test.
3383else
Martin v. Löwis11437992002-04-12 09:54:03 +00003384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3385for as_dir in $PATH
3386do
3387 IFS=$as_save_IFS
3388 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003389 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003390 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 +00003391 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003392 $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 +00003393 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003394 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003395done
Matthias Kloseb9621712010-04-24 17:59:49 +00003396 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003397IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003398
3399fi
3400fi
3401CC=$ac_cv_prog_CC
3402if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3404$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003405else
Matthias Kloseb9621712010-04-24 17:59:49 +00003406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3407$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003408fi
3409
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003410
Martin v. Löwis11437992002-04-12 09:54:03 +00003411 test -n "$CC" && break
3412 done
3413fi
3414if test -z "$CC"; then
3415 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003416 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003417do
3418 # Extract the first word of "$ac_prog", so it can be a program name with args.
3419set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3421$as_echo_n "checking for $ac_word... " >&6; }
3422if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3423 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003424else
3425 if test -n "$ac_ct_CC"; then
3426 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3427else
3428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3429for as_dir in $PATH
3430do
3431 IFS=$as_save_IFS
3432 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003433 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003434 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 +00003435 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003436 $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 +00003437 break 2
3438 fi
3439done
Matthias Kloseb9621712010-04-24 17:59:49 +00003440 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003441IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003442
Martin v. Löwis11437992002-04-12 09:54:03 +00003443fi
3444fi
3445ac_ct_CC=$ac_cv_prog_ac_ct_CC
3446if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3448$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003449else
Matthias Kloseb9621712010-04-24 17:59:49 +00003450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3451$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003452fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003454
Martin v. Löwis11437992002-04-12 09:54:03 +00003455 test -n "$ac_ct_CC" && break
3456done
Michael W. Hudson54241132001-12-07 15:38:26 +00003457
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458 if test "x$ac_ct_CC" = x; then
3459 CC=""
3460 else
3461 case $cross_compiling:$ac_tool_warned in
3462yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003463{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3464$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465ac_tool_warned=yes ;;
3466esac
3467 CC=$ac_ct_CC
3468 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003469fi
3470
3471fi
3472
3473
Matthias Kloseb9621712010-04-24 17:59:49 +00003474test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3475$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00003476as_fn_error $? "no acceptable C compiler found in \$PATH
3477See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003478
3479# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003480$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3481set X $ac_compile
3482ac_compiler=$2
3483for ac_option in --version -v -V -qversion; do
3484 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003485case "(($ac_try" in
3486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3487 *) ac_try_echo=$ac_try;;
3488esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003489eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3490$as_echo "$ac_try_echo"; } >&5
3491 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003493 if test -s conftest.err; then
3494 sed '10a\
3495... rest of stderr output deleted ...
3496 10q' conftest.err >conftest.er1
3497 cat conftest.er1 >&5
3498 fi
3499 rm -f conftest.er1 conftest.err
3500 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3501 test $ac_status = 0; }
3502done
Martin v. Löwis11437992002-04-12 09:54:03 +00003503
Matthias Kloseb9621712010-04-24 17:59:49 +00003504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003505/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003506
Martin v. Löwis11437992002-04-12 09:54:03 +00003507int
3508main ()
3509{
3510
3511 ;
3512 return 0;
3513}
3514_ACEOF
3515ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003516ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003517# Try to create an executable without -o first, disregard a.out.
3518# It will help us diagnose broken compilers, and finding out an intuition
3519# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3521$as_echo_n "checking whether the C compiler works... " >&6; }
3522ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3523
3524# The possible output files:
3525ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3526
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003527ac_rmfiles=
3528for ac_file in $ac_files
3529do
3530 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003531 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003532 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3533 esac
3534done
3535rm -f $ac_rmfiles
3536
Matthias Kloseb9621712010-04-24 17:59:49 +00003537if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003538case "(($ac_try" in
3539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3540 *) ac_try_echo=$ac_try;;
3541esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003542eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3543$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003544 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003545 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003546 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3547 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003548 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3549# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3550# in a Makefile. We should not override ac_cv_exeext if it was cached,
3551# so that the user can short-circuit this test for compilers unknown to
3552# Autoconf.
3553for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003554do
3555 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003556 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003558 ;;
3559 [ab].out )
3560 # We found the default executable, but exeext='' is most
3561 # certainly right.
3562 break;;
3563 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003564 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003565 then :; else
3566 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3567 fi
3568 # We set ac_cv_exeext here because the later test for it is not
3569 # safe: cross compilers may not add the suffix if given an `-o'
3570 # argument, so we may need to know it at that point already.
3571 # Even if this section looks crufty: it has the advantage of
3572 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003573 break;;
3574 * )
3575 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 esac
3577done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003578test "$ac_cv_exeext" = no && ac_cv_exeext=
3579
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003580else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003581 ac_file=''
3582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003583if test -z "$ac_file"; then :
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3585$as_echo "no" >&6; }
3586$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003587sed 's/^/| /' conftest.$ac_ext >&5
3588
Matthias Kloseb9621712010-04-24 17:59:49 +00003589{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00003591as_fn_error 77 "C compiler cannot create executables
3592See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003593else
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3595$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3598$as_echo_n "checking for C compiler default output file name... " >&6; }
3599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3600$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003601ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003602
Matthias Kloseb9621712010-04-24 17:59:49 +00003603rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003604ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3606$as_echo_n "checking for suffix of executables... " >&6; }
3607if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003608case "(($ac_try" in
3609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3610 *) ac_try_echo=$ac_try;;
3611esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003612eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3613$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003614 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3617 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003618 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3619# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3620# work properly (i.e., refer to `conftest.exe'), while it won't with
3621# `rm'.
3622for ac_file in conftest.exe conftest conftest.*; do
3623 test -f "$ac_file" || continue
3624 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003626 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3627 break;;
3628 * ) break;;
3629 esac
3630done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003631else
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3633$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00003634as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3635See \`config.log' for more details" "$LINENO" 5 ; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003637rm -f conftest conftest$ac_cv_exeext
3638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3639$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003640
3641rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003642EXEEXT=$ac_cv_exeext
3643ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3645/* end confdefs.h. */
3646#include <stdio.h>
3647int
3648main ()
3649{
3650FILE *f = fopen ("conftest.out", "w");
3651 return ferror (f) || fclose (f) != 0;
3652
3653 ;
3654 return 0;
3655}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003657ac_clean_files="$ac_clean_files conftest.out"
3658# Check that the compiler produces executables we can run. If not, either
3659# the compiler is broken, or we cross compile.
3660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3661$as_echo_n "checking whether we are cross compiling... " >&6; }
3662if test "$cross_compiling" != yes; then
3663 { { ac_try="$ac_link"
3664case "(($ac_try" in
3665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3666 *) ac_try_echo=$ac_try;;
3667esac
3668eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3669$as_echo "$ac_try_echo"; } >&5
3670 (eval "$ac_link") 2>&5
3671 ac_status=$?
3672 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3673 test $ac_status = 0; }
3674 if { ac_try='./conftest$ac_cv_exeext'
3675 { { case "(($ac_try" in
3676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3677 *) ac_try_echo=$ac_try;;
3678esac
3679eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3680$as_echo "$ac_try_echo"; } >&5
3681 (eval "$ac_try") 2>&5
3682 ac_status=$?
3683 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3684 test $ac_status = 0; }; }; then
3685 cross_compiling=no
3686 else
3687 if test "$cross_compiling" = maybe; then
3688 cross_compiling=yes
3689 else
3690 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00003692as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003693If you meant to cross compile, use \`--host'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00003694See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 fi
3696 fi
3697fi
3698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3699$as_echo "$cross_compiling" >&6; }
3700
3701rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3702ac_clean_files=$ac_clean_files_save
3703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3704$as_echo_n "checking for suffix of object files... " >&6; }
3705if test "${ac_cv_objext+set}" = set; then :
3706 $as_echo_n "(cached) " >&6
3707else
3708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003709/* end confdefs.h. */
3710
3711int
3712main ()
3713{
3714
3715 ;
3716 return 0;
3717}
3718_ACEOF
3719rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003720if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721case "(($ac_try" in
3722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3723 *) ac_try_echo=$ac_try;;
3724esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3726$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003728 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3730 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731 for ac_file in conftest.o conftest.obj conftest.*; do
3732 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003733 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3736 break;;
3737 esac
3738done
3739else
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003741sed 's/^/| /' conftest.$ac_ext >&5
3742
Matthias Kloseb9621712010-04-24 17:59:49 +00003743{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00003745as_fn_error $? "cannot compute suffix of object files: cannot compile
3746See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003747fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003748rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3751$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003752OBJEXT=$ac_cv_objext
3753ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3755$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3756if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3757 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003758else
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003761
Martin v. Löwis11437992002-04-12 09:54:03 +00003762int
3763main ()
3764{
3765#ifndef __GNUC__
3766 choke me
3767#endif
3768
3769 ;
3770 return 0;
3771}
3772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003773if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003774 ac_compiler_gnu=yes
3775else
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003779ac_cv_c_compiler_gnu=$ac_compiler_gnu
3780
3781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3783$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3784if test $ac_compiler_gnu = yes; then
3785 GCC=yes
3786else
3787 GCC=
3788fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003789ac_test_CFLAGS=${CFLAGS+set}
3790ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3792$as_echo_n "checking whether $CC accepts -g... " >&6; }
3793if test "${ac_cv_prog_cc_g+set}" = set; then :
3794 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003795else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796 ac_save_c_werror_flag=$ac_c_werror_flag
3797 ac_c_werror_flag=yes
3798 ac_cv_prog_cc_g=no
3799 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003802
Martin v. Löwis11437992002-04-12 09:54:03 +00003803int
3804main ()
3805{
3806
3807 ;
3808 return 0;
3809}
3810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003811if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003812 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003813else
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 CFLAGS=""
3815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816/* end confdefs.h. */
3817
3818int
3819main ()
3820{
3821
3822 ;
3823 return 0;
3824}
3825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003826if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003827
Matthias Kloseb9621712010-04-24 17:59:49 +00003828else
3829 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832/* end confdefs.h. */
3833
3834int
3835main ()
3836{
3837
3838 ;
3839 return 0;
3840}
3841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003842if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3850 ac_c_werror_flag=$ac_save_c_werror_flag
3851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3853$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003854if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003855 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003856elif test $ac_cv_prog_cc_g = yes; then
3857 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003858 CFLAGS="-g -O2"
3859 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003860 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003861 fi
3862else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003863 if test "$GCC" = yes; then
3864 CFLAGS="-O2"
3865 else
3866 CFLAGS=
3867 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3870$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3871if test "${ac_cv_prog_cc_c89+set}" = set; then :
3872 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003873else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003874 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003875ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003877/* end confdefs.h. */
3878#include <stdarg.h>
3879#include <stdio.h>
3880#include <sys/types.h>
3881#include <sys/stat.h>
3882/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3883struct buf { int x; };
3884FILE * (*rcsopen) (struct buf *, struct stat *, int);
3885static char *e (p, i)
3886 char **p;
3887 int i;
3888{
3889 return p[i];
3890}
3891static char *f (char * (*g) (char **, int), char **p, ...)
3892{
3893 char *s;
3894 va_list v;
3895 va_start (v,p);
3896 s = g (p, va_arg (v,int));
3897 va_end (v);
3898 return s;
3899}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003900
3901/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3902 function prototypes and stuff, but not '\xHH' hex character constants.
3903 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003905 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3906 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003908int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003910/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3911 inside strings and character constants. */
3912#define FOO(x) 'x'
3913int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3914
Skip Montanaro6dead952003-09-25 14:50:04 +00003915int test (int i, double x);
3916struct s1 {int (*f) (int a);};
3917struct s2 {int (*f) (double a);};
3918int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3919int argc;
3920char **argv;
3921int
3922main ()
3923{
3924return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3925 ;
3926 return 0;
3927}
3928_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3930 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003931do
3932 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003933 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936rm -f core conftest.err conftest.$ac_objext
3937 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003938done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003940CC=$ac_save_CC
3941
3942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943# AC_CACHE_VAL
3944case "x$ac_cv_prog_cc_c89" in
3945 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3947$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3950$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003951 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3954$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003955esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003956if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003957
Matthias Kloseb9621712010-04-24 17:59:49 +00003958fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003959
Martin v. Löwis11437992002-04-12 09:54:03 +00003960ac_ext=c
3961ac_cpp='$CPP $CPPFLAGS'
3962ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3963ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3964ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003965
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003966
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003967
3968
Matthias Kloseb9621712010-04-24 17:59:49 +00003969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3970$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003973if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003974 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003975
3976 case $withval in
3977 no) with_cxx_main=no
3978 MAINCC='$(CC)';;
3979 yes) with_cxx_main=yes
3980 MAINCC='$(CXX)';;
3981 *) with_cxx_main=yes
3982 MAINCC=$withval
3983 if test -z "$CXX"
3984 then
3985 CXX=$withval
3986 fi;;
3987 esac
3988else
3989
3990 with_cxx_main=no
3991 MAINCC='$(CC)'
3992
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003993fi
3994
Matthias Kloseb9621712010-04-24 17:59:49 +00003995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3996$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003997
3998preset_cxx="$CXX"
3999if test -z "$CXX"
4000then
4001 case "$CC" in
4002 gcc) # Extract the first word of "g++", so it can be a program name with args.
4003set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4005$as_echo_n "checking for $ac_word... " >&6; }
4006if test "${ac_cv_path_CXX+set}" = set; then :
4007 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004008else
4009 case $CXX in
4010 [\\/]* | ?:[\\/]*)
4011 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4012 ;;
4013 *)
4014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4015for as_dir in notfound
4016do
4017 IFS=$as_save_IFS
4018 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004020 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004021 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004022 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004023 break 2
4024 fi
4025done
Matthias Kloseb9621712010-04-24 17:59:49 +00004026 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004027IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004028
4029 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4030 ;;
4031esac
4032fi
4033CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004034if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4036$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004037else
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4039$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004042 ;;
4043 cc) # Extract the first word of "c++", so it can be a program name with args.
4044set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4046$as_echo_n "checking for $ac_word... " >&6; }
4047if test "${ac_cv_path_CXX+set}" = set; then :
4048 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004049else
4050 case $CXX in
4051 [\\/]* | ?:[\\/]*)
4052 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4053 ;;
4054 *)
4055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4056for as_dir in notfound
4057do
4058 IFS=$as_save_IFS
4059 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004060 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004061 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004062 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004064 break 2
4065 fi
4066done
Matthias Kloseb9621712010-04-24 17:59:49 +00004067 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004068IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004069
4070 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4071 ;;
4072esac
4073fi
4074CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004075if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4077$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004078else
Matthias Kloseb9621712010-04-24 17:59:49 +00004079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4080$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004082
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004083 ;;
4084 esac
4085 if test "$CXX" = "notfound"
4086 then
4087 CXX=""
4088 fi
4089fi
4090if test -z "$CXX"
4091then
4092 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4093do
4094 # Extract the first word of "$ac_prog", so it can be a program name with args.
4095set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4097$as_echo_n "checking for $ac_word... " >&6; }
4098if test "${ac_cv_prog_CXX+set}" = set; then :
4099 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004100else
4101 if test -n "$CXX"; then
4102 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4103else
4104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4105for as_dir in $PATH
4106do
4107 IFS=$as_save_IFS
4108 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004110 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004111 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004113 break 2
4114 fi
4115done
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004117IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004118
4119fi
4120fi
4121CXX=$ac_cv_prog_CXX
4122if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4124$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004125else
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4127$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004128fi
4129
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004131 test -n "$CXX" && break
4132done
4133test -n "$CXX" || CXX="notfound"
4134
4135 if test "$CXX" = "notfound"
4136 then
4137 CXX=""
4138 fi
4139fi
4140if test "$preset_cxx" != "$CXX"
4141then
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004143
4144 By default, distutils will build C++ extension modules with \"$CXX\".
4145 If this is not intended, then set CXX on the configure command line.
4146 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004147$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004148
4149 By default, distutils will build C++ extension modules with \"$CXX\".
4150 If this is not intended, then set CXX on the configure command line.
4151 " >&2;}
4152fi
4153
4154
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004155# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004156
4157ac_ext=c
4158ac_cpp='$CPP $CPPFLAGS'
4159ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4160ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4161ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4163$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004164# On Suns, sometimes $CPP names a directory.
4165if test -n "$CPP" && test -d "$CPP"; then
4166 CPP=
4167fi
4168if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004169 if test "${ac_cv_prog_CPP+set}" = set; then :
4170 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004171else
Martin v. Löwis11437992002-04-12 09:54:03 +00004172 # Double quotes because CPP needs to be expanded
4173 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4174 do
4175 ac_preproc_ok=false
4176for ac_c_preproc_warn_flag in '' yes
4177do
4178 # Use a header file that comes with gcc, so configuring glibc
4179 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004180 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4181 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004182 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004183 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004185/* end confdefs.h. */
4186#ifdef __STDC__
4187# include <limits.h>
4188#else
4189# include <assert.h>
4190#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004191 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004193if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004194
Matthias Kloseb9621712010-04-24 17:59:49 +00004195else
Martin v. Löwis11437992002-04-12 09:54:03 +00004196 # Broken: fails on valid input.
4197continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004198fi
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00004199rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004202 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004205#include <ac_nonexistent.h>
4206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004207if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 # Broken: success on invalid input.
4209continue
4210else
Martin v. Löwis11437992002-04-12 09:54:03 +00004211 # Passes both tests.
4212ac_preproc_ok=:
4213break
4214fi
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00004215rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004216
4217done
4218# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00004219rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004220if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004221 break
4222fi
4223
4224 done
4225 ac_cv_prog_CPP=$CPP
4226
4227fi
4228 CPP=$ac_cv_prog_CPP
4229else
4230 ac_cv_prog_CPP=$CPP
4231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4233$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004234ac_preproc_ok=false
4235for ac_c_preproc_warn_flag in '' yes
4236do
4237 # Use a header file that comes with gcc, so configuring glibc
4238 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004239 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4240 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004241 # On the NeXT, cc -E runs the code through the compiler's parser,
4242 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004244/* end confdefs.h. */
4245#ifdef __STDC__
4246# include <limits.h>
4247#else
4248# include <assert.h>
4249#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004250 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004252if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004253
Matthias Kloseb9621712010-04-24 17:59:49 +00004254else
Martin v. Löwis11437992002-04-12 09:54:03 +00004255 # Broken: fails on valid input.
4256continue
4257fi
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00004258rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004263/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004264#include <ac_nonexistent.h>
4265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004266if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004267 # Broken: success on invalid input.
4268continue
4269else
Martin v. Löwis11437992002-04-12 09:54:03 +00004270 # Passes both tests.
4271ac_preproc_ok=:
4272break
4273fi
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00004274rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004275
4276done
4277# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00004278rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004279if $ac_preproc_ok; then :
4280
Martin v. Löwis11437992002-04-12 09:54:03 +00004281else
Matthias Kloseb9621712010-04-24 17:59:49 +00004282 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4283$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00004284as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4285See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004286fi
4287
4288ac_ext=c
4289ac_cpp='$CPP $CPPFLAGS'
4290ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4291ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4292ac_compiler_gnu=$ac_cv_c_compiler_gnu
4293
4294
Matthias Kloseb9621712010-04-24 17:59:49 +00004295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4296$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4297if test "${ac_cv_path_GREP+set}" = set; then :
4298 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004299else
Matthias Kloseb9621712010-04-24 17:59:49 +00004300 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004302 # Loop through the user's path and test for each of PROGNAME-LIST
4303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4305do
4306 IFS=$as_save_IFS
4307 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004308 for ac_prog in grep ggrep; do
4309 for ac_exec_ext in '' $ac_executable_extensions; do
4310 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4311 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4312# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313 # Check for GNU $ac_path_GREP
4314case `"$ac_path_GREP" --version 2>&1` in
4315*GNU*)
4316 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4317*)
4318 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004319 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320 while :
4321 do
4322 cat "conftest.in" "conftest.in" >"conftest.tmp"
4323 mv "conftest.tmp" "conftest.in"
4324 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004325 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4327 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004328 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4330 # Best one so far, save it but keep looking for a better one
4331 ac_cv_path_GREP="$ac_path_GREP"
4332 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004333 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334 # 10*(2^10) chars as input seems more than enough
4335 test $ac_count -gt 10 && break
4336 done
4337 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4338esac
4339
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 $ac_path_GREP_found && break 3
4341 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004345 if test -z "$ac_cv_path_GREP"; then
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00004346 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004347 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348else
4349 ac_cv_path_GREP=$GREP
4350fi
4351
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4354$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355 GREP="$ac_cv_path_GREP"
4356
4357
Matthias Kloseb9621712010-04-24 17:59:49 +00004358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4359$as_echo_n "checking for egrep... " >&6; }
4360if test "${ac_cv_path_EGREP+set}" = set; then :
4361 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362else
4363 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4364 then ac_cv_path_EGREP="$GREP -E"
4365 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004368 # Loop through the user's path and test for each of PROGNAME-LIST
4369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4371do
4372 IFS=$as_save_IFS
4373 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004374 for ac_prog in egrep; do
4375 for ac_exec_ext in '' $ac_executable_extensions; do
4376 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4377 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4378# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379 # Check for GNU $ac_path_EGREP
4380case `"$ac_path_EGREP" --version 2>&1` in
4381*GNU*)
4382 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4383*)
4384 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004385 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004386 while :
4387 do
4388 cat "conftest.in" "conftest.in" >"conftest.tmp"
4389 mv "conftest.tmp" "conftest.in"
4390 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004391 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004392 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4393 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004394 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004395 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4396 # Best one so far, save it but keep looking for a better one
4397 ac_cv_path_EGREP="$ac_path_EGREP"
4398 ac_path_EGREP_max=$ac_count
4399 fi
4400 # 10*(2^10) chars as input seems more than enough
4401 test $ac_count -gt 10 && break
4402 done
4403 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4404esac
4405
Matthias Kloseb9621712010-04-24 17:59:49 +00004406 $ac_path_EGREP_found && break 3
4407 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004409 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004410IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004411 if test -z "$ac_cv_path_EGREP"; then
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00004412 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004413 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004414else
4415 ac_cv_path_EGREP=$EGREP
4416fi
4417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 fi
4419fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4421$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004422 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004423
4424
Matthias Kloseb9621712010-04-24 17:59:49 +00004425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4426$as_echo_n "checking for ANSI C header files... " >&6; }
4427if test "${ac_cv_header_stdc+set}" = set; then :
4428 $as_echo_n "(cached) " >&6
4429else
4430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004431/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004432#include <stdlib.h>
4433#include <stdarg.h>
4434#include <string.h>
4435#include <float.h>
4436
4437int
4438main ()
4439{
4440
4441 ;
4442 return 0;
4443}
4444_ACEOF
4445if ac_fn_c_try_compile "$LINENO"; then :
4446 ac_cv_header_stdc=yes
4447else
4448 ac_cv_header_stdc=no
4449fi
4450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4451
4452if test $ac_cv_header_stdc = yes; then
4453 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4455/* end confdefs.h. */
4456#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004457
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004458_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004459if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004460 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004461
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004462else
Matthias Kloseb9621712010-04-24 17:59:49 +00004463 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004464fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004465rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004466
Matthias Kloseb9621712010-04-24 17:59:49 +00004467fi
4468
4469if test $ac_cv_header_stdc = yes; then
4470 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4472/* end confdefs.h. */
4473#include <stdlib.h>
4474
4475_ACEOF
4476if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4477 $EGREP "free" >/dev/null 2>&1; then :
4478
4479else
4480 ac_cv_header_stdc=no
4481fi
4482rm -f conftest*
4483
4484fi
4485
4486if test $ac_cv_header_stdc = yes; then
4487 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4488 if test "$cross_compiling" = yes; then :
4489 :
4490else
4491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4492/* end confdefs.h. */
4493#include <ctype.h>
4494#include <stdlib.h>
4495#if ((' ' & 0x0FF) == 0x020)
4496# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4497# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4498#else
4499# define ISLOWER(c) \
4500 (('a' <= (c) && (c) <= 'i') \
4501 || ('j' <= (c) && (c) <= 'r') \
4502 || ('s' <= (c) && (c) <= 'z'))
4503# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4504#endif
4505
4506#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4507int
4508main ()
4509{
4510 int i;
4511 for (i = 0; i < 256; i++)
4512 if (XOR (islower (i), ISLOWER (i))
4513 || toupper (i) != TOUPPER (i))
4514 return 2;
4515 return 0;
4516}
4517_ACEOF
4518if ac_fn_c_try_run "$LINENO"; then :
4519
4520else
4521 ac_cv_header_stdc=no
4522fi
4523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4524 conftest.$ac_objext conftest.beam conftest.$ac_ext
4525fi
4526
4527fi
4528fi
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4530$as_echo "$ac_cv_header_stdc" >&6; }
4531if test $ac_cv_header_stdc = yes; then
4532
4533$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4534
4535fi
4536
4537# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4538for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4539 inttypes.h stdint.h unistd.h
4540do :
4541 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4542ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4543"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00004544if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004545 cat >>confdefs.h <<_ACEOF
4546#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4547_ACEOF
4548
4549fi
4550
4551done
4552
4553
4554
4555 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4556if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4557 MINIX=yes
4558else
4559 MINIX=
4560fi
4561
4562
4563 if test "$MINIX" = yes; then
4564
4565$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4566
4567
4568$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4569
4570
4571$as_echo "#define _MINIX 1" >>confdefs.h
4572
4573 fi
4574
4575
4576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4577$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4578if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4579 $as_echo_n "(cached) " >&6
4580else
4581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4582/* end confdefs.h. */
4583
4584# define __EXTENSIONS__ 1
4585 $ac_includes_default
4586int
4587main ()
4588{
4589
4590 ;
4591 return 0;
4592}
4593_ACEOF
4594if ac_fn_c_try_compile "$LINENO"; then :
4595 ac_cv_safe_to_define___extensions__=yes
4596else
4597 ac_cv_safe_to_define___extensions__=no
4598fi
4599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4600fi
4601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4602$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4603 test $ac_cv_safe_to_define___extensions__ = yes &&
4604 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4605
4606 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4607
4608 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4609
4610 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4611
4612 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4613
4614
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004616# Check for unsupported systems
4617case $ac_sys_system/$ac_sys_release in
4618atheos*|Linux*/1*)
4619 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4620 echo See README for details.
4621 exit 1;;
4622esac
4623
4624
Matthias Kloseb9621712010-04-24 17:59:49 +00004625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4626$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004627
4628# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004629if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004630 withval=$with_suffix;
4631 case $withval in
4632 no) EXEEXT=;;
4633 yes) EXEEXT=.exe;;
4634 *) EXEEXT=$withval;;
4635 esac
4636fi
4637
Matthias Kloseb9621712010-04-24 17:59:49 +00004638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4639$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004640
4641# Test whether we're running on a non-case-sensitive system, in which
4642# case we give a warning if no ext is given
4643
Matthias Kloseb9621712010-04-24 17:59:49 +00004644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4645$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004646if test ! -d CaseSensitiveTestDir; then
4647mkdir CaseSensitiveTestDir
4648fi
4649
4650if test -d casesensitivetestdir
4651then
Matthias Kloseb9621712010-04-24 17:59:49 +00004652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4653$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004654 BUILDEXEEXT=.exe
4655else
Matthias Kloseb9621712010-04-24 17:59:49 +00004656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004658 BUILDEXEEXT=$EXEEXT
4659fi
4660rmdir CaseSensitiveTestDir
4661
4662case $MACHDEP in
4663bsdos*)
4664 case $CC in
4665 gcc) CC="$CC -D_HAVE_BSDI";;
4666 esac;;
4667esac
4668
4669case $ac_sys_system in
4670hp*|HP*)
4671 case $CC in
4672 cc|*/cc) CC="$CC -Ae";;
4673 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004674esac
4675
4676
4677
Matthias Kloseb9621712010-04-24 17:59:49 +00004678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4679$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004680if test -z "$LIBRARY"
4681then
4682 LIBRARY='libpython$(VERSION).a'
4683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4685$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004686
4687# LDLIBRARY is the name of the library to link against (as opposed to the
4688# name of the library into which to insert object files). BLDLIBRARY is also
4689# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4690# is blank as the main program is not linked directly against LDLIBRARY.
4691# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4692# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4693# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4694# DLLLIBRARY is the shared (i.e., DLL) library.
4695#
4696# RUNSHARED is used to run shared python without installed libraries
4697#
4698# INSTSONAME is the name of the shared library that will be use to install
4699# on the system - some systems like version suffix, others don't
4700
4701
4702
4703
4704
4705
4706LDLIBRARY="$LIBRARY"
4707BLDLIBRARY='$(LDLIBRARY)'
4708INSTSONAME='$(LDLIBRARY)'
4709DLLLIBRARY=''
4710LDLIBRARYDIR=''
4711RUNSHARED=''
4712
4713# LINKCC is the command that links the python executable -- default is $(CC).
4714# If CXX is set, and if it is needed to link a main function that was
4715# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4716# python might then depend on the C++ runtime
4717# This is altered for AIX in order to build the export list before
4718# linking.
4719
Matthias Kloseb9621712010-04-24 17:59:49 +00004720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4721$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004722if test -z "$LINKCC"
4723then
4724 LINKCC='$(PURIFY) $(MAINCC)'
4725 case $ac_sys_system in
4726 AIX*)
4727 exp_extra="\"\""
4728 if test $ac_sys_release -ge 5 -o \
4729 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4730 exp_extra="."
4731 fi
4732 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004733 QNX*)
4734 # qcc must be used because the other compilers do not
4735 # support -N.
4736 LINKCC=qcc;;
4737 esac
4738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4740$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004741
4742# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4743# make sure we default having it set to "no": this is used by
4744# distutils.unixccompiler to know if it should add --enable-new-dtags
4745# to linker command lines, and failing to detect GNU ld simply results
4746# in the same bahaviour as before.
4747
Matthias Kloseb9621712010-04-24 17:59:49 +00004748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4749$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004750ac_prog=ld
4751if test "$GCC" = yes; then
4752 ac_prog=`$CC -print-prog-name=ld`
4753fi
4754case `"$ac_prog" -V 2>&1 < /dev/null` in
4755 *GNU*)
4756 GNULD=yes;;
4757 *)
4758 GNULD=no;;
4759esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4761$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004762
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4764$as_echo_n "checking for inline... " >&6; }
4765if test "${ac_cv_c_inline+set}" = set; then :
4766 $as_echo_n "(cached) " >&6
4767else
4768 ac_cv_c_inline=no
4769for ac_kw in inline __inline__ __inline; do
4770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4771/* end confdefs.h. */
4772#ifndef __cplusplus
4773typedef int foo_t;
4774static $ac_kw foo_t static_foo () {return 0; }
4775$ac_kw foo_t foo () {return 0; }
4776#endif
4777
4778_ACEOF
4779if ac_fn_c_try_compile "$LINENO"; then :
4780 ac_cv_c_inline=$ac_kw
4781fi
4782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4783 test "$ac_cv_c_inline" != no && break
4784done
4785
4786fi
4787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4788$as_echo "$ac_cv_c_inline" >&6; }
4789
4790case $ac_cv_c_inline in
4791 inline | yes) ;;
4792 *)
4793 case $ac_cv_c_inline in
4794 no) ac_val=;;
4795 *) ac_val=$ac_cv_c_inline;;
4796 esac
4797 cat >>confdefs.h <<_ACEOF
4798#ifndef __cplusplus
4799#define inline $ac_val
4800#endif
4801_ACEOF
4802 ;;
4803esac
4804
4805if test "$ac_cv_c_inline" != no ; then
4806 $as_echo "#define USE_INLINE 1" >>confdefs.h
4807
4808
4809fi
4810
4811
Matthias Kloseb9621712010-04-24 17:59:49 +00004812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4813$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004814# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004815if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004816 enableval=$enable_shared;
4817fi
4818
4819
4820if test -z "$enable_shared"
4821then
4822 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004823 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004824 enable_shared="yes";;
4825 *)
4826 enable_shared="no";;
4827 esac
4828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4830$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004831
Matthias Kloseb9621712010-04-24 17:59:49 +00004832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4833$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004834# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004835if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004836 enableval=$enable_profiling; ac_save_cc="$CC"
4837 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004838 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004839 ac_enable_profiling="no"
4840else
Matthias Kloseb9621712010-04-24 17:59:49 +00004841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842/* end confdefs.h. */
4843int main() { return 0; }
4844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004845if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004846 ac_enable_profiling="yes"
4847else
Matthias Kloseb9621712010-04-24 17:59:49 +00004848 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4851 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004852fi
4853
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004854 CC="$ac_save_cc"
4855fi
4856
Matthias Kloseb9621712010-04-24 17:59:49 +00004857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4858$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004859
4860case "$ac_enable_profiling" in
4861 "yes")
4862 BASECFLAGS="-pg $BASECFLAGS"
4863 LDFLAGS="-pg $LDFLAGS"
4864 ;;
4865esac
4866
Matthias Kloseb9621712010-04-24 17:59:49 +00004867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4868$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004869
4870# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4871# library that we build, but we do not want to link against it (we
4872# will find it with a -framework option). For this reason there is an
4873# extra variable BLDLIBRARY against which Python and the extension
4874# modules are linked, BLDLIBRARY. This is normally the same as
4875# LDLIBRARY, but empty for MacOSX framework builds.
4876if test "$enable_framework"
4877then
4878 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4879 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4880 BLDLIBRARY=''
4881else
4882 BLDLIBRARY='$(LDLIBRARY)'
4883fi
4884
4885# Other platforms follow
4886if test $enable_shared = "yes"; then
4887
Matthias Kloseb9621712010-04-24 17:59:49 +00004888$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004889
4890 case $ac_sys_system in
4891 CYGWIN*)
4892 LDLIBRARY='libpython$(VERSION).dll.a'
4893 DLLLIBRARY='libpython$(VERSION).dll'
4894 ;;
4895 SunOS*)
4896 LDLIBRARY='libpython$(VERSION).so'
4897 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4898 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4899 INSTSONAME="$LDLIBRARY".$SOVERSION
4900 ;;
4901 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4902 LDLIBRARY='libpython$(VERSION).so'
4903 BLDLIBRARY='-L. -lpython$(VERSION)'
4904 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4905 case $ac_sys_system in
4906 FreeBSD*)
4907 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4908 ;;
4909 esac
4910 INSTSONAME="$LDLIBRARY".$SOVERSION
4911 ;;
4912 hp*|HP*)
4913 case `uname -m` in
4914 ia64)
4915 LDLIBRARY='libpython$(VERSION).so'
4916 ;;
4917 *)
4918 LDLIBRARY='libpython$(VERSION).sl'
4919 ;;
4920 esac
4921 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4922 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4923 ;;
4924 OSF*)
4925 LDLIBRARY='libpython$(VERSION).so'
4926 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4927 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4928 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004929 Darwin*)
4930 LDLIBRARY='libpython$(VERSION).dylib'
4931 BLDLIBRARY='-L. -lpython$(VERSION)'
4932 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4933 ;;
4934
4935 esac
4936else # shared is disabled
4937 case $ac_sys_system in
4938 CYGWIN*)
4939 BLDLIBRARY='$(LIBRARY)'
4940 LDLIBRARY='libpython$(VERSION).dll.a'
4941 ;;
4942 esac
4943fi
4944
Matthias Kloseb9621712010-04-24 17:59:49 +00004945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4946$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947
4948if test -n "$ac_tool_prefix"; then
4949 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4950set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4952$as_echo_n "checking for $ac_word... " >&6; }
4953if test "${ac_cv_prog_RANLIB+set}" = set; then :
4954 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004955else
4956 if test -n "$RANLIB"; then
4957 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4958else
4959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4960for as_dir in $PATH
4961do
4962 IFS=$as_save_IFS
4963 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004964 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4966 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004967 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968 break 2
4969 fi
4970done
Matthias Kloseb9621712010-04-24 17:59:49 +00004971 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004972IFS=$as_save_IFS
4973
4974fi
4975fi
4976RANLIB=$ac_cv_prog_RANLIB
4977if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4979$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004980else
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4982$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004983fi
4984
4985
4986fi
4987if test -z "$ac_cv_prog_RANLIB"; then
4988 ac_ct_RANLIB=$RANLIB
4989 # Extract the first word of "ranlib", so it can be a program name with args.
4990set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4992$as_echo_n "checking for $ac_word... " >&6; }
4993if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4994 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995else
4996 if test -n "$ac_ct_RANLIB"; then
4997 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4998else
4999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5000for as_dir in $PATH
5001do
5002 IFS=$as_save_IFS
5003 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005004 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5006 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005007 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008 break 2
5009 fi
5010done
Matthias Kloseb9621712010-04-24 17:59:49 +00005011 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005012IFS=$as_save_IFS
5013
5014fi
5015fi
5016ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5017if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5019$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005020else
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5022$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005023fi
5024
5025 if test "x$ac_ct_RANLIB" = x; then
5026 RANLIB=":"
5027 else
5028 case $cross_compiling:$ac_tool_warned in
5029yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005030{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5031$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005032ac_tool_warned=yes ;;
5033esac
5034 RANLIB=$ac_ct_RANLIB
5035 fi
5036else
5037 RANLIB="$ac_cv_prog_RANLIB"
5038fi
5039
5040
5041for ac_prog in ar aal
5042do
5043 # Extract the first word of "$ac_prog", so it can be a program name with args.
5044set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5046$as_echo_n "checking for $ac_word... " >&6; }
5047if test "${ac_cv_prog_AR+set}" = set; then :
5048 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005049else
5050 if test -n "$AR"; then
5051 ac_cv_prog_AR="$AR" # Let the user override the test.
5052else
5053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5054for as_dir in $PATH
5055do
5056 IFS=$as_save_IFS
5057 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5060 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005062 break 2
5063 fi
5064done
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005066IFS=$as_save_IFS
5067
5068fi
5069fi
5070AR=$ac_cv_prog_AR
5071if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5073$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074else
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5076$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077fi
5078
5079
5080 test -n "$AR" && break
5081done
5082test -n "$AR" || AR="ar"
5083
5084
5085# tweak ARFLAGS only if the user didn't set it on the command line
5086
5087if test -z "$ARFLAGS"
5088then
5089 ARFLAGS="rc"
5090fi
5091
5092
5093# Extract the first word of "svnversion", so it can be a program name with args.
5094set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5096$as_echo_n "checking for $ac_word... " >&6; }
5097if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5098 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005099else
5100 if test -n "$SVNVERSION"; then
5101 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5102else
5103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5104for as_dir in $PATH
5105do
5106 IFS=$as_save_IFS
5107 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005108 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5110 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005112 break 2
5113 fi
5114done
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005116IFS=$as_save_IFS
5117
5118 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5119fi
5120fi
5121SVNVERSION=$ac_cv_prog_SVNVERSION
5122if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5124$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005125else
Matthias Kloseb9621712010-04-24 17:59:49 +00005126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5127$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005128fi
5129
5130
5131if test $SVNVERSION = found
5132then
5133 SVNVERSION="svnversion \$(srcdir)"
5134else
5135 SVNVERSION="echo Unversioned directory"
5136fi
5137
5138case $MACHDEP in
5139bsdos*|hp*|HP*)
5140 # install -d does not work on BSDI or HP-UX
5141 if test -z "$INSTALL"
5142 then
5143 INSTALL="${srcdir}/install-sh -c"
5144 fi
5145esac
5146ac_aux_dir=
5147for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005148 if test -f "$ac_dir/install-sh"; then
5149 ac_aux_dir=$ac_dir
5150 ac_install_sh="$ac_aux_dir/install-sh -c"
5151 break
5152 elif test -f "$ac_dir/install.sh"; then
5153 ac_aux_dir=$ac_dir
5154 ac_install_sh="$ac_aux_dir/install.sh -c"
5155 break
5156 elif test -f "$ac_dir/shtool"; then
5157 ac_aux_dir=$ac_dir
5158 ac_install_sh="$ac_aux_dir/shtool install -c"
5159 break
5160 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005161done
5162if test -z "$ac_aux_dir"; then
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005163 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005164fi
5165
5166# These three variables are undocumented and unsupported,
5167# and are intended to be withdrawn in a future Autoconf release.
5168# They can cause serious problems if a builder's source tree is in a directory
5169# whose full name contains unusual characters.
5170ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5171ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5172ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5173
5174
5175# Find a good install program. We prefer a C program (faster),
5176# so one script is as good as another. But avoid the broken or
5177# incompatible versions:
5178# SysV /etc/install, /usr/sbin/install
5179# SunOS /usr/etc/install
5180# IRIX /sbin/install
5181# AIX /bin/install
5182# AmigaOS /C/install, which installs bootblocks on floppy discs
5183# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5184# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5185# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5186# OS/2's system install, which has a completely different semantic
5187# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005188# Reject install programs that cannot install multiple files.
5189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5190$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005191if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005192if test "${ac_cv_path_install+set}" = set; then :
5193 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005194else
5195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5196for as_dir in $PATH
5197do
5198 IFS=$as_save_IFS
5199 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005200 # Account for people who put trailing slashes in PATH elements.
5201case $as_dir/ in #((
5202 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005203 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005204 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005205 /usr/ucb/* ) ;;
5206 *)
5207 # OSF1 and SCO ODT 3.0 have their own names for install.
5208 # Don't use installbsd from OSF since it installs stuff as root
5209 # by default.
5210 for ac_prog in ginstall scoinst install; do
5211 for ac_exec_ext in '' $ac_executable_extensions; do
5212 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5213 if test $ac_prog = install &&
5214 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5215 # AIX install. It has an incompatible calling convention.
5216 :
5217 elif test $ac_prog = install &&
5218 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5219 # program-specific install script used by HP pwplus--don't use.
5220 :
5221 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005222 rm -rf conftest.one conftest.two conftest.dir
5223 echo one > conftest.one
5224 echo two > conftest.two
5225 mkdir conftest.dir
5226 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5227 test -s conftest.one && test -s conftest.two &&
5228 test -s conftest.dir/conftest.one &&
5229 test -s conftest.dir/conftest.two
5230 then
5231 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5232 break 3
5233 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005234 fi
5235 fi
5236 done
5237 done
5238 ;;
5239esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005240
5241 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005242IFS=$as_save_IFS
5243
Matthias Kloseb9621712010-04-24 17:59:49 +00005244rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005245
5246fi
5247 if test "${ac_cv_path_install+set}" = set; then
5248 INSTALL=$ac_cv_path_install
5249 else
5250 # As a last resort, use the slow shell script. Don't cache a
5251 # value for INSTALL within a source directory, because that will
5252 # break other packages using the cache if that directory is
5253 # removed, or if the value is a relative name.
5254 INSTALL=$ac_install_sh
5255 fi
5256fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5258$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005259
5260# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5261# It thinks the first close brace ends the variable substitution.
5262test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5263
5264test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5265
5266test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5267
5268
5269# Not every filesystem supports hard links
5270
5271if test -z "$LN" ; then
5272 case $ac_sys_system in
5273 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005274 *) LN=ln;;
5275 esac
5276fi
5277
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005278# For calculating the .so ABI tag.
5279SOABI_QUALIFIERS=""
5280
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005281# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5283$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005284
5285# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005286if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005287 withval=$with_pydebug;
5288if test "$withval" != no
5289then
5290
Matthias Kloseb9621712010-04-24 17:59:49 +00005291$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292
Matthias Kloseb9621712010-04-24 17:59:49 +00005293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5294$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005295 Py_DEBUG='true'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005296 SOABI_QUALIFIERS="${SOABI_QUALIFIERS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005297else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5298$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005299fi
5300else
Matthias Kloseb9621712010-04-24 17:59:49 +00005301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5302$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005303fi
5304
5305
5306# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5307# merged with this chunk of code?
5308
5309# Optimizer/debugger flags
5310# ------------------------
5311# (The following bit of code is complicated enough - please keep things
5312# indented properly. Just pretend you're editing Python code. ;-)
5313
5314# There are two parallel sets of case statements below, one that checks to
5315# see if OPT was set and one that does BASECFLAGS setting based upon
5316# compiler and platform. BASECFLAGS tweaks need to be made even if the
5317# user set OPT.
5318
5319# tweak OPT based on compiler and platform, only if the user didn't set
5320# it on the command line
5321
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005322if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005323then
5324 case $GCC in
5325 yes)
5326 if test "$CC" != 'g++' ; then
5327 STRICT_PROTO="-Wstrict-prototypes"
5328 fi
5329 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5330 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5331 WRAP="-fwrapv"
5332 fi
5333 case $ac_cv_prog_cc_g in
5334 yes)
5335 if test "$Py_DEBUG" = 'true' ; then
5336 # Optimization messes up debuggers, so turn it off for
5337 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005338 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005339 else
5340 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5341 fi
5342 ;;
5343 *)
5344 OPT="-O3 -Wall $STRICT_PROTO"
5345 ;;
5346 esac
5347 case $ac_sys_system in
5348 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5349 ;;
5350 esac
5351 ;;
5352
5353 *)
5354 OPT="-O"
5355 ;;
5356 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005357fi
5358
5359
5360
5361# The -arch flags for universal builds on OSX
5362UNIVERSAL_ARCH_FLAGS=
5363
5364
5365# tweak BASECFLAGS based on compiler and platform
5366case $GCC in
5367yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005368 # Python doesn't violate C99 aliasing rules, but older versions of
5369 # GCC produce warnings for legal Python code. Enable
5370 # -fno-strict-aliasing on versions of GCC that support but produce
5371 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5373$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005374 ac_save_cc="$CC"
5375 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005376 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5378 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005379else
Matthias Kloseb9621712010-04-24 17:59:49 +00005380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005381/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005382
Matthias Kloseb159a552010-04-25 21:00:44 +00005383
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005384int
5385main ()
5386{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005387
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005388 ;
5389 return 0;
5390}
Matthias Kloseb159a552010-04-25 21:00:44 +00005391
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005393if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005394
5395 CC="$ac_save_cc -fstrict-aliasing"
5396 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005398/* end confdefs.h. */
5399
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005400 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005401int
5402main ()
5403{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005404double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005405 ;
5406 return 0;
5407}
Matthias Kloseb159a552010-04-25 21:00:44 +00005408
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005410if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005411
5412 ac_cv_no_strict_aliasing=no
5413
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414else
Matthias Kloseb159a552010-04-25 21:00:44 +00005415
5416 ac_cv_no_strict_aliasing=yes
5417
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005418fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005420
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005421else
Matthias Kloseb159a552010-04-25 21:00:44 +00005422
5423 ac_cv_no_strict_aliasing=no
5424
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005427fi
5428
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005429 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005430 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5432$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005433 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005434 then
5435 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5436 fi
5437
5438 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5439 # support. Without this, treatment of subnormals doesn't follow
5440 # the standard.
5441 case $ac_sys_machine in
5442 alpha*)
5443 BASECFLAGS="$BASECFLAGS -mieee"
5444 ;;
5445 esac
5446
5447 case $ac_sys_system in
5448 SCO_SV*)
5449 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5450 ;;
5451 # is there any other compiler on Darwin besides gcc?
5452 Darwin*)
5453 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5454 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005455 if test "${CC}" = gcc
5456 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5458$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005459 case "${UNIVERSALSDK}" in
5460 */MacOSX10.4u.sdk)
5461 # Build using 10.4 SDK, force usage of gcc when the
5462 # compiler is gcc, otherwise the user will get very
5463 # confusing error messages when building on OSX 10.6
5464 CC=gcc-4.0
5465 CPP=cpp-4.0
5466 ;;
5467 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5469$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005470 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005471
5472
5473 if test "${enable_universalsdk}"; then
5474 UNIVERSAL_ARCH_FLAGS=""
5475 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5476 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5477 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005478 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005479 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5480 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005481 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005482 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005483
5484 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5485 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005486 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005487 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005488
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005489 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5490 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005491 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005492 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005493
5494 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5495 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005496 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005497 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005498
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499 else
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005500 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005501
5502 fi
5503
5504
Ronald Oussoren666028b2010-04-18 19:07:43 +00005505 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5506 if test "${UNIVERSALSDK}" != "/"
5507 then
5508 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5509 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005510 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005511 fi
5512 fi
5513
5514 # Calculate the right deployment target for this build.
5515 #
5516 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5517 if test ${cur_target} '>' 10.2; then
5518 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005519 if test ${enable_universalsdk}; then
5520 if test "${UNIVERSAL_ARCHS}" = "all"; then
5521 # Ensure that the default platform for a
5522 # 4-way universal build is OSX 10.5,
5523 # that's the first OS release where
5524 # 4-way builds make sense.
5525 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005526
5527 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5528 cur_target='10.5'
5529
5530 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5531 cur_target='10.5'
5532
5533 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5534 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005535 fi
5536 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005537 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005538 # On Intel macs default to a deployment
5539 # target of 10.4, that's the first OSX
5540 # release with Intel support.
5541 cur_target="10.4"
5542 fi
5543 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005544 fi
5545 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5546
5547 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5548 # environment with a value that is the same as what we'll use
5549 # in the Makefile to ensure that we'll get the same compiler
5550 # environment during configure and build time.
5551 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5552 export MACOSX_DEPLOYMENT_TARGET
5553 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5554
5555 ;;
5556 OSF*)
5557 BASECFLAGS="$BASECFLAGS -mieee"
5558 ;;
5559 esac
5560 ;;
5561
5562*)
5563 case $ac_sys_system in
5564 OpenUNIX*|UnixWare*)
5565 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5566 ;;
5567 OSF*)
5568 BASECFLAGS="$BASECFLAGS -ieee -std"
5569 ;;
5570 SCO_SV*)
5571 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5572 ;;
5573 esac
5574 ;;
5575esac
5576
5577if test "$Py_DEBUG" = 'true'; then
5578 :
5579else
5580 OPT="-DNDEBUG $OPT"
5581fi
5582
5583if test "$ac_arch_flags"
5584then
5585 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5586fi
5587
5588# disable check for icc since it seems to pass, but generates a warning
5589if test "$CC" = icc
5590then
5591 ac_cv_opt_olimit_ok=no
5592fi
5593
Matthias Kloseb9621712010-04-24 17:59:49 +00005594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5595$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5596if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5597 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598else
5599 ac_save_cc="$CC"
5600CC="$CC -OPT:Olimit=0"
Matthias Kloseb9621712010-04-24 17:59:49 +00005601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005603
5604int
5605main ()
5606{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005607
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005608 ;
5609 return 0;
5610}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005612if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613 ac_cv_opt_olimit_ok=yes
5614else
Matthias Kloseb9621712010-04-24 17:59:49 +00005615 ac_cv_opt_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005616
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005617fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619CC="$ac_save_cc"
5620fi
5621
Matthias Kloseb9621712010-04-24 17:59:49 +00005622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5623$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624if test $ac_cv_opt_olimit_ok = yes; then
5625 case $ac_sys_system in
5626 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5627 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5628 # environment?
5629 Darwin*)
5630 ;;
5631 *)
5632 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5633 ;;
5634 esac
5635else
Matthias Kloseb9621712010-04-24 17:59:49 +00005636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5637$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5638 if test "${ac_cv_olimit_ok+set}" = set; then :
5639 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640else
5641 ac_save_cc="$CC"
5642 CC="$CC -Olimit 1500"
Matthias Kloseb9621712010-04-24 17:59:49 +00005643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005645
5646int
5647main ()
5648{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005649
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005650 ;
5651 return 0;
5652}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005654if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655 ac_cv_olimit_ok=yes
5656else
Matthias Kloseb9621712010-04-24 17:59:49 +00005657 ac_cv_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005658
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661 CC="$ac_save_cc"
5662fi
5663
Matthias Kloseb9621712010-04-24 17:59:49 +00005664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5665$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 if test $ac_cv_olimit_ok = yes; then
5667 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5668 fi
5669fi
5670
5671# Check whether GCC supports PyArg_ParseTuple format
5672if test "$GCC" = "yes"
5673then
Matthias Kloseb9621712010-04-24 17:59:49 +00005674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5675$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676 save_CFLAGS=$CFLAGS
5677 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679/* end confdefs.h. */
5680
5681 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682int
5683main ()
5684{
5685
5686 ;
5687 return 0;
5688}
Matthias Kloseb159a552010-04-25 21:00:44 +00005689
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005691if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692
Matthias Kloseb159a552010-04-25 21:00:44 +00005693
Matthias Kloseb9621712010-04-24 17:59:49 +00005694$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695
Matthias Kloseb159a552010-04-25 21:00:44 +00005696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005697$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005698
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699else
Matthias Kloseb159a552010-04-25 21:00:44 +00005700
5701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005702$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703
5704fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5706 CFLAGS=$save_CFLAGS
5707fi
5708
5709# On some compilers, pthreads are available without further options
5710# (e.g. MacOS X). On some of these systems, the compiler will not
5711# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5712# So we have to see first whether pthreads are available without
5713# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5715$as_echo_n "checking whether pthreads are available without options... " >&6; }
5716if test "${ac_cv_pthread_is_default+set}" = set; then :
5717 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718else
Matthias Kloseb9621712010-04-24 17:59:49 +00005719 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720 ac_cv_pthread_is_default=no
5721else
Matthias Kloseb9621712010-04-24 17:59:49 +00005722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723/* end confdefs.h. */
5724
5725#include <pthread.h>
5726
5727void* routine(void* p){return NULL;}
5728
5729int main(){
5730 pthread_t p;
5731 if(pthread_create(&p,NULL,routine,NULL)!=0)
5732 return 1;
5733 (void)pthread_detach(p);
5734 return 0;
5735}
5736
5737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005738if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739
5740 ac_cv_pthread_is_default=yes
5741 ac_cv_kthread=no
5742 ac_cv_pthread=no
5743
5744else
Matthias Kloseb9621712010-04-24 17:59:49 +00005745 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5748 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749fi
5750
5751
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752fi
5753
Matthias Kloseb9621712010-04-24 17:59:49 +00005754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5755$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756
5757
5758if test $ac_cv_pthread_is_default = yes
5759then
5760 ac_cv_kpthread=no
5761else
5762# -Kpthread, if available, provides the right #defines
5763# and linker options to make pthread_create available
5764# Some compilers won't report that they do not support -Kpthread,
5765# so we need to run a program to see whether it really made the
5766# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5768$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5769if test "${ac_cv_kpthread+set}" = set; then :
5770 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771else
5772 ac_save_cc="$CC"
5773CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005774if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775 ac_cv_kpthread=no
5776else
Matthias Kloseb9621712010-04-24 17:59:49 +00005777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778/* end confdefs.h. */
5779
5780#include <pthread.h>
5781
5782void* routine(void* p){return NULL;}
5783
5784int main(){
5785 pthread_t p;
5786 if(pthread_create(&p,NULL,routine,NULL)!=0)
5787 return 1;
5788 (void)pthread_detach(p);
5789 return 0;
5790}
5791
5792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005793if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794 ac_cv_kpthread=yes
5795else
Matthias Kloseb9621712010-04-24 17:59:49 +00005796 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005798rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5799 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800fi
5801
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802CC="$ac_save_cc"
5803fi
5804
Matthias Kloseb9621712010-04-24 17:59:49 +00005805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5806$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807fi
5808
5809if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5810then
5811# -Kthread, if available, provides the right #defines
5812# and linker options to make pthread_create available
5813# Some compilers won't report that they do not support -Kthread,
5814# so we need to run a program to see whether it really made the
5815# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5817$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5818if test "${ac_cv_kthread+set}" = set; then :
5819 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820else
5821 ac_save_cc="$CC"
5822CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005823if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824 ac_cv_kthread=no
5825else
Matthias Kloseb9621712010-04-24 17:59:49 +00005826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827/* end confdefs.h. */
5828
5829#include <pthread.h>
5830
5831void* routine(void* p){return NULL;}
5832
5833int main(){
5834 pthread_t p;
5835 if(pthread_create(&p,NULL,routine,NULL)!=0)
5836 return 1;
5837 (void)pthread_detach(p);
5838 return 0;
5839}
5840
5841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005842if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843 ac_cv_kthread=yes
5844else
Matthias Kloseb9621712010-04-24 17:59:49 +00005845 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005847rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5848 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849fi
5850
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851CC="$ac_save_cc"
5852fi
5853
Matthias Kloseb9621712010-04-24 17:59:49 +00005854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5855$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856fi
5857
5858if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5859then
5860# -pthread, if available, provides the right #defines
5861# and linker options to make pthread_create available
5862# Some compilers won't report that they do not support -pthread,
5863# so we need to run a program to see whether it really made the
5864# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5866$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5867if test "${ac_cv_thread+set}" = set; then :
5868 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869else
5870 ac_save_cc="$CC"
5871CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005872if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873 ac_cv_pthread=no
5874else
Matthias Kloseb9621712010-04-24 17:59:49 +00005875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876/* end confdefs.h. */
5877
5878#include <pthread.h>
5879
5880void* routine(void* p){return NULL;}
5881
5882int main(){
5883 pthread_t p;
5884 if(pthread_create(&p,NULL,routine,NULL)!=0)
5885 return 1;
5886 (void)pthread_detach(p);
5887 return 0;
5888}
5889
5890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005891if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892 ac_cv_pthread=yes
5893else
Matthias Kloseb9621712010-04-24 17:59:49 +00005894 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5897 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898fi
5899
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900CC="$ac_save_cc"
5901fi
5902
Matthias Kloseb9621712010-04-24 17:59:49 +00005903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5904$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905fi
5906
5907# If we have set a CC compiler flag for thread support then
5908# check if it works for CXX, too.
5909ac_cv_cxx_thread=no
5910if test ! -z "$CXX"
5911then
Matthias Kloseb9621712010-04-24 17:59:49 +00005912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5913$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914ac_save_cxx="$CXX"
5915
5916if test "$ac_cv_kpthread" = "yes"
5917then
5918 CXX="$CXX -Kpthread"
5919 ac_cv_cxx_thread=yes
5920elif test "$ac_cv_kthread" = "yes"
5921then
5922 CXX="$CXX -Kthread"
5923 ac_cv_cxx_thread=yes
5924elif test "$ac_cv_pthread" = "yes"
5925then
5926 CXX="$CXX -pthread"
5927 ac_cv_cxx_thread=yes
5928fi
5929
5930if test $ac_cv_cxx_thread = yes
5931then
5932 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5933 $CXX -c conftest.$ac_ext 2>&5
5934 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5935 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5936 then
5937 ac_cv_cxx_thread=yes
5938 else
5939 ac_cv_cxx_thread=no
5940 fi
5941 rm -fr conftest*
5942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5944$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945fi
5946CXX="$ac_save_cxx"
5947
5948
5949# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5951$as_echo_n "checking for ANSI C header files... " >&6; }
5952if test "${ac_cv_header_stdc+set}" = set; then :
5953 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954else
Matthias Kloseb9621712010-04-24 17:59:49 +00005955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956/* end confdefs.h. */
5957#include <stdlib.h>
5958#include <stdarg.h>
5959#include <string.h>
5960#include <float.h>
5961
5962int
5963main ()
5964{
5965
5966 ;
5967 return 0;
5968}
5969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005970if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971 ac_cv_header_stdc=yes
5972else
Matthias Kloseb9621712010-04-24 17:59:49 +00005973 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5976
5977if test $ac_cv_header_stdc = yes; then
5978 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980/* end confdefs.h. */
5981#include <string.h>
5982
5983_ACEOF
5984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005985 $EGREP "memchr" >/dev/null 2>&1; then :
5986
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987else
5988 ac_cv_header_stdc=no
5989fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005990rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991
5992fi
5993
5994if test $ac_cv_header_stdc = yes; then
5995 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997/* end confdefs.h. */
5998#include <stdlib.h>
5999
6000_ACEOF
6001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006002 $EGREP "free" >/dev/null 2>&1; then :
6003
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004else
6005 ac_cv_header_stdc=no
6006fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006007rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008
6009fi
6010
6011if test $ac_cv_header_stdc = yes; then
6012 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006013 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014 :
6015else
Matthias Kloseb9621712010-04-24 17:59:49 +00006016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017/* end confdefs.h. */
6018#include <ctype.h>
6019#include <stdlib.h>
6020#if ((' ' & 0x0FF) == 0x020)
6021# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6022# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6023#else
6024# define ISLOWER(c) \
6025 (('a' <= (c) && (c) <= 'i') \
6026 || ('j' <= (c) && (c) <= 'r') \
6027 || ('s' <= (c) && (c) <= 'z'))
6028# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6029#endif
6030
6031#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6032int
6033main ()
6034{
6035 int i;
6036 for (i = 0; i < 256; i++)
6037 if (XOR (islower (i), ISLOWER (i))
6038 || toupper (i) != TOUPPER (i))
6039 return 2;
6040 return 0;
6041}
6042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006043if ac_fn_c_try_run "$LINENO"; then :
6044
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045else
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006048rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6049 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050fi
6051
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052fi
6053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6055$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006056if test $ac_cv_header_stdc = yes; then
6057
Matthias Kloseb9621712010-04-24 17:59:49 +00006058$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059
6060fi
6061
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006062for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6063fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006064ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006065shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006066unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006067sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6068sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006069sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006070sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006071sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00006072sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006073bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006074do :
6075 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6076ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006077if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006078 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006079#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006080_ACEOF
6081
6082fi
6083
Guido van Rossum627b2d71993-12-24 10:39:16 +00006084done
6085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006086ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006087for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006088 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6090$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006091if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006092 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006093else
Matthias Kloseb9621712010-04-24 17:59:49 +00006094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006095/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006096#include <sys/types.h>
6097#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006098
Martin v. Löwis11437992002-04-12 09:54:03 +00006099int
6100main ()
6101{
6102if ((DIR *) 0)
6103return 0;
6104 ;
6105 return 0;
6106}
6107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006108if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006109 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006110else
Matthias Kloseb9621712010-04-24 17:59:49 +00006111 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006115eval ac_res=\$$as_ac_Header
6116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6117$as_echo "$ac_res" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006118if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006119 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006120#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006121_ACEOF
6122
6123ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006124fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006125
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006126done
6127# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6128if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6130$as_echo_n "checking for library containing opendir... " >&6; }
6131if test "${ac_cv_search_opendir+set}" = set; then :
6132 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006133else
Martin v. Löwis11437992002-04-12 09:54:03 +00006134 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006138/* Override any GCC internal prototype to avoid an error.
6139 Use char because int might match the return type of a GCC
6140 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006141#ifdef __cplusplus
6142extern "C"
6143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006144char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006145int
6146main ()
6147{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006148return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006149 ;
6150 return 0;
6151}
6152_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006153for ac_lib in '' dir; do
6154 if test -z "$ac_lib"; then
6155 ac_res="none required"
6156 else
6157 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006158 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006159 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006160 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006161 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006163rm -f core conftest.err conftest.$ac_objext \
6164 conftest$ac_exeext
6165 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006166 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006168done
Matthias Kloseb9621712010-04-24 17:59:49 +00006169if test "${ac_cv_search_opendir+set}" = set; then :
6170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006171else
6172 ac_cv_search_opendir=no
6173fi
6174rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006175LIBS=$ac_func_search_save_LIBS
6176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6178$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006179ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006180if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006181 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006182
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006183fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006184
Michael W. Hudson54241132001-12-07 15:38:26 +00006185else
Matthias Kloseb9621712010-04-24 17:59:49 +00006186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6187$as_echo_n "checking for library containing opendir... " >&6; }
6188if test "${ac_cv_search_opendir+set}" = set; then :
6189 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006190else
6191 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006195/* Override any GCC internal prototype to avoid an error.
6196 Use char because int might match the return type of a GCC
6197 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006198#ifdef __cplusplus
6199extern "C"
6200#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006201char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006202int
6203main ()
6204{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006205return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006206 ;
6207 return 0;
6208}
6209_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006210for ac_lib in '' x; do
6211 if test -z "$ac_lib"; then
6212 ac_res="none required"
6213 else
6214 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006215 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006216 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006217 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006218 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006219fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006220rm -f core conftest.err conftest.$ac_objext \
6221 conftest$ac_exeext
6222 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006223 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006225done
Matthias Kloseb9621712010-04-24 17:59:49 +00006226if test "${ac_cv_search_opendir+set}" = set; then :
6227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006228else
6229 ac_cv_search_opendir=no
6230fi
6231rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006232LIBS=$ac_func_search_save_LIBS
6233fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6235$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006236ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006237if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006238 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006239
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006240fi
6241
6242fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006243
Matthias Kloseb9621712010-04-24 17:59:49 +00006244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6245$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6246if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6247 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248else
Matthias Kloseb9621712010-04-24 17:59:49 +00006249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006250/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006251#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006252int
6253main ()
6254{
6255return makedev(0, 0);
6256 ;
6257 return 0;
6258}
6259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006260if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006261 ac_cv_header_sys_types_h_makedev=yes
6262else
Matthias Kloseb9621712010-04-24 17:59:49 +00006263 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006265rm -f core conftest.err conftest.$ac_objext \
6266 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006267
6268fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6270$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006271
6272if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006273ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6274if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006275
Matthias Kloseb9621712010-04-24 17:59:49 +00006276$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006277
6278fi
6279
6280
6281
6282 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006283 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6284if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006285
Matthias Kloseb9621712010-04-24 17:59:49 +00006286$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006287
6288fi
6289
6290
6291 fi
6292fi
6293
Michael W. Hudson54241132001-12-07 15:38:26 +00006294
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006295# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006296for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006297do :
6298 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006299#ifdef HAVE_CURSES_H
6300#include <curses.h>
6301#endif
6302
Matthias Kloseb9621712010-04-24 17:59:49 +00006303"
6304if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006305 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006306#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006307_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006308
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006309fi
6310
6311done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006312
6313
Martin v. Löwis11017b12006-01-14 18:12:57 +00006314# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006315for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006316do :
6317 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00006318#ifdef HAVE_ASM_TYPES_H
6319#include <asm/types.h>
6320#endif
6321#ifdef HAVE_SYS_SOCKET_H
6322#include <sys/socket.h>
6323#endif
6324
Matthias Kloseb9621712010-04-24 17:59:49 +00006325"
6326if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006327 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006328#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006329_ACEOF
6330
6331fi
6332
6333done
6334
6335
Guido van Rossum627b2d71993-12-24 10:39:16 +00006336# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006337was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6339$as_echo_n "checking for clock_t in time.h... " >&6; }
6340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006341/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006342#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006343
6344_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006345if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006346 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006347 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006348else
Martin v. Löwis11437992002-04-12 09:54:03 +00006349
6350
Matthias Kloseb9621712010-04-24 17:59:49 +00006351$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006352
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006353
Guido van Rossum627b2d71993-12-24 10:39:16 +00006354fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006355rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006356
Matthias Kloseb9621712010-04-24 17:59:49 +00006357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6358$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006359
Neal Norwitz11690112002-07-30 01:08:28 +00006360# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6362$as_echo_n "checking for makedev... " >&6; }
6363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006364/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006365
Jesus Cea740f53a2010-04-28 11:35:30 +00006366#if defined(MAJOR_IN_MKDEV)
6367#include <sys/mkdev.h>
6368#elif defined(MAJOR_IN_SYSMACROS)
6369#include <sys/sysmacros.h>
6370#else
6371#include <sys/types.h>
6372#endif
6373
Neal Norwitz11690112002-07-30 01:08:28 +00006374int
6375main ()
6376{
Jesus Cea740f53a2010-04-28 11:35:30 +00006377
6378 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006379 ;
6380 return 0;
6381}
Matthias Kloseb159a552010-04-25 21:00:44 +00006382
Neal Norwitz11690112002-07-30 01:08:28 +00006383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006384if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006385 ac_cv_has_makedev=yes
6386else
Matthias Kloseb9621712010-04-24 17:59:49 +00006387 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006388fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006389rm -f core conftest.err conftest.$ac_objext \
6390 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006391if test "$ac_cv_has_makedev" = "no"; then
6392 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006394/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006395
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006396#define _OSF_SOURCE 1
6397#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006398
Neal Norwitz11690112002-07-30 01:08:28 +00006399int
6400main ()
6401{
6402 makedev(0, 0)
6403 ;
6404 return 0;
6405}
6406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006407if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006408 ac_cv_has_makedev=yes
6409else
Matthias Kloseb9621712010-04-24 17:59:49 +00006410 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006412rm -f core conftest.err conftest.$ac_objext \
6413 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006414 if test "$ac_cv_has_makedev" = "yes"; then
6415
Matthias Kloseb9621712010-04-24 17:59:49 +00006416$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006417
6418 fi
6419fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6421$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006422if test "$ac_cv_has_makedev" = "yes"; then
6423
Matthias Kloseb9621712010-04-24 17:59:49 +00006424$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006425
6426fi
6427
Martin v. Löwis399a6892002-10-04 10:22:02 +00006428# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6429# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6430# defined, but the compiler does not support pragma redefine_extname,
6431# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6432# structures (such as rlimit64) without declaring them. As a
6433# work-around, disable LFS on such configurations
6434
6435use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6437$as_echo_n "checking Solaris LFS bug... " >&6; }
6438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006439/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006440
6441#define _LARGEFILE_SOURCE 1
6442#define _FILE_OFFSET_BITS 64
6443#include <sys/resource.h>
6444
Martin v. Löwis399a6892002-10-04 10:22:02 +00006445int
6446main ()
6447{
6448struct rlimit foo;
6449 ;
6450 return 0;
6451}
6452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006453if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006454 sol_lfs_bug=no
6455else
Matthias Kloseb9621712010-04-24 17:59:49 +00006456 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6460$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006461if test "$sol_lfs_bug" = "yes"; then
6462 use_lfs=no
6463fi
6464
6465if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006466# Two defines needed to enable largefile support on various platforms
6467# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006468
Matthias Kloseb9621712010-04-24 17:59:49 +00006469$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006470
6471
Matthias Kloseb9621712010-04-24 17:59:49 +00006472$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006473
Martin v. Löwis399a6892002-10-04 10:22:02 +00006474fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006475
Guido van Rossum84e7b241996-08-19 21:59:00 +00006476# Add some code to confdefs.h so that the test for off_t works on SCO
6477cat >> confdefs.h <<\EOF
6478#if defined(SCO_DS)
6479#undef _OFF_T
6480#endif
6481EOF
6482
Guido van Rossumef2255b2000-03-10 22:30:29 +00006483# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006484ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6485if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006486
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006487else
Martin v. Löwis11437992002-04-12 09:54:03 +00006488
6489cat >>confdefs.h <<_ACEOF
6490#define mode_t int
6491_ACEOF
6492
6493fi
6494
Matthias Kloseb9621712010-04-24 17:59:49 +00006495ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6496if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006497
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006498else
Martin v. Löwis11437992002-04-12 09:54:03 +00006499
6500cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006501#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006502_ACEOF
6503
6504fi
6505
Matthias Kloseb9621712010-04-24 17:59:49 +00006506ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6507if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006508
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006509else
Martin v. Löwis11437992002-04-12 09:54:03 +00006510
6511cat >>confdefs.h <<_ACEOF
6512#define pid_t int
6513_ACEOF
6514
6515fi
6516
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006517
Martin v. Löwis11437992002-04-12 09:54:03 +00006518cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006519#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006520_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006521
Matthias Kloseb9621712010-04-24 17:59:49 +00006522ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6523if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006524
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006525else
Martin v. Löwis11437992002-04-12 09:54:03 +00006526
6527cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006528#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006529_ACEOF
6530
6531fi
6532
Matthias Kloseb9621712010-04-24 17:59:49 +00006533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6534$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6535if test "${ac_cv_type_uid_t+set}" = set; then :
6536 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006537else
Matthias Kloseb9621712010-04-24 17:59:49 +00006538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006539/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006540#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006541
6542_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006543if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006544 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006545 ac_cv_type_uid_t=yes
6546else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006547 ac_cv_type_uid_t=no
6548fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006549rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006550
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006551fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6553$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006554if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006555
Matthias Kloseb9621712010-04-24 17:59:49 +00006556$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006557
6558
Matthias Kloseb9621712010-04-24 17:59:49 +00006559$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006560
6561fi
6562
Matthias Kloseb9621712010-04-24 17:59:49 +00006563ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6564case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006565 no|yes) ;; #(
6566 *)
6567
Matthias Kloseb9621712010-04-24 17:59:49 +00006568$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006569
6570
6571cat >>confdefs.h <<_ACEOF
6572#define uint32_t $ac_cv_c_uint32_t
6573_ACEOF
6574;;
6575 esac
6576
Matthias Kloseb9621712010-04-24 17:59:49 +00006577ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6578case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006579 no|yes) ;; #(
6580 *)
6581
Matthias Kloseb9621712010-04-24 17:59:49 +00006582$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006583
6584
6585cat >>confdefs.h <<_ACEOF
6586#define uint64_t $ac_cv_c_uint64_t
6587_ACEOF
6588;;
6589 esac
6590
Matthias Kloseb9621712010-04-24 17:59:49 +00006591ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6592case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006593 no|yes) ;; #(
6594 *)
6595
6596cat >>confdefs.h <<_ACEOF
6597#define int32_t $ac_cv_c_int32_t
6598_ACEOF
6599;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006600esac
6601
Matthias Kloseb9621712010-04-24 17:59:49 +00006602ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6603case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006604 no|yes) ;; #(
6605 *)
6606
6607cat >>confdefs.h <<_ACEOF
6608#define int64_t $ac_cv_c_int64_t
6609_ACEOF
6610;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006611esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006612
Matthias Kloseb9621712010-04-24 17:59:49 +00006613ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6614if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006615
Matthias Kloseb9621712010-04-24 17:59:49 +00006616$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006617
6618fi
6619
Jack Jansendd19cf82001-12-06 22:36:17 +00006620
Michael W. Hudson54241132001-12-07 15:38:26 +00006621# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006622# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006623# The cast to long int works around a bug in the HP C Compiler
6624# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6625# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6626# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6628$as_echo_n "checking size of int... " >&6; }
6629if test "${ac_cv_sizeof_int+set}" = set; then :
6630 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006631else
Matthias Kloseb9621712010-04-24 17:59:49 +00006632 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 +00006633
Martin v. Löwis11437992002-04-12 09:54:03 +00006634else
Matthias Kloseb9621712010-04-24 17:59:49 +00006635 if test "$ac_cv_type_int" = yes; then
6636 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6637$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006638as_fn_error 77 "cannot compute sizeof (int)
6639See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006640 else
6641 ac_cv_sizeof_int=0
6642 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006644
Martin v. Löwis11437992002-04-12 09:54:03 +00006645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6647$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006648
6649
6650
Martin v. Löwis11437992002-04-12 09:54:03 +00006651cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006652#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006653_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006654
6655
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006656# The cast to long int works around a bug in the HP C Compiler
6657# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6658# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6659# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6661$as_echo_n "checking size of long... " >&6; }
6662if test "${ac_cv_sizeof_long+set}" = set; then :
6663 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006664else
Matthias Kloseb9621712010-04-24 17:59:49 +00006665 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 +00006666
Martin v. Löwis11437992002-04-12 09:54:03 +00006667else
Matthias Kloseb9621712010-04-24 17:59:49 +00006668 if test "$ac_cv_type_long" = yes; then
6669 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6670$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006671as_fn_error 77 "cannot compute sizeof (long)
6672See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006673 else
6674 ac_cv_sizeof_long=0
6675 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006677
Martin v. Löwis11437992002-04-12 09:54:03 +00006678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6680$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006681
6682
6683
Martin v. Löwis11437992002-04-12 09:54:03 +00006684cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006685#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006686_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006687
6688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006689# The cast to long int works around a bug in the HP C Compiler
6690# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6691# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6692# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6694$as_echo_n "checking size of void *... " >&6; }
6695if test "${ac_cv_sizeof_void_p+set}" = set; then :
6696 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006697else
Matthias Kloseb9621712010-04-24 17:59:49 +00006698 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 +00006699
Martin v. Löwis11437992002-04-12 09:54:03 +00006700else
Matthias Kloseb9621712010-04-24 17:59:49 +00006701 if test "$ac_cv_type_void_p" = yes; then
6702 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6703$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006704as_fn_error 77 "cannot compute sizeof (void *)
6705See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006706 else
6707 ac_cv_sizeof_void_p=0
6708 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006710
Martin v. Löwis11437992002-04-12 09:54:03 +00006711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6713$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006714
6715
6716
Martin v. Löwis11437992002-04-12 09:54:03 +00006717cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006718#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006719_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006720
6721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006722# The cast to long int works around a bug in the HP C Compiler
6723# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6724# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6725# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6727$as_echo_n "checking size of short... " >&6; }
6728if test "${ac_cv_sizeof_short+set}" = set; then :
6729 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006730else
Matthias Kloseb9621712010-04-24 17:59:49 +00006731 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 +00006732
Martin v. Löwis11437992002-04-12 09:54:03 +00006733else
Matthias Kloseb9621712010-04-24 17:59:49 +00006734 if test "$ac_cv_type_short" = yes; then
6735 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6736$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006737as_fn_error 77 "cannot compute sizeof (short)
6738See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006739 else
6740 ac_cv_sizeof_short=0
6741 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006743
Martin v. Löwis11437992002-04-12 09:54:03 +00006744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6746$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006747
6748
6749
Martin v. Löwis11437992002-04-12 09:54:03 +00006750cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006751#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006752_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006753
6754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006755# The cast to long int works around a bug in the HP C Compiler
6756# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6757# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6758# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6760$as_echo_n "checking size of float... " >&6; }
6761if test "${ac_cv_sizeof_float+set}" = set; then :
6762 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006763else
Matthias Kloseb9621712010-04-24 17:59:49 +00006764 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 +00006765
Martin v. Löwis11437992002-04-12 09:54:03 +00006766else
Matthias Kloseb9621712010-04-24 17:59:49 +00006767 if test "$ac_cv_type_float" = yes; then
6768 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6769$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006770as_fn_error 77 "cannot compute sizeof (float)
6771See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006772 else
6773 ac_cv_sizeof_float=0
6774 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006776
Martin v. Löwis11437992002-04-12 09:54:03 +00006777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6779$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006780
6781
6782
Martin v. Löwis11437992002-04-12 09:54:03 +00006783cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006784#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006785_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006786
6787
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006788# The cast to long int works around a bug in the HP C Compiler
6789# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6790# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6791# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6793$as_echo_n "checking size of double... " >&6; }
6794if test "${ac_cv_sizeof_double+set}" = set; then :
6795 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006796else
Matthias Kloseb9621712010-04-24 17:59:49 +00006797 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 +00006798
Martin v. Löwis11437992002-04-12 09:54:03 +00006799else
Matthias Kloseb9621712010-04-24 17:59:49 +00006800 if test "$ac_cv_type_double" = yes; then
6801 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006803as_fn_error 77 "cannot compute sizeof (double)
6804See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006805 else
6806 ac_cv_sizeof_double=0
6807 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006809
Martin v. Löwis11437992002-04-12 09:54:03 +00006810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6812$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006813
6814
6815
Martin v. Löwis11437992002-04-12 09:54:03 +00006816cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006817#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006818_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006819
6820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006821# The cast to long int works around a bug in the HP C Compiler
6822# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6823# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6824# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6826$as_echo_n "checking size of fpos_t... " >&6; }
6827if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6828 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006829else
Matthias Kloseb9621712010-04-24 17:59:49 +00006830 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 +00006831
Martin v. Löwis11437992002-04-12 09:54:03 +00006832else
Matthias Kloseb9621712010-04-24 17:59:49 +00006833 if test "$ac_cv_type_fpos_t" = yes; then
6834 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6835$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006836as_fn_error 77 "cannot compute sizeof (fpos_t)
6837See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006838 else
6839 ac_cv_sizeof_fpos_t=0
6840 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006842
Martin v. Löwis11437992002-04-12 09:54:03 +00006843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6845$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006846
6847
6848
Martin v. Löwis11437992002-04-12 09:54:03 +00006849cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006850#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006851_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006852
Michael W. Hudson54241132001-12-07 15:38:26 +00006853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006854# The cast to long int works around a bug in the HP C Compiler
6855# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6856# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6857# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6859$as_echo_n "checking size of size_t... " >&6; }
6860if test "${ac_cv_sizeof_size_t+set}" = set; then :
6861 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006862else
Matthias Kloseb9621712010-04-24 17:59:49 +00006863 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 +00006864
Martin v. Löwis18e16552006-02-15 17:27:45 +00006865else
Matthias Kloseb9621712010-04-24 17:59:49 +00006866 if test "$ac_cv_type_size_t" = yes; then
6867 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6868$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006869as_fn_error 77 "cannot compute sizeof (size_t)
6870See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006871 else
6872 ac_cv_sizeof_size_t=0
6873 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006875
Martin v. Löwis18e16552006-02-15 17:27:45 +00006876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6878$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006879
6880
6881
Martin v. Löwis18e16552006-02-15 17:27:45 +00006882cat >>confdefs.h <<_ACEOF
6883#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6884_ACEOF
6885
6886
Christian Heimes400adb02008-02-01 08:12:03 +00006887# The cast to long int works around a bug in the HP C Compiler
6888# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6889# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6890# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6892$as_echo_n "checking size of pid_t... " >&6; }
6893if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6894 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006895else
Matthias Kloseb9621712010-04-24 17:59:49 +00006896 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00006897
Christian Heimes400adb02008-02-01 08:12:03 +00006898else
Matthias Kloseb9621712010-04-24 17:59:49 +00006899 if test "$ac_cv_type_pid_t" = yes; then
6900 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006902as_fn_error 77 "cannot compute sizeof (pid_t)
6903See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes400adb02008-02-01 08:12:03 +00006904 else
6905 ac_cv_sizeof_pid_t=0
6906 fi
6907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006908
Christian Heimes400adb02008-02-01 08:12:03 +00006909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6911$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006912
6913
6914
6915cat >>confdefs.h <<_ACEOF
6916#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6917_ACEOF
6918
6919
Michael W. Hudson54241132001-12-07 15:38:26 +00006920
Matthias Kloseb9621712010-04-24 17:59:49 +00006921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6922$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006923have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006925/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006926
Martin v. Löwis11437992002-04-12 09:54:03 +00006927int
6928main ()
6929{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006930long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006931 ;
6932 return 0;
6933}
6934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006935if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006936
6937
Matthias Kloseb9621712010-04-24 17:59:49 +00006938$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006939
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006940 have_long_long=yes
6941
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6945$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006946if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006947# The cast to long int works around a bug in the HP C Compiler
6948# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6949# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6950# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6952$as_echo_n "checking size of long long... " >&6; }
6953if test "${ac_cv_sizeof_long_long+set}" = set; then :
6954 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006955else
Matthias Kloseb9621712010-04-24 17:59:49 +00006956 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 +00006957
Martin v. Löwis11437992002-04-12 09:54:03 +00006958else
Matthias Kloseb9621712010-04-24 17:59:49 +00006959 if test "$ac_cv_type_long_long" = yes; then
6960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006962as_fn_error 77 "cannot compute sizeof (long long)
6963See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006964 else
6965 ac_cv_sizeof_long_long=0
6966 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006968
Martin v. Löwis11437992002-04-12 09:54:03 +00006969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6971$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006972
6973
6974
Martin v. Löwis11437992002-04-12 09:54:03 +00006975cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006976#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006977_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006978
Michael W. Hudson54241132001-12-07 15:38:26 +00006979
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006980fi
6981
Matthias Kloseb9621712010-04-24 17:59:49 +00006982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6983$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006984have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006986/* end confdefs.h. */
6987
6988int
6989main ()
6990{
6991long double x; x = (long double)0;
6992 ;
6993 return 0;
6994}
6995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006996if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006997
6998
Matthias Kloseb9621712010-04-24 17:59:49 +00006999$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007000
7001 have_long_double=yes
7002
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007003fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7006$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007007if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007008# The cast to long int works around a bug in the HP C Compiler
7009# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7010# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7011# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7013$as_echo_n "checking size of long double... " >&6; }
7014if test "${ac_cv_sizeof_long_double+set}" = set; then :
7015 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007016else
Matthias Kloseb9621712010-04-24 17:59:49 +00007017 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007018
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007019else
Matthias Kloseb9621712010-04-24 17:59:49 +00007020 if test "$ac_cv_type_long_double" = yes; then
7021 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00007023as_fn_error 77 "cannot compute sizeof (long double)
7024See \`config.log' for more details" "$LINENO" 5 ; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007025 else
7026 ac_cv_sizeof_long_double=0
7027 fi
7028fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007029
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7032$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007033
7034
7035
7036cat >>confdefs.h <<_ACEOF
7037#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7038_ACEOF
7039
7040
7041fi
7042
7043
Matthias Kloseb9621712010-04-24 17:59:49 +00007044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7045$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007046have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007048/* end confdefs.h. */
7049
7050int
7051main ()
7052{
7053_Bool x; x = (_Bool)0;
7054 ;
7055 return 0;
7056}
7057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007058if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007059
7060
Matthias Kloseb9621712010-04-24 17:59:49 +00007061$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007062
7063 have_c99_bool=yes
7064
Thomas Woutersb2137042007-02-01 18:02:27 +00007065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7068$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007069if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007070# The cast to long int works around a bug in the HP C Compiler
7071# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7072# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7073# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7075$as_echo_n "checking size of _Bool... " >&6; }
7076if test "${ac_cv_sizeof__Bool+set}" = set; then :
7077 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007078else
Matthias Kloseb9621712010-04-24 17:59:49 +00007079 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007080
Thomas Woutersb2137042007-02-01 18:02:27 +00007081else
Matthias Kloseb9621712010-04-24 17:59:49 +00007082 if test "$ac_cv_type__Bool" = yes; then
7083 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00007085as_fn_error 77 "cannot compute sizeof (_Bool)
7086See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007087 else
7088 ac_cv_sizeof__Bool=0
7089 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007091
Thomas Woutersb2137042007-02-01 18:02:27 +00007092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7094$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007095
7096
7097
Thomas Woutersb2137042007-02-01 18:02:27 +00007098cat >>confdefs.h <<_ACEOF
7099#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7100_ACEOF
7101
7102
7103fi
7104
Matthias Kloseb9621712010-04-24 17:59:49 +00007105ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007106 #include <stdint.h>
7107 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007108"
7109if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007110
7111cat >>confdefs.h <<_ACEOF
7112#define HAVE_UINTPTR_T 1
7113_ACEOF
7114
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007115# The cast to long int works around a bug in the HP C Compiler
7116# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7117# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7118# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7120$as_echo_n "checking size of uintptr_t... " >&6; }
7121if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7122 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007123else
Matthias Kloseb9621712010-04-24 17:59:49 +00007124 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 +00007125
Martin v. Löwis11437992002-04-12 09:54:03 +00007126else
Matthias Kloseb9621712010-04-24 17:59:49 +00007127 if test "$ac_cv_type_uintptr_t" = yes; then
7128 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7129$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00007130as_fn_error 77 "cannot compute sizeof (uintptr_t)
7131See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007132 else
7133 ac_cv_sizeof_uintptr_t=0
7134 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007136
Martin v. Löwis11437992002-04-12 09:54:03 +00007137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7139$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007140
7141
7142
Martin v. Löwis11437992002-04-12 09:54:03 +00007143cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007144#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007145_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007146
Michael W. Hudson54241132001-12-07 15:38:26 +00007147
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007148fi
7149
Thomas Wouters89f507f2006-12-13 04:49:30 +00007150
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007151# The cast to long int works around a bug in the HP C Compiler
7152# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7153# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7154# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7156$as_echo_n "checking size of off_t... " >&6; }
7157if test "${ac_cv_sizeof_off_t+set}" = set; then :
7158 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007159else
Matthias Kloseb9621712010-04-24 17:59:49 +00007160 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007161#ifdef HAVE_SYS_TYPES_H
7162#include <sys/types.h>
7163#endif
7164
Matthias Kloseb9621712010-04-24 17:59:49 +00007165"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007166
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007167else
Matthias Kloseb9621712010-04-24 17:59:49 +00007168 if test "$ac_cv_type_off_t" = yes; then
7169 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00007171as_fn_error 77 "cannot compute sizeof (off_t)
7172See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007173 else
7174 ac_cv_sizeof_off_t=0
7175 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007177
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007178fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7180$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007181
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007182
7183
Martin v. Löwis11437992002-04-12 09:54:03 +00007184cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007185#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007186_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007187
Michael W. Hudson54241132001-12-07 15:38:26 +00007188
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007189
Matthias Kloseb9621712010-04-24 17:59:49 +00007190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7191$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007192if test "$have_long_long" = yes
7193then
7194if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007195 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007196
Matthias Kloseb9621712010-04-24 17:59:49 +00007197$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007198
Matthias Kloseb9621712010-04-24 17:59:49 +00007199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7200$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007201else
Matthias Kloseb9621712010-04-24 17:59:49 +00007202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7203$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007204fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007205else
Matthias Kloseb9621712010-04-24 17:59:49 +00007206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7207$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007208fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007209
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007210# The cast to long int works around a bug in the HP C Compiler
7211# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7212# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7213# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7215$as_echo_n "checking size of time_t... " >&6; }
7216if test "${ac_cv_sizeof_time_t+set}" = set; then :
7217 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007218else
Matthias Kloseb9621712010-04-24 17:59:49 +00007219 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007220#ifdef HAVE_SYS_TYPES_H
7221#include <sys/types.h>
7222#endif
7223#ifdef HAVE_TIME_H
7224#include <time.h>
7225#endif
7226
Matthias Kloseb9621712010-04-24 17:59:49 +00007227"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007228
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007229else
Matthias Kloseb9621712010-04-24 17:59:49 +00007230 if test "$ac_cv_type_time_t" = yes; then
7231 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7232$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00007233as_fn_error 77 "cannot compute sizeof (time_t)
7234See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007235 else
7236 ac_cv_sizeof_time_t=0
7237 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007239
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007240fi
Matthias Kloseb9621712010-04-24 17:59:49 +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 Vassalottib0a61d72009-07-17 23:19:37 +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
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007261
Matthias Kloseb9621712010-04-24 17:59:49 +00007262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7263$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007264have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007266/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007267
7268 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007269int
7270main ()
7271{
Guido van Rossum12580492000-09-24 16:47:19 +00007272pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007273 ;
7274 return 0;
7275}
Matthias Kloseb159a552010-04-25 21:00:44 +00007276
Martin v. Löwis11437992002-04-12 09:54:03 +00007277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007278if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007279 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7283$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007284if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007285 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007286# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7287# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7288# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7290$as_echo_n "checking size of pthread_t... " >&6; }
7291if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7292 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007293else
Matthias Kloseb9621712010-04-24 17:59:49 +00007294 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007295#ifdef HAVE_PTHREAD_H
7296#include <pthread.h>
7297#endif
7298
Matthias Kloseb9621712010-04-24 17:59:49 +00007299"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007300
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007301else
Matthias Kloseb9621712010-04-24 17:59:49 +00007302 if test "$ac_cv_type_pthread_t" = yes; then
7303 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7304$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00007305as_fn_error 77 "cannot compute sizeof (pthread_t)
7306See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007307 else
7308 ac_cv_sizeof_pthread_t=0
7309 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007310fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007311
Trent Mick635f6fb2000-08-23 21:33:05 +00007312fi
Matthias Kloseb9621712010-04-24 17:59:49 +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 Vassalottib0a61d72009-07-17 23:19:37 +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 Vassalottib0a61d72009-07-17 23:19:37 +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
Michael W. Hudson54241132001-12-07 15:38:26 +00007326
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007327case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007328 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007329 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7330 ;;
7331 Darwin/*)
7332 OTHER_LIBTOOL_OPT=""
7333 ;;
7334esac
7335
7336
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007337ARCH_RUN_32BIT=""
7338
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007339case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007340 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007341 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7342 if test "${enable_universalsdk}"; then
7343 :
7344 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007345 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007346 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007347 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007348 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007349 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007350 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007351 if test ${gcc_version} '<' 4.0
7352 then
7353 LIBTOOL_CRUFT="-lcc_dynamic"
7354 else
7355 LIBTOOL_CRUFT=""
7356 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007357 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007358 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007359else
Matthias Kloseb9621712010-04-24 17:59:49 +00007360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007361/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007362
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007363 #include <unistd.h>
7364 int main(int argc, char*argv[])
7365 {
7366 if (sizeof(long) == 4) {
7367 return 0;
7368 } else {
7369 return 1;
7370 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007371 }
7372
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007374if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007375 ac_osx_32bit=yes
7376else
Matthias Kloseb9621712010-04-24 17:59:49 +00007377 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007379rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7380 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007381fi
7382
7383
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007384 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007385 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007386 i386)
7387 MACOSX_DEFAULT_ARCH="i386"
7388 ;;
7389 ppc)
7390 MACOSX_DEFAULT_ARCH="ppc"
7391 ;;
7392 *)
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00007393 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007394 ;;
7395 esac
7396 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007397 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007398 i386)
7399 MACOSX_DEFAULT_ARCH="x86_64"
7400 ;;
7401 ppc)
7402 MACOSX_DEFAULT_ARCH="ppc64"
7403 ;;
7404 *)
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00007405 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007406 ;;
7407 esac
7408
7409 #ARCH_RUN_32BIT="true"
7410 fi
7411
7412 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007413 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007414 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007415esac
7416
Matthias Kloseb9621712010-04-24 17:59:49 +00007417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7418$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007419if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007420then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007421 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007422 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007423 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007424
Matthias Kloseb9621712010-04-24 17:59:49 +00007425$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007426
Matthias Kloseb9621712010-04-24 17:59:49 +00007427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7428$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007429 if test $enable_shared = "yes"
7430 then
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00007431 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00007432 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007433else
Matthias Kloseb9621712010-04-24 17:59:49 +00007434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7435$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007436fi
7437
Matthias Kloseb9621712010-04-24 17:59:49 +00007438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7439$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007440case $ac_sys_system/$ac_sys_release in
7441 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007442
Matthias Kloseb9621712010-04-24 17:59:49 +00007443$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007444
Matthias Kloseb9621712010-04-24 17:59:49 +00007445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7446$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007447 ;;
7448 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7450$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007451 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007452esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007453
Guido van Rossum0a516c91994-09-12 10:58:40 +00007454# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007455
Michael W. Hudson54241132001-12-07 15:38:26 +00007456
7457
7458
7459
Benjamin Peterson99f03762010-04-11 22:15:28 +00007460
Thomas Wouters477c8d52006-05-27 19:21:47 +00007461
Georg Brandlb1441c72009-01-03 22:33:39 +00007462
Thomas Wouters477c8d52006-05-27 19:21:47 +00007463cat >>confdefs.h <<_ACEOF
7464#define SHLIB_EXT "$SO"
7465_ACEOF
7466
Guido van Rossum0a516c91994-09-12 10:58:40 +00007467# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007468# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007469# (Shared libraries in this instance are shared modules to be loaded into
7470# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7472$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007473if test -z "$LDSHARED"
7474then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007475 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007476 AIX*)
7477 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007478 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007479 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007480 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007481 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007482 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007483 if test "$GCC" = "yes" ; then
7484 LDSHARED='$(CC) -shared'
7485 LDCXXSHARED='$(CXX) -shared'
7486 else
7487 LDSHARED='$(CC) -G'
7488 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007489 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007490 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007491 if test "$GCC" = "yes" ; then
7492 LDSHARED='$(CC) -shared'
7493 LDCXXSHARED='$(CXX) -shared'
7494 else
7495 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007496 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007497 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007498 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00007499 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007500 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007501 if test "$enable_framework" ; then
7502 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007503 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7504 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007505 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007506 else
7507 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007508 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007509 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007510 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007511 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00007512 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007513 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007514 if test "$enable_framework" ; then
7515 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007516 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7517 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007518 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007519 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007520 # No framework, use the Python app as bundle-loader
7521 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007522 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007523 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007524 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007525 Darwin/*)
7526 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7527 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007528
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007529 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007530 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007531 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007532 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007533 fi
Jack Jansen6b08a402004-06-03 12:41:45 +00007534 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007535 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007536 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007537 else
7538 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007539 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007540 if test "$enable_framework" ; then
7541 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007542 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7543 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007544 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007545 else
7546 # No framework, use the Python app as bundle-loader
7547 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7548 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007549 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007550 fi
7551 fi
7552 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007553 Linux*|GNU*|QNX*)
7554 LDSHARED='$(CC) -shared'
7555 LDCXXSHARED='$(CXX) -shared';;
7556 BSD/OS*/4*)
7557 LDSHARED="gcc -shared"
7558 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007559 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007560 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007561 then
Benjamin Petersonab0a7522010-03-14 15:18:25 +00007562 LDSHARED='$(CC) -shared ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007563 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007564 else
7565 LDSHARED="ld -Bshareable ${LDFLAGS}"
7566 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007567 OpenBSD*)
7568 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7569 then
7570 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007571 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007572 else
7573 case `uname -r` in
7574 [01].* | 2.[0-7] | 2.[0-7].*)
7575 LDSHARED="ld -Bshareable ${LDFLAGS}"
7576 ;;
7577 *)
7578 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007579 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007580 ;;
7581 esac
7582 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007583 NetBSD*|DragonFly*)
7584 LDSHARED="cc -shared ${LDFLAGS}"
7585 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007586 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007587 if test "$GCC" = "yes" ; then
7588 LDSHARED='$(CC) -shared'
7589 LDCXXSHARED='$(CXX) -shared'
7590 else
7591 LDSHARED='$(CC) -G'
7592 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007593 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007594 SCO_SV*)
7595 LDSHARED='$(CC) -Wl,-G,-Bexport'
7596 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7597 CYGWIN*)
7598 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7599 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007600 *) LDSHARED="ld";;
7601 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7604$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007605LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007606BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007607# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007608# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7610$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007611if test -z "$CCSHARED"
7612then
Guido van Rossum07397971997-04-29 21:49:50 +00007613 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007614 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007615 then CCSHARED="-fPIC";
7616 elif test `uname -p` = sparc;
7617 then CCSHARED="-xcode=pic32";
7618 else CCSHARED="-Kpic";
7619 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007620 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007621 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007622 else CCSHARED="+z";
7623 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007624 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007625 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007626 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007627 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007628 if test "$GCC" = "yes"
7629 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007630 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007631 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007632 SCO_SV*)
7633 if test "$GCC" = "yes"
7634 then CCSHARED="-fPIC"
7635 else CCSHARED="-Kpic -belf"
7636 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007637 IRIX*/6*) case $CC in
7638 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007639 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007640 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007641 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7644$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007645# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007646# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7648$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007649if test -z "$LINKFORSHARED"
7650then
Guido van Rossum07397971997-04-29 21:49:50 +00007651 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007652 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007653 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007654 LINKFORSHARED="-Wl,-E -Wl,+s";;
7655# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007656 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007657 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007658 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007659 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007660 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007661 if test "$enable_framework"
7662 then
Jack Jansenda49e192005-01-07 13:08:22 +00007663 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007664 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007665 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007666 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007667 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007668 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007669 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007670 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7671 then
7672 LINKFORSHARED="-Wl,--export-dynamic"
7673 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007674 SunOS/5*) case $CC in
7675 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007676 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007677 then
7678 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007679 fi;;
7680 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007681 CYGWIN*)
7682 if test $enable_shared = "no"
7683 then
7684 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7685 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007686 QNX*)
7687 # -Wl,-E causes the symbols to be added to the dynamic
7688 # symbol table so that they can be found when a module
7689 # is loaded. -N 2048K causes the stack size to be set
7690 # to 2048 kilobytes so that the stack doesn't overflow
7691 # when running test_compile.py.
7692 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007693 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7696$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007697
Michael W. Hudson54241132001-12-07 15:38:26 +00007698
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007699
Matthias Kloseb9621712010-04-24 17:59:49 +00007700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7701$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007702if test ! "$LIBRARY" = "$LDLIBRARY"
7703then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007704 case $ac_sys_system in
7705 CYGWIN*)
7706 # Cygwin needs CCSHARED when building extension DLLs
7707 # but not when building the interpreter DLL.
7708 CFLAGSFORSHARED='';;
7709 *)
7710 CFLAGSFORSHARED='$(CCSHARED)'
7711 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7714$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007715
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007716# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7717# library (with --enable-shared).
7718# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007719# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7720# if it is not required, since it creates a dependency of the shared library
7721# to LIBS. This, in turn, means that applications linking the shared libpython
7722# don't need to link LIBS explicitly. The default should be only changed
7723# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007724
Matthias Kloseb9621712010-04-24 17:59:49 +00007725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7726$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007727case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007728 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007729 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007730esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7732$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007733
7734
Guido van Rossum627b2d71993-12-24 10:39:16 +00007735# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7737$as_echo_n "checking for dlopen in -ldl... " >&6; }
7738if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7739 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007740else
Martin v. Löwis11437992002-04-12 09:54:03 +00007741 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007742LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007745
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746/* Override any GCC internal prototype to avoid an error.
7747 Use char because int might match the return type of a GCC
7748 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007749#ifdef __cplusplus
7750extern "C"
7751#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007752char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007753int
7754main ()
7755{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007756return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007757 ;
7758 return 0;
7759}
7760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007761if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007762 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007763else
Matthias Kloseb9621712010-04-24 17:59:49 +00007764 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007766rm -f core conftest.err conftest.$ac_objext \
7767 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007768LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7771$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7772if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007773 cat >>confdefs.h <<_ACEOF
7774#define HAVE_LIBDL 1
7775_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007776
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007777 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007778
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007779fi
7780 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7782$as_echo_n "checking for shl_load in -ldld... " >&6; }
7783if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7784 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007785else
Martin v. Löwis11437992002-04-12 09:54:03 +00007786 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007787LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007791/* Override any GCC internal prototype to avoid an error.
7792 Use char because int might match the return type of a GCC
7793 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007794#ifdef __cplusplus
7795extern "C"
7796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007797char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007798int
7799main ()
7800{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007801return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007802 ;
7803 return 0;
7804}
7805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007806if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007807 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007808else
Matthias Kloseb9621712010-04-24 17:59:49 +00007809 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007811rm -f core conftest.err conftest.$ac_objext \
7812 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007813LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7816$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7817if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007818 cat >>confdefs.h <<_ACEOF
7819#define HAVE_LIBDLD 1
7820_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007821
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007822 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007823
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007824fi
7825 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007826
Georg Brandlb1441c72009-01-03 22:33:39 +00007827# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007828if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7830$as_echo_n "checking for library containing sem_init... " >&6; }
7831if test "${ac_cv_search_sem_init+set}" = set; then :
7832 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007833else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007834 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838/* Override any GCC internal prototype to avoid an error.
7839 Use char because int might match the return type of a GCC
7840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007841#ifdef __cplusplus
7842extern "C"
7843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007844char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007845int
7846main ()
7847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007848return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007849 ;
7850 return 0;
7851}
7852_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007853for ac_lib in '' pthread rt posix4; do
7854 if test -z "$ac_lib"; then
7855 ac_res="none required"
7856 else
7857 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007858 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007860 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007863rm -f core conftest.err conftest.$ac_objext \
7864 conftest$ac_exeext
7865 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007866 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007868done
Matthias Kloseb9621712010-04-24 17:59:49 +00007869if test "${ac_cv_search_sem_init+set}" = set; then :
7870
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007871else
7872 ac_cv_search_sem_init=no
7873fi
7874rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007875LIBS=$ac_func_search_save_LIBS
7876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7878$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007879ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007880if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007882
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007883fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007884 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007885 # posix4 on Solaris 2.6
7886 # pthread (first!) on Linux
7887fi
7888
Martin v. Löwis19d17342003-06-14 21:03:05 +00007889# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7891$as_echo_n "checking for textdomain in -lintl... " >&6; }
7892if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7893 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007894else
7895 ac_check_lib_save_LIBS=$LIBS
7896LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007898/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007900/* Override any GCC internal prototype to avoid an error.
7901 Use char because int might match the return type of a GCC
7902 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007903#ifdef __cplusplus
7904extern "C"
7905#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007906char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007907int
7908main ()
7909{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007910return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007911 ;
7912 return 0;
7913}
7914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007915if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007916 ac_cv_lib_intl_textdomain=yes
7917else
Matthias Kloseb9621712010-04-24 17:59:49 +00007918 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007920rm -f core conftest.err conftest.$ac_objext \
7921 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007922LIBS=$ac_check_lib_save_LIBS
7923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7925$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7926if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007927
Matthias Kloseb9621712010-04-24 17:59:49 +00007928$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007929
Brett Cannonc6d936e2009-06-07 20:09:53 +00007930 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007931fi
7932
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007933
7934# checks for system dependent C++ extensions support
7935case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007936 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7937$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007939/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007940
7941 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007942int
7943main ()
7944{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007945loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007946 ;
7947 return 0;
7948}
Matthias Kloseb159a552010-04-25 21:00:44 +00007949
Martin v. Löwis11437992002-04-12 09:54:03 +00007950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007951if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007952
Matthias Kloseb159a552010-04-25 21:00:44 +00007953
Matthias Kloseb9621712010-04-24 17:59:49 +00007954$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007955
Matthias Kloseb159a552010-04-25 21:00:44 +00007956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007957$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007958
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007959else
Matthias Kloseb159a552010-04-25 21:00:44 +00007960
7961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007962$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007963
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007965rm -f core conftest.err conftest.$ac_objext \
7966 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007967 *) ;;
7968esac
7969
Guido van Rossum70c7f481998-03-26 18:44:10 +00007970# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7972$as_echo_n "checking for t_open in -lnsl... " >&6; }
7973if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7974 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007975else
Martin v. Löwis11437992002-04-12 09:54:03 +00007976 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007977LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007979/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007980
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981/* Override any GCC internal prototype to avoid an error.
7982 Use char because int might match the return type of a GCC
7983 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007984#ifdef __cplusplus
7985extern "C"
7986#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007987char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007988int
7989main ()
7990{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007992 ;
7993 return 0;
7994}
7995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007996if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007998else
Matthias Kloseb9621712010-04-24 17:59:49 +00007999 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008001rm -f core conftest.err conftest.$ac_objext \
8002 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008003LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8006$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
8007if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008008 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008009fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008010 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8012$as_echo_n "checking for socket in -lsocket... " >&6; }
8013if test "${ac_cv_lib_socket_socket+set}" = set; then :
8014 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008015else
Martin v. Löwis11437992002-04-12 09:54:03 +00008016 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008017LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021/* Override any GCC internal prototype to avoid an error.
8022 Use char because int might match the return type of a GCC
8023 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008024#ifdef __cplusplus
8025extern "C"
8026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008027char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008028int
8029main ()
8030{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008032 ;
8033 return 0;
8034}
8035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008036if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008037 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008038else
Matthias Kloseb9621712010-04-24 17:59:49 +00008039 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008041rm -f core conftest.err conftest.$ac_objext \
8042 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008043LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8046$as_echo "$ac_cv_lib_socket_socket" >&6; }
8047if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008048 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008049fi
8050 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008051
Matthias Kloseb9621712010-04-24 17:59:49 +00008052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8053$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008055# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008056if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008057 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8059$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008060LIBS="$withval $LIBS"
8061
8062else
Matthias Kloseb9621712010-04-24 17:59:49 +00008063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8064$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008065fi
8066
Guido van Rossum7f43da71994-08-01 12:15:30 +00008067
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008068if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008069 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8070set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8072$as_echo_n "checking for $ac_word... " >&6; }
8073if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8074 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008075else
8076 case $PKG_CONFIG in
8077 [\\/]* | ?:[\\/]*)
8078 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8079 ;;
8080 *)
8081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8082for as_dir in $PATH
8083do
8084 IFS=$as_save_IFS
8085 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008087 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8088 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008090 break 2
8091 fi
8092done
Matthias Kloseb9621712010-04-24 17:59:49 +00008093 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008094IFS=$as_save_IFS
8095
8096 ;;
8097esac
8098fi
8099PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8100if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8102$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008103else
Matthias Kloseb9621712010-04-24 17:59:49 +00008104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8105$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008106fi
8107
8108
8109fi
8110if test -z "$ac_cv_path_PKG_CONFIG"; then
8111 ac_pt_PKG_CONFIG=$PKG_CONFIG
8112 # Extract the first word of "pkg-config", so it can be a program name with args.
8113set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8115$as_echo_n "checking for $ac_word... " >&6; }
8116if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8117 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008118else
8119 case $ac_pt_PKG_CONFIG in
8120 [\\/]* | ?:[\\/]*)
8121 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8122 ;;
8123 *)
8124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8125for as_dir in $PATH
8126do
8127 IFS=$as_save_IFS
8128 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008129 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008130 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8131 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008133 break 2
8134 fi
8135done
Matthias Kloseb9621712010-04-24 17:59:49 +00008136 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008137IFS=$as_save_IFS
8138
8139 ;;
8140esac
8141fi
8142ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8143if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8145$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008146else
Matthias Kloseb9621712010-04-24 17:59:49 +00008147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8148$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008149fi
8150
8151 if test "x$ac_pt_PKG_CONFIG" = x; then
8152 PKG_CONFIG=""
8153 else
8154 case $cross_compiling:$ac_tool_warned in
8155yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008156{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8157$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008158ac_tool_warned=yes ;;
8159esac
8160 PKG_CONFIG=$ac_pt_PKG_CONFIG
8161 fi
8162else
8163 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8164fi
8165
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008166
8167# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8169$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008170
8171# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008172if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008173 withval=$with_system_expat;
8174fi
8175
8176
Matthias Kloseb9621712010-04-24 17:59:49 +00008177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8178$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008179
8180# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8182$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008183
8184# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008185if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008186 withval=$with_system_ffi;
8187fi
8188
8189
8190if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008191 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8192else
8193 LIBFFI_INCLUDEDIR=""
8194fi
8195
8196
Matthias Kloseb9621712010-04-24 17:59:49 +00008197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8198$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008199
Matthias Klose55708cc2009-04-30 08:06:49 +00008200# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8202$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008203
8204# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008205if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008206 withval=$with_dbmliborder;
8207if test x$with_dbmliborder = xyes
8208then
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00008209as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008210else
8211 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8212 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8213 then
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00008214 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008215 fi
8216 done
8217fi
8218fi
8219
Matthias Kloseb9621712010-04-24 17:59:49 +00008220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8221$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008222
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008223# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008224
8225
Matthias Kloseb9621712010-04-24 17:59:49 +00008226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8227$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008229# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008230if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008231 withval=$with_signal_module;
8232fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008233
8234
8235if test -z "$with_signal_module"
8236then with_signal_module="yes"
8237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8239$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008240
8241if test "${with_signal_module}" = "yes"; then
8242 USE_SIGNAL_MODULE=""
8243 SIGNAL_OBJS=""
8244else
8245 USE_SIGNAL_MODULE="#"
8246 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8247fi
8248
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008249# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008250
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008251USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008252
Matthias Kloseb9621712010-04-24 17:59:49 +00008253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8254$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008255
Guido van Rossumec2f0731997-01-22 20:54:01 +00008256
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008257# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008258if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008259 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8261$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008262LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008263if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008264 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008265fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008266else
Matthias Kloseb9621712010-04-24 17:59:49 +00008267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8268$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008269fi
8270
Martin v. Löwis11437992002-04-12 09:54:03 +00008271
8272# Templates for things AC_DEFINEd more than once.
8273# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008274
8275
Martin v. Löwis11437992002-04-12 09:54:03 +00008276
8277
Matthias Kloseb9621712010-04-24 17:59:49 +00008278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8279$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008280
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008281# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008282if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008283 withval=$with_threads;
8284fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008285
8286
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008287# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008288
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008289# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008290if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008291 withval=$with_thread; with_threads=$with_thread
8292fi
8293
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008294
8295if test -z "$with_threads"
8296then with_threads="yes"
8297fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8299$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008300
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008301
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008302if test "$with_threads" = "no"
8303then
8304 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008305elif test "$ac_cv_pthread_is_default" = yes
8306then
Matthias Kloseb9621712010-04-24 17:59:49 +00008307 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008308
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008309 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008310 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008311
8312 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008313 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008314elif test "$ac_cv_kpthread" = "yes"
8315then
8316 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008317 if test "$ac_cv_cxx_thread" = "yes"; then
8318 CXX="$CXX -Kpthread"
8319 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008320 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008321
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008322 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008323 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008324elif test "$ac_cv_kthread" = "yes"
8325then
8326 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008327 if test "$ac_cv_cxx_thread" = "yes"; then
8328 CXX="$CXX -Kthread"
8329 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008330 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008331
8332 posix_threads=yes
8333 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008334elif test "$ac_cv_pthread" = "yes"
8335then
8336 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008337 if test "$ac_cv_cxx_thread" = "yes"; then
8338 CXX="$CXX -pthread"
8339 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008340 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008341
8342 posix_threads=yes
8343 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008344else
8345 if test ! -z "$with_threads" -a -d "$with_threads"
8346 then LDFLAGS="$LDFLAGS -L$with_threads"
8347 fi
8348 if test ! -z "$withval" -a -d "$withval"
8349 then LDFLAGS="$LDFLAGS -L$withval"
8350 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008351
8352 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008353 # define _POSIX_THREADS in unistd.h. Some apparently don't
8354 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8356$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008358/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008359
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008360#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008361#ifdef _POSIX_THREADS
8362yes
8363#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008364
8365_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008366if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008368 unistd_defines_pthreads=yes
8369else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008370 unistd_defines_pthreads=no
8371fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008372rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008373
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8375$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008376
Matthias Kloseb9621712010-04-24 17:59:49 +00008377 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008378
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8380if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8381 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008382
Matthias Kloseb9621712010-04-24 17:59:49 +00008383 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008384
Martin v. Löwis11437992002-04-12 09:54:03 +00008385
Matthias Kloseb9621712010-04-24 17:59:49 +00008386$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008387
8388 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008389 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008390else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008391
Matthias Kloseb9621712010-04-24 17:59:49 +00008392 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8393if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8394 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008395
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008397
Martin v. Löwis11437992002-04-12 09:54:03 +00008398
Matthias Kloseb9621712010-04-24 17:59:49 +00008399$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008400
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008401 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008402else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008403
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008404 # Just looking for pthread_create in libpthread is not enough:
8405 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8406 # So we really have to include pthread.h, and then link.
8407 _libs=$LIBS
8408 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8410$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008412/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008413#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008414
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008415void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008416int
8417main ()
8418{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008419
8420pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008421 ;
8422 return 0;
8423}
8424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008425if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008426
Matthias Kloseb9621712010-04-24 17:59:49 +00008427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8428$as_echo "yes" >&6; }
8429 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008430
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008431 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008432 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008433else
Martin v. Löwis11437992002-04-12 09:54:03 +00008434
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008435 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008436 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8437if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8438 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008439
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008440 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008441 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008442else
Guido van Rossumad678af1998-10-02 14:42:15 +00008443
Matthias Kloseb9621712010-04-24 17:59:49 +00008444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8445$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8446if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8447 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008448else
Martin v. Löwis11437992002-04-12 09:54:03 +00008449 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008450LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008454/* Override any GCC internal prototype to avoid an error.
8455 Use char because int might match the return type of a GCC
8456 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008457#ifdef __cplusplus
8458extern "C"
8459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008460char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008461int
8462main ()
8463{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008464return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008465 ;
8466 return 0;
8467}
8468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008469if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008471else
Matthias Kloseb9621712010-04-24 17:59:49 +00008472 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008474rm -f core conftest.err conftest.$ac_objext \
8475 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008476LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8479$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8480if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8481 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008482
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008483 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008484 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008485 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008486else
Greg Steinadf63d62000-07-05 10:38:09 +00008487
Matthias Kloseb9621712010-04-24 17:59:49 +00008488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8489$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8490if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8491 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008492else
Martin v. Löwis11437992002-04-12 09:54:03 +00008493 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008494LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008497
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008498/* Override any GCC internal prototype to avoid an error.
8499 Use char because int might match the return type of a GCC
8500 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008501#ifdef __cplusplus
8502extern "C"
8503#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008504char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008505int
8506main ()
8507{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008508return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008509 ;
8510 return 0;
8511}
8512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008513if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008515else
Matthias Kloseb9621712010-04-24 17:59:49 +00008516 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008518rm -f core conftest.err conftest.$ac_objext \
8519 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008520LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8523$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8524if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8525 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008526
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008527 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008528 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008529 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008530else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008531
Matthias Kloseb9621712010-04-24 17:59:49 +00008532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8533$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8534if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8535 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008536else
Martin v. Löwis11437992002-04-12 09:54:03 +00008537 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008538LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008540/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008541
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008542/* Override any GCC internal prototype to avoid an error.
8543 Use char because int might match the return type of a GCC
8544 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008545#ifdef __cplusplus
8546extern "C"
8547#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008548char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008549int
8550main ()
8551{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008552return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008553 ;
8554 return 0;
8555}
8556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008557if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008558 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008559else
Matthias Kloseb9621712010-04-24 17:59:49 +00008560 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008562rm -f core conftest.err conftest.$ac_objext \
8563 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008564LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8567$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8568if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8569 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008570
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008571 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008572 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008573 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008574else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008575
Matthias Kloseb9621712010-04-24 17:59:49 +00008576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8577$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8578if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8579 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008580else
Martin v. Löwis11437992002-04-12 09:54:03 +00008581 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008582LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008584/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008585
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008586/* Override any GCC internal prototype to avoid an error.
8587 Use char because int might match the return type of a GCC
8588 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008589#ifdef __cplusplus
8590extern "C"
8591#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008592char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008593int
8594main ()
8595{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008597 ;
8598 return 0;
8599}
8600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008601if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008602 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008603else
Matthias Kloseb9621712010-04-24 17:59:49 +00008604 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008605fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008606rm -f core conftest.err conftest.$ac_objext \
8607 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008608LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8611$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8612if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8613 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008614
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008615 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008616 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008617 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008618else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008619
Martin v. Löwis130fb172001-07-19 11:00:41 +00008620 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008621fi
8622
Guido van Rossum627b2d71993-12-24 10:39:16 +00008623
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008624fi
8625
Guido van Rossum0be3e491997-05-22 20:33:33 +00008626fi
8627
Guido van Rossum49545951997-12-02 19:28:29 +00008628fi
8629
Guido van Rossumb93a8621998-05-07 13:27:32 +00008630fi
8631
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008633rm -f core conftest.err conftest.$ac_objext \
8634 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635fi
8636
Martin v. Löwis11437992002-04-12 09:54:03 +00008637
8638fi
8639
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008640
Michael W. Hudson54241132001-12-07 15:38:26 +00008641
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8643$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8644if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8645 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008646else
Martin v. Löwis11437992002-04-12 09:54:03 +00008647 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008648LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008651
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008652/* Override any GCC internal prototype to avoid an error.
8653 Use char because int might match the return type of a GCC
8654 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008655#ifdef __cplusplus
8656extern "C"
8657#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008658char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008659int
8660main ()
8661{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008662return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008663 ;
8664 return 0;
8665}
8666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008667if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008668 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008669else
Matthias Kloseb9621712010-04-24 17:59:49 +00008670 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008672rm -f core conftest.err conftest.$ac_objext \
8673 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008674LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8677$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8678if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8679 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008680
Martin v. Löwis130fb172001-07-19 11:00:41 +00008681 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008682 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008683 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008684fi
8685
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008686
Neal Norwitza978ab02002-11-02 16:58:05 +00008687 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8689$as_echo_n "checking for thr_create in -lthread... " >&6; }
8690if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8691 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008692else
Martin v. Löwis11437992002-04-12 09:54:03 +00008693 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008694LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008696/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008698/* Override any GCC internal prototype to avoid an error.
8699 Use char because int might match the return type of a GCC
8700 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008701#ifdef __cplusplus
8702extern "C"
8703#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008704char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008705int
8706main ()
8707{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008708return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 ;
8710 return 0;
8711}
8712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008713if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008714 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008715else
Matthias Kloseb9621712010-04-24 17:59:49 +00008716 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008718rm -f core conftest.err conftest.$ac_objext \
8719 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008720LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8723$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8724if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8725 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008726
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008727 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008728 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008729 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008730fi
8731
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008732 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008733
Martin v. Löwis130fb172001-07-19 11:00:41 +00008734 if test "$USE_THREAD_MODULE" != "#"
8735 then
8736 # If the above checks didn't disable threads, (at least) OSF1
8737 # needs this '-threads' argument during linking.
8738 case $ac_sys_system in
8739 OSF1) LDLAST=-threads;;
8740 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008741 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008742fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008743
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008744if test "$posix_threads" = "yes"; then
8745 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008746
Matthias Kloseb9621712010-04-24 17:59:49 +00008747$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008748
8749 fi
8750
8751 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8752 case $ac_sys_system/$ac_sys_release in
8753 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008754$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008755
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008756 ;;
8757 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008758$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008759
8760 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008761 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008762$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008763
8764 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008765 AIX/6)
8766$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8767
8768 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008769 esac
8770
Matthias Kloseb9621712010-04-24 17:59:49 +00008771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8772$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8773 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8774 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008775else
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008777 ac_cv_pthread_system_supported=no
8778else
Matthias Kloseb9621712010-04-24 17:59:49 +00008779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008780/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008781#include <pthread.h>
8782 void *foo(void *parm) {
8783 return NULL;
8784 }
8785 main() {
8786 pthread_attr_t attr;
8787 pthread_t id;
8788 if (pthread_attr_init(&attr)) exit(-1);
8789 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8790 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8791 exit(0);
8792 }
8793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008794if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008795 ac_cv_pthread_system_supported=yes
8796else
Matthias Kloseb9621712010-04-24 17:59:49 +00008797 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8800 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008801fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008802
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008803
Guido van Rossum627b2d71993-12-24 10:39:16 +00008804fi
8805
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8807$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008808 if test "$ac_cv_pthread_system_supported" = "yes"; then
8809
Matthias Kloseb9621712010-04-24 17:59:49 +00008810$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008811
8812 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 for ac_func in pthread_sigmask
8814do :
8815 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8816if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008817 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008818#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008819_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008820 case $ac_sys_system in
8821 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008822
Matthias Kloseb9621712010-04-24 17:59:49 +00008823$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008824
8825 ;;
8826 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008827fi
8828done
8829
8830fi
8831
8832
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008833# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008834
Matthias Kloseb9621712010-04-24 17:59:49 +00008835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8836$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008837# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008838if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008839 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008840 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8842$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008843 ipv6=no
8844 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008845 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8846$as_echo "yes" >&6; }
8847 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008848
8849 ipv6=yes
8850 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008852else
Martin v. Löwis11437992002-04-12 09:54:03 +00008853
Matthias Kloseb9621712010-04-24 17:59:49 +00008854 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008855
Matthias Kloseb9621712010-04-24 17:59:49 +00008856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8857$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008858 ipv6=no
8859
8860else
Matthias Kloseb9621712010-04-24 17:59:49 +00008861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008862/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008863 /* AF_INET6 available check */
8864#include <sys/types.h>
8865#include <sys/socket.h>
8866main()
8867{
8868 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8869 exit(1);
8870 else
8871 exit(0);
8872}
8873
Martin v. Löwis11437992002-04-12 09:54:03 +00008874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008875if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008876
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8878$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008879 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008880
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008881else
Matthias Kloseb159a552010-04-25 21:00:44 +00008882
Matthias Kloseb9621712010-04-24 17:59:49 +00008883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8884$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008885 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008886
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8889 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008890fi
8891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008892
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008893if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8895$as_echo_n "checking if RFC2553 API is available... " >&6; }
8896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008897/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008898
8899 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008900#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008901int
8902main ()
8903{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008904struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008905 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008906 ;
8907 return 0;
8908}
Matthias Kloseb159a552010-04-25 21:00:44 +00008909
Martin v. Löwis11437992002-04-12 09:54:03 +00008910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008911if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008912
8913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008914$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008915 ipv6=yes
8916
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008917else
Matthias Kloseb159a552010-04-25 21:00:44 +00008918
8919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008920$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008921 ipv6=no
8922
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008925fi
8926
8927if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008928 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008929
8930fi
8931
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008932fi
8933
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008934
8935ipv6type=unknown
8936ipv6lib=none
8937ipv6trylibc=no
8938
8939if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8941$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008942 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8943 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008944 case $i in
8945 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008947/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008948
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008949#include <netinet/in.h>
8950#ifdef IPV6_INRIA_VERSION
8951yes
8952#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008953_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008955 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008956 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008957fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008958rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008959
8960 ;;
8961 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008963/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008964
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008965#include <netinet/in.h>
8966#ifdef __KAME__
8967yes
8968#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008969_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008970if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008971 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008972 ipv6type=$i;
8973 ipv6lib=inet6
8974 ipv6libdir=/usr/local/v6/lib
8975 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008976fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008977rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008978
8979 ;;
8980 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008982/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008983
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008984#include <features.h>
8985#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8986yes
8987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008988_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008990 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008991 ipv6type=$i;
8992 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008993fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008994rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008995
8996 ;;
8997 linux-inet6)
8998 if test -d /usr/inet6; then
8999 ipv6type=$i
9000 ipv6lib=inet6
9001 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009002 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003 fi
9004 ;;
9005 solaris)
9006 if test -f /etc/netconfig; then
9007 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
9008 ipv6type=$i
9009 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009010 fi
9011 fi
9012 ;;
9013 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009015/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009016
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009017#include <sys/param.h>
9018#ifdef _TOSHIBA_INET6
9019yes
9020#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009021_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009023 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009024 ipv6type=$i;
9025 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009026 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009027fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009028rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009029
9030 ;;
9031 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009033/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009034
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009035#include </usr/local/v6/include/sys/v6config.h>
9036#ifdef __V6D__
9037yes
9038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009039_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009040if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009041 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009042 ipv6type=$i;
9043 ipv6lib=v6;
9044 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009045 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009046fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009047rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009048
9049 ;;
9050 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009052/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009053
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009054#include <sys/param.h>
9055#ifdef _ZETA_MINAMI_INET6
9056yes
9057#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009058_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009059if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009060 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009061 ipv6type=$i;
9062 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009063 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009064fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009065rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066
9067 ;;
9068 esac
9069 if test "$ipv6type" != "unknown"; then
9070 break
9071 fi
9072 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9074$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009075fi
9076
9077if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9078 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9079 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9080 echo "using lib$ipv6lib"
9081 else
9082 if test $ipv6trylibc = "yes"; then
9083 echo "using libc"
9084 else
9085 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9086 echo "You need to fetch lib$ipv6lib.a from appropriate"
9087 echo 'ipv6 kit and compile beforehand.'
9088 exit 1
9089 fi
9090 fi
9091fi
9092
Matthias Kloseb9621712010-04-24 17:59:49 +00009093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9094$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009096/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009097
9098 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009099int
9100main ()
9101{
9102FSIORefNum fRef = 0
9103 ;
9104 return 0;
9105}
Matthias Kloseb159a552010-04-25 21:00:44 +00009106
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009108if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009109
Matthias Kloseb159a552010-04-25 21:00:44 +00009110
Matthias Kloseb9621712010-04-24 17:59:49 +00009111$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009112
Matthias Kloseb9621712010-04-24 17:59:49 +00009113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9114$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009115
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009116else
Matthias Kloseb159a552010-04-25 21:00:44 +00009117
Matthias Kloseb9621712010-04-24 17:59:49 +00009118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9119$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009120
9121fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9123
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009124# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9126$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009127
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009128# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009129if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009130 withval=$with_doc_strings;
9131fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009132
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009133
9134if test -z "$with_doc_strings"
9135then with_doc_strings="yes"
9136fi
9137if test "$with_doc_strings" != "no"
9138then
9139
Matthias Kloseb9621712010-04-24 17:59:49 +00009140$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009141
9142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9144$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009145
Antoine Pitrou042b1282010-08-13 21:15:58 +00009146# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9148$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009149
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009150# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009151if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009152 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009153if test "$withval" != no
9154then
9155
Matthias Kloseb9621712010-04-24 17:59:49 +00009156$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009157
Matthias Kloseb9621712010-04-24 17:59:49 +00009158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9159$as_echo "yes" >&6; }
9160else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9161$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009162fi
9163else
Matthias Kloseb9621712010-04-24 17:59:49 +00009164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9165$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009166fi
9167
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009168
9169# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9171$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009172
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009173# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009174if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009175 withval=$with_pymalloc;
9176fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009177
Neil Schemenauera35c6882001-02-27 04:45:05 +00009178
Neil Schemenauer16c22972002-03-22 15:34:49 +00009179if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009180then
9181 with_pymalloc="yes"
9182 SOABI_QUALIFIERS="${SOABI_QUALIFIERS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009183fi
9184if test "$with_pymalloc" != "no"
9185then
Martin v. Löwis11437992002-04-12 09:54:03 +00009186
Matthias Kloseb9621712010-04-24 17:59:49 +00009187$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009188
9189fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9191$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009192
Benjamin Peterson05159c42009-12-03 03:01:27 +00009193# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9195$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009196
9197# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009198if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009199 withval=$with_valgrind;
9200else
9201 with_valgrind=no
9202fi
9203
Matthias Kloseb9621712010-04-24 17:59:49 +00009204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9205$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009206if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009207 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9208if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009209
Matthias Kloseb9621712010-04-24 17:59:49 +00009210$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009211
9212else
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009213 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009214
9215fi
9216
9217
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009218 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009219fi
9220
Barry Warsawef82cd72000-06-30 16:21:01 +00009221# Check for --with-wctype-functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9223$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009225# Check whether --with-wctype-functions was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009226if test "${with_wctype_functions+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009227 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009228if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009229then
9230
Matthias Kloseb9621712010-04-24 17:59:49 +00009231$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009232
Matthias Kloseb9621712010-04-24 17:59:49 +00009233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9234$as_echo "yes" >&6; }
9235else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9236$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009237fi
9238else
Matthias Kloseb9621712010-04-24 17:59:49 +00009239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9240$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009241fi
9242
Barry Warsawef82cd72000-06-30 16:21:01 +00009243
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009244# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009245
Guido van Rossum98935bf2001-09-05 19:13:16 +00009246DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009247
Guido van Rossume97ee181999-12-20 21:27:22 +00009248# the dlopen() function means we might want to use dynload_shlib.o. some
9249# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009250for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009251do :
9252 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9253if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009254 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009255#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009256_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009257
Guido van Rossume97ee181999-12-20 21:27:22 +00009258fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009259done
Guido van Rossume97ee181999-12-20 21:27:22 +00009260
Michael W. Hudson54241132001-12-07 15:38:26 +00009261
Guido van Rossume97ee181999-12-20 21:27:22 +00009262# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9263# loading of modules.
9264
Matthias Kloseb9621712010-04-24 17:59:49 +00009265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9266$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009267if test -z "$DYNLOADFILE"
9268then
9269 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009270 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9271 if test "$ac_cv_func_dlopen" = yes
9272 then DYNLOADFILE="dynload_shlib.o"
9273 else DYNLOADFILE="dynload_aix.o"
9274 fi
9275 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009276 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009277 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9278 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009279 *)
9280 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9281 # out any dynamic loading
9282 if test "$ac_cv_func_dlopen" = yes
9283 then DYNLOADFILE="dynload_shlib.o"
9284 else DYNLOADFILE="dynload_stub.o"
9285 fi
9286 ;;
9287 esac
9288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9290$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009291if test "$DYNLOADFILE" != "dynload_stub.o"
9292then
Martin v. Löwis11437992002-04-12 09:54:03 +00009293
Matthias Kloseb9621712010-04-24 17:59:49 +00009294$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009295
9296fi
9297
Neil Schemenauer4e425612001-06-19 15:44:15 +00009298# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9299
Michael W. Hudson54241132001-12-07 15:38:26 +00009300
Matthias Kloseb9621712010-04-24 17:59:49 +00009301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9302$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009303if test -z "$MACHDEP_OBJS"
9304then
Jack Jansene578a632001-08-15 01:27:14 +00009305 MACHDEP_OBJS=$extra_machdep_objs
9306else
9307 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009308fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9310$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009311
Guido van Rossum627b2d71993-12-24 10:39:16 +00009312# checks for library functions
Martin v. Löwis823725e2008-03-24 13:39:54 +00009313for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9314 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009315 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009316 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009317 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009318 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009319 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009320 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9321 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009322 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009323 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009324 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009325 truncate uname unsetenv utimes waitpid wait3 wait4 \
9326 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009327do :
9328 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9329ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009330if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009331 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009332#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009333_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009334
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009335fi
9336done
9337
Michael W. Hudson54241132001-12-07 15:38:26 +00009338
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009339# For some functions, having a definition is not sufficient, since
9340# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9342$as_echo_n "checking for chroot... " >&6; }
9343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009344/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009345#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009346int
9347main ()
9348{
9349void *x=chroot
9350 ;
9351 return 0;
9352}
9353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009354if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009355
Matthias Kloseb9621712010-04-24 17:59:49 +00009356$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009357
Matthias Kloseb159a552010-04-25 21:00:44 +00009358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009359$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009360else
Matthias Kloseb9621712010-04-24 17:59:49 +00009361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9362$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009363
9364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9367$as_echo_n "checking for link... " >&6; }
9368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009369/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009370#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009371int
9372main ()
9373{
9374void *x=link
9375 ;
9376 return 0;
9377}
9378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009379if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009380
Matthias Kloseb9621712010-04-24 17:59:49 +00009381$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009382
Matthias Kloseb159a552010-04-25 21:00:44 +00009383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009384$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009385else
Matthias Kloseb9621712010-04-24 17:59:49 +00009386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9387$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009388
9389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9392$as_echo_n "checking for symlink... " >&6; }
9393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009394/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009395#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009396int
9397main ()
9398{
9399void *x=symlink
9400 ;
9401 return 0;
9402}
9403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009404if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009405
Matthias Kloseb9621712010-04-24 17:59:49 +00009406$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009407
Matthias Kloseb159a552010-04-25 21:00:44 +00009408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009409$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009410else
Matthias Kloseb9621712010-04-24 17:59:49 +00009411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9412$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009413
9414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9417$as_echo_n "checking for fchdir... " >&6; }
9418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009419/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009420#include <unistd.h>
9421int
9422main ()
9423{
9424void *x=fchdir
9425 ;
9426 return 0;
9427}
9428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009429if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009430
Matthias Kloseb9621712010-04-24 17:59:49 +00009431$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009432
Matthias Kloseb159a552010-04-25 21:00:44 +00009433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009434$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009435else
Matthias Kloseb9621712010-04-24 17:59:49 +00009436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9437$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009438
9439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9442$as_echo_n "checking for fsync... " >&6; }
9443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009444/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009445#include <unistd.h>
9446int
9447main ()
9448{
9449void *x=fsync
9450 ;
9451 return 0;
9452}
9453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009454if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009455
Matthias Kloseb9621712010-04-24 17:59:49 +00009456$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009457
Matthias Kloseb159a552010-04-25 21:00:44 +00009458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009459$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009460else
Matthias Kloseb9621712010-04-24 17:59:49 +00009461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9462$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009463
9464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9467$as_echo_n "checking for fdatasync... " >&6; }
9468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009469/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009470#include <unistd.h>
9471int
9472main ()
9473{
9474void *x=fdatasync
9475 ;
9476 return 0;
9477}
9478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009479if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009480
Matthias Kloseb9621712010-04-24 17:59:49 +00009481$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009482
Matthias Kloseb159a552010-04-25 21:00:44 +00009483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009484$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009485else
Matthias Kloseb9621712010-04-24 17:59:49 +00009486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9487$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009488
9489fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9492$as_echo_n "checking for epoll... " >&6; }
9493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009494/* end confdefs.h. */
9495#include <sys/epoll.h>
9496int
9497main ()
9498{
9499void *x=epoll_create
9500 ;
9501 return 0;
9502}
9503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009504if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009505
Matthias Kloseb9621712010-04-24 17:59:49 +00009506$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009507
Matthias Kloseb159a552010-04-25 21:00:44 +00009508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009509$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009510else
Matthias Kloseb9621712010-04-24 17:59:49 +00009511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9512$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009513
9514fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9517$as_echo_n "checking for kqueue... " >&6; }
9518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009519/* end confdefs.h. */
9520
9521#include <sys/types.h>
9522#include <sys/event.h>
9523
9524int
9525main ()
9526{
9527int x=kqueue()
9528 ;
9529 return 0;
9530}
9531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009532if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009533
Matthias Kloseb9621712010-04-24 17:59:49 +00009534$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009535
Matthias Kloseb159a552010-04-25 21:00:44 +00009536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009537$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009538else
Matthias Kloseb9621712010-04-24 17:59:49 +00009539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9540$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009541
9542fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009544# On some systems (eg. FreeBSD 5), we would find a definition of the
9545# functions ctermid_r, setgroups in the library, but no prototype
9546# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9547# address to avoid compiler warnings and potential miscompilations
9548# because of the missing prototypes.
9549
Matthias Kloseb9621712010-04-24 17:59:49 +00009550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9551$as_echo_n "checking for ctermid_r... " >&6; }
9552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009553/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009554
Martin v. Löwisd5843682002-11-21 20:41:28 +00009555#include <stdio.h>
9556
Martin v. Löwisd5843682002-11-21 20:41:28 +00009557int
9558main ()
9559{
9560void* p = ctermid_r
9561 ;
9562 return 0;
9563}
9564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009565if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009566
Matthias Kloseb9621712010-04-24 17:59:49 +00009567$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009568
Matthias Kloseb159a552010-04-25 21:00:44 +00009569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009570$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009571else
Matthias Kloseb9621712010-04-24 17:59:49 +00009572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9573$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009574
9575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9577
Matthias Kloseb9621712010-04-24 17:59:49 +00009578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
9579$as_echo_n "checking for flock... " >&6; }
9580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009581/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009582
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009583#include <sys/file.h>
9584
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009585int
9586main ()
9587{
9588void* p = flock
9589 ;
9590 return 0;
9591}
9592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009593if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009594
Matthias Kloseb9621712010-04-24 17:59:49 +00009595$as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009596
Matthias Kloseb159a552010-04-25 21:00:44 +00009597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009598$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009599else
Matthias Kloseb9621712010-04-24 17:59:49 +00009600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9601$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009602
9603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9605
Matthias Kloseb9621712010-04-24 17:59:49 +00009606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9607$as_echo_n "checking for getpagesize... " >&6; }
9608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009609/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009610
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009611#include <unistd.h>
9612
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009613int
9614main ()
9615{
9616void* p = getpagesize
9617 ;
9618 return 0;
9619}
9620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009621if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009622
Matthias Kloseb9621712010-04-24 17:59:49 +00009623$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009624
Matthias Kloseb159a552010-04-25 21:00:44 +00009625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009626$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009627else
Matthias Kloseb9621712010-04-24 17:59:49 +00009628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9629$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009630
9631fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009633
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009634for ac_prog in true
9635do
9636 # Extract the first word of "$ac_prog", so it can be a program name with args.
9637set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9639$as_echo_n "checking for $ac_word... " >&6; }
9640if test "${ac_cv_prog_TRUE+set}" = set; then :
9641 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009642else
9643 if test -n "$TRUE"; then
9644 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9645else
9646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9647for as_dir in $PATH
9648do
9649 IFS=$as_save_IFS
9650 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009651 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009652 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 +00009653 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009654 $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 +00009655 break 2
9656 fi
9657done
Matthias Kloseb9621712010-04-24 17:59:49 +00009658 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009660
9661fi
9662fi
9663TRUE=$ac_cv_prog_TRUE
9664if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9666$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009667else
Matthias Kloseb9621712010-04-24 17:59:49 +00009668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9669$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009670fi
9671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009672
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009673 test -n "$TRUE" && break
9674done
9675test -n "$TRUE" || TRUE="/bin/true"
9676
9677
Matthias Kloseb9621712010-04-24 17:59:49 +00009678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9679$as_echo_n "checking for inet_aton in -lc... " >&6; }
9680if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9681 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009682else
9683 ac_check_lib_save_LIBS=$LIBS
9684LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009686/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009688/* Override any GCC internal prototype to avoid an error.
9689 Use char because int might match the return type of a GCC
9690 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009691#ifdef __cplusplus
9692extern "C"
9693#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009694char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009695int
9696main ()
9697{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009698return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009699 ;
9700 return 0;
9701}
9702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009703if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009704 ac_cv_lib_c_inet_aton=yes
9705else
Matthias Kloseb9621712010-04-24 17:59:49 +00009706 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009708rm -f core conftest.err conftest.$ac_objext \
9709 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009710LIBS=$ac_check_lib_save_LIBS
9711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9713$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9714if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009715 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009716else
Matthias Kloseb9621712010-04-24 17:59:49 +00009717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9718$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9719if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9720 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009721else
9722 ac_check_lib_save_LIBS=$LIBS
9723LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009725/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727/* Override any GCC internal prototype to avoid an error.
9728 Use char because int might match the return type of a GCC
9729 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009730#ifdef __cplusplus
9731extern "C"
9732#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009733char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009734int
9735main ()
9736{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009737return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009738 ;
9739 return 0;
9740}
9741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009742if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009743 ac_cv_lib_resolv_inet_aton=yes
9744else
Matthias Kloseb9621712010-04-24 17:59:49 +00009745 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009747rm -f core conftest.err conftest.$ac_objext \
9748 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009749LIBS=$ac_check_lib_save_LIBS
9750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9752$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9753if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009754 cat >>confdefs.h <<_ACEOF
9755#define HAVE_LIBRESOLV 1
9756_ACEOF
9757
9758 LIBS="-lresolv $LIBS"
9759
9760fi
9761
9762
9763fi
9764
9765
Christian Heimesd0764e22007-12-04 15:00:33 +00009766# On Tru64, chflags seems to be present, but calling it will
9767# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9769$as_echo_n "checking for chflags... " >&6; }
9770if test "${ac_cv_have_chflags+set}" = set; then :
9771 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009772else
Matthias Kloseb9621712010-04-24 17:59:49 +00009773 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009774 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009775else
Matthias Kloseb9621712010-04-24 17:59:49 +00009776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009777/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009778[
Christian Heimesd0764e22007-12-04 15:00:33 +00009779#include <sys/stat.h>
9780#include <unistd.h>
9781int main(int argc, char*argv[])
9782{
9783 if(chflags(argv[0], 0) != 0)
9784 return 1;
9785 return 0;
9786}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009787]
Christian Heimesd0764e22007-12-04 15:00:33 +00009788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009789if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009790 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009791else
Matthias Kloseb9621712010-04-24 17:59:49 +00009792 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9795 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009796fi
9797
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009798
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9801$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009802if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009803 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9804if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009805 ac_cv_have_chflags="yes"
9806else
9807 ac_cv_have_chflags="no"
9808fi
9809
9810fi
9811if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009812
Matthias Kloseb9621712010-04-24 17:59:49 +00009813$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009814
9815fi
9816
Matthias Kloseb9621712010-04-24 17:59:49 +00009817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9818$as_echo_n "checking for lchflags... " >&6; }
9819if test "${ac_cv_have_lchflags+set}" = set; then :
9820 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009821else
Matthias Kloseb9621712010-04-24 17:59:49 +00009822 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009823 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009824else
Matthias Kloseb9621712010-04-24 17:59:49 +00009825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009826/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009827[
Christian Heimesd0764e22007-12-04 15:00:33 +00009828#include <sys/stat.h>
9829#include <unistd.h>
9830int main(int argc, char*argv[])
9831{
9832 if(lchflags(argv[0], 0) != 0)
9833 return 1;
9834 return 0;
9835}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009836]
Christian Heimesd0764e22007-12-04 15:00:33 +00009837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009838if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009839 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009840else
Matthias Kloseb9621712010-04-24 17:59:49 +00009841 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9844 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009845fi
9846
9847
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9850$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009851if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009852 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9853if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009854 ac_cv_have_lchflags="yes"
9855else
9856 ac_cv_have_lchflags="no"
9857fi
9858
9859fi
9860if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009861
Matthias Kloseb9621712010-04-24 17:59:49 +00009862$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009863
9864fi
9865
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009866case $ac_sys_system/$ac_sys_release in
9867Darwin/*)
9868 _CUR_CFLAGS="${CFLAGS}"
9869 _CUR_LDFLAGS="${LDFLAGS}"
9870 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9871 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9872 ;;
9873esac
9874
Matthias Kloseb9621712010-04-24 17:59:49 +00009875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9876$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9877if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9878 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009879else
9880 ac_check_lib_save_LIBS=$LIBS
9881LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009883/* end confdefs.h. */
9884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885/* Override any GCC internal prototype to avoid an error.
9886 Use char because int might match the return type of a GCC
9887 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009888#ifdef __cplusplus
9889extern "C"
9890#endif
9891char inflateCopy ();
9892int
9893main ()
9894{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009896 ;
9897 return 0;
9898}
9899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009900if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009901 ac_cv_lib_z_inflateCopy=yes
9902else
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009905rm -f core conftest.err conftest.$ac_objext \
9906 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009907LIBS=$ac_check_lib_save_LIBS
9908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9910$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9911if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009912
Matthias Kloseb9621712010-04-24 17:59:49 +00009913$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009914
9915fi
9916
9917
9918case $ac_sys_system/$ac_sys_release in
9919Darwin/*)
9920 CFLAGS="${_CUR_CFLAGS}"
9921 LDFLAGS="${_CUR_LDFLAGS}"
9922 ;;
9923esac
9924
Matthias Kloseb9621712010-04-24 17:59:49 +00009925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9926$as_echo_n "checking for hstrerror... " >&6; }
9927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009928/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009929
Martin v. Löwise9416172003-05-03 10:12:45 +00009930#include <netdb.h>
9931
Martin v. Löwise9416172003-05-03 10:12:45 +00009932int
9933main ()
9934{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009935void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009936 ;
9937 return 0;
9938}
9939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009940if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009941
Matthias Kloseb9621712010-04-24 17:59:49 +00009942$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009943
Matthias Kloseb159a552010-04-25 21:00:44 +00009944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009945$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009946else
Matthias Kloseb9621712010-04-24 17:59:49 +00009947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9948$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009949
9950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009951rm -f core conftest.err conftest.$ac_objext \
9952 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009953
Matthias Kloseb9621712010-04-24 17:59:49 +00009954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9955$as_echo_n "checking for inet_aton... " >&6; }
9956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009957/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009958
Martin v. Löwis86d66262006-02-17 08:40:11 +00009959#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009960#include <sys/socket.h>
9961#include <netinet/in.h>
9962#include <arpa/inet.h>
9963
Martin v. Löwise9416172003-05-03 10:12:45 +00009964int
9965main ()
9966{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009967void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009968 ;
9969 return 0;
9970}
9971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009972if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009973
Matthias Kloseb9621712010-04-24 17:59:49 +00009974$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009975
Matthias Kloseb159a552010-04-25 21:00:44 +00009976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009977$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009978else
Matthias Kloseb9621712010-04-24 17:59:49 +00009979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9980$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009981
9982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009983rm -f core conftest.err conftest.$ac_objext \
9984 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009985
Matthias Kloseb9621712010-04-24 17:59:49 +00009986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9987$as_echo_n "checking for inet_pton... " >&6; }
9988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009989/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009990
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009991#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009992#include <sys/socket.h>
9993#include <netinet/in.h>
9994#include <arpa/inet.h>
9995
Martin v. Löwise9416172003-05-03 10:12:45 +00009996int
9997main ()
9998{
9999void* p = inet_pton
10000 ;
10001 return 0;
10002}
10003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010004if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010005
Matthias Kloseb9621712010-04-24 17:59:49 +000010006$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010007
Matthias Kloseb159a552010-04-25 21:00:44 +000010008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010009$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010010else
Matthias Kloseb9621712010-04-24 17:59:49 +000010011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10012$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010013
10014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010016
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010017# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10019$as_echo_n "checking for setgroups... " >&6; }
10020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010021/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010022
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010023#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010024#ifdef HAVE_GRP_H
10025#include <grp.h>
10026#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010027
Martin v. Löwisd5843682002-11-21 20:41:28 +000010028int
10029main ()
10030{
10031void* p = setgroups
10032 ;
10033 return 0;
10034}
10035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010036if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010037
Matthias Kloseb9621712010-04-24 17:59:49 +000010038$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010039
Matthias Kloseb159a552010-04-25 21:00:44 +000010040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010041$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010042else
Matthias Kloseb9621712010-04-24 17:59:49 +000010043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10044$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010045
10046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010048
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010049# check for openpty and forkpty
10050
10051for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010052do :
10053 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10054if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010055 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010056#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010057_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010058
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010059else
Matthias Kloseb9621712010-04-24 17:59:49 +000010060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10061$as_echo_n "checking for openpty in -lutil... " >&6; }
10062if test "${ac_cv_lib_util_openpty+set}" = set; then :
10063 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010064else
Martin v. Löwis11437992002-04-12 09:54:03 +000010065 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010066LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010068/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010070/* Override any GCC internal prototype to avoid an error.
10071 Use char because int might match the return type of a GCC
10072 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010073#ifdef __cplusplus
10074extern "C"
10075#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010076char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010077int
10078main ()
10079{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010080return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010081 ;
10082 return 0;
10083}
10084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010085if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010086 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010087else
Matthias Kloseb9621712010-04-24 17:59:49 +000010088 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010090rm -f core conftest.err conftest.$ac_objext \
10091 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010092LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10095$as_echo "$ac_cv_lib_util_openpty" >&6; }
10096if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10097 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010098 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010099else
Matthias Kloseb9621712010-04-24 17:59:49 +000010100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10101$as_echo_n "checking for openpty in -lbsd... " >&6; }
10102if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10103 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010104else
10105 ac_check_lib_save_LIBS=$LIBS
10106LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010108/* end confdefs.h. */
10109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010110/* Override any GCC internal prototype to avoid an error.
10111 Use char because int might match the return type of a GCC
10112 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010113#ifdef __cplusplus
10114extern "C"
10115#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010116char openpty ();
10117int
10118main ()
10119{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010120return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010121 ;
10122 return 0;
10123}
10124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010125if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010126 ac_cv_lib_bsd_openpty=yes
10127else
Matthias Kloseb9621712010-04-24 17:59:49 +000010128 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010130rm -f core conftest.err conftest.$ac_objext \
10131 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010132LIBS=$ac_check_lib_save_LIBS
10133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10135$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10136if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10137 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010138 LIBS="$LIBS -lbsd"
10139fi
10140
10141
10142fi
10143
Fred Drake8cef4cf2000-06-28 16:40:38 +000010144
10145fi
10146done
10147
10148for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010149do :
10150 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10151if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010153#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010154_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010155
Fred Drake8cef4cf2000-06-28 16:40:38 +000010156else
Matthias Kloseb9621712010-04-24 17:59:49 +000010157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10158$as_echo_n "checking for forkpty in -lutil... " >&6; }
10159if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10160 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010161else
Martin v. Löwis11437992002-04-12 09:54:03 +000010162 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010163LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010165/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167/* Override any GCC internal prototype to avoid an error.
10168 Use char because int might match the return type of a GCC
10169 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010170#ifdef __cplusplus
10171extern "C"
10172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010173char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010174int
10175main ()
10176{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010177return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010178 ;
10179 return 0;
10180}
10181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010182if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010183 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010184else
Matthias Kloseb9621712010-04-24 17:59:49 +000010185 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010187rm -f core conftest.err conftest.$ac_objext \
10188 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010189LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10192$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10193if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10194 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010195 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010196else
Matthias Kloseb9621712010-04-24 17:59:49 +000010197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10198$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10199if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10200 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010201else
10202 ac_check_lib_save_LIBS=$LIBS
10203LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010205/* end confdefs.h. */
10206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010207/* Override any GCC internal prototype to avoid an error.
10208 Use char because int might match the return type of a GCC
10209 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010210#ifdef __cplusplus
10211extern "C"
10212#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010213char forkpty ();
10214int
10215main ()
10216{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010217return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010218 ;
10219 return 0;
10220}
10221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010222if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010223 ac_cv_lib_bsd_forkpty=yes
10224else
Matthias Kloseb9621712010-04-24 17:59:49 +000010225 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010227rm -f core conftest.err conftest.$ac_objext \
10228 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010229LIBS=$ac_check_lib_save_LIBS
10230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10232$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10233if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10234 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010235 LIBS="$LIBS -lbsd"
10236fi
10237
10238
10239fi
10240
Fred Drake8cef4cf2000-06-28 16:40:38 +000010241
10242fi
10243done
10244
Jack Jansendd19cf82001-12-06 22:36:17 +000010245
Christian Heimesb186d002008-03-18 15:15:01 +000010246# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010247for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010248do :
10249 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10250if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010251 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010252#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010253_ACEOF
10254
10255fi
10256done
10257
10258
Michael W. Hudson54241132001-12-07 15:38:26 +000010259# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010260for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010261do :
10262 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10263ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010264if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010266#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010267_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010268
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010269fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010270done
10271
Michael W. Hudson54241132001-12-07 15:38:26 +000010272
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010273ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10274if test "x$ac_cv_func_dup2" = x""yes; then :
10275 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010276
Martin v. Löwis1142de32002-03-29 16:28:31 +000010277else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010278 case " $LIBOBJS " in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010279 *" dup2.$ac_objext "* ) ;;
10280 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010281 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010282esac
10283
Martin v. Löwis1142de32002-03-29 16:28:31 +000010284fi
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010285
10286ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10287if test "x$ac_cv_func_getcwd" = x""yes; then :
10288 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10289
10290else
10291 case " $LIBOBJS " in
10292 *" getcwd.$ac_objext "* ) ;;
10293 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10294 ;;
10295esac
10296
10297fi
10298
10299ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10300if test "x$ac_cv_func_strdup" = x""yes; then :
10301 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10302
10303else
10304 case " $LIBOBJS " in
10305 *" strdup.$ac_objext "* ) ;;
10306 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10307 ;;
10308esac
10309
10310fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010311
10312
10313for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010314do :
10315 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10316if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010318#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010321/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010322#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010323int
10324main ()
10325{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010326getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010327 ;
10328 return 0;
10329}
10330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010331if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010332
Matthias Kloseb9621712010-04-24 17:59:49 +000010333$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010334
Guido van Rossum627b2d71993-12-24 10:39:16 +000010335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010337
Guido van Rossum627b2d71993-12-24 10:39:16 +000010338fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010339done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010340
Jack Jansen150753c2003-03-29 22:07:47 +000010341for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010342do :
10343 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10344if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010345 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010346#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010349/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010350#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010351int
10352main ()
10353{
10354setpgrp(0,0);
10355 ;
10356 return 0;
10357}
10358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010359if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010360
Matthias Kloseb9621712010-04-24 17:59:49 +000010361$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010362
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010365
10366fi
10367done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010368
Thomas Wouters3a584202000-08-05 23:28:51 +000010369for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010370do :
10371 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10372if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010373 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010374#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010377/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010378#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010379int
10380main ()
10381{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010382gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010383 ;
10384 return 0;
10385}
10386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010387if ac_fn_c_try_compile "$LINENO"; then :
10388
Guido van Rossum627b2d71993-12-24 10:39:16 +000010389else
Skip Montanaro6dead952003-09-25 14:50:04 +000010390
Matthias Kloseb9621712010-04-24 17:59:49 +000010391$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010392
Martin v. Löwis11437992002-04-12 09:54:03 +000010393
Guido van Rossum627b2d71993-12-24 10:39:16 +000010394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010396
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010397fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010398done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010399
Michael W. Hudson54241132001-12-07 15:38:26 +000010400
Matthias Kloseb9621712010-04-24 17:59:49 +000010401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10402$as_echo_n "checking for major... " >&6; }
10403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010404/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010405
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010406#if defined(MAJOR_IN_MKDEV)
10407#include <sys/mkdev.h>
10408#elif defined(MAJOR_IN_SYSMACROS)
10409#include <sys/sysmacros.h>
10410#else
10411#include <sys/types.h>
10412#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010413
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010414int
10415main ()
10416{
10417
10418 makedev(major(0),minor(0));
10419
10420 ;
10421 return 0;
10422}
10423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010424if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010425
10426
Matthias Kloseb9621712010-04-24 17:59:49 +000010427$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010428
Matthias Kloseb9621712010-04-24 17:59:49 +000010429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10430$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010431
10432else
Skip Montanaro6dead952003-09-25 14:50:04 +000010433
Matthias Kloseb9621712010-04-24 17:59:49 +000010434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10435$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010436
10437fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010438rm -f core conftest.err conftest.$ac_objext \
10439 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010440
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010441# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010442# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10444$as_echo_n "checking for getaddrinfo... " >&6; }
10445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010446/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010447
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010448#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010449#include <sys/socket.h>
10450#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010451#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010452
Martin v. Löwis11437992002-04-12 09:54:03 +000010453int
10454main ()
10455{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010456getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010457 ;
10458 return 0;
10459}
10460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010461if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010462 have_getaddrinfo=yes
10463else
Matthias Kloseb9621712010-04-24 17:59:49 +000010464 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010466rm -f core conftest.err conftest.$ac_objext \
10467 conftest$ac_exeext conftest.$ac_ext
10468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10469$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010470if test $have_getaddrinfo = yes
10471then
Matthias Kloseb9621712010-04-24 17:59:49 +000010472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10473$as_echo_n "checking getaddrinfo bug... " >&6; }
10474 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10475 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010476else
Matthias Kloseb9621712010-04-24 17:59:49 +000010477 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010478 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010479else
Matthias Kloseb9621712010-04-24 17:59:49 +000010480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010481/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010482
10483#include <sys/types.h>
10484#include <netdb.h>
10485#include <string.h>
10486#include <sys/socket.h>
10487#include <netinet/in.h>
10488
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010489int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010490{
10491 int passive, gaierr, inet4 = 0, inet6 = 0;
10492 struct addrinfo hints, *ai, *aitop;
10493 char straddr[INET6_ADDRSTRLEN], strport[16];
10494
10495 for (passive = 0; passive <= 1; passive++) {
10496 memset(&hints, 0, sizeof(hints));
10497 hints.ai_family = AF_UNSPEC;
10498 hints.ai_flags = passive ? AI_PASSIVE : 0;
10499 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010500 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010501 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10502 (void)gai_strerror(gaierr);
10503 goto bad;
10504 }
10505 for (ai = aitop; ai; ai = ai->ai_next) {
10506 if (ai->ai_addr == NULL ||
10507 ai->ai_addrlen == 0 ||
10508 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10509 straddr, sizeof(straddr), strport, sizeof(strport),
10510 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10511 goto bad;
10512 }
10513 switch (ai->ai_family) {
10514 case AF_INET:
10515 if (strcmp(strport, "54321") != 0) {
10516 goto bad;
10517 }
10518 if (passive) {
10519 if (strcmp(straddr, "0.0.0.0") != 0) {
10520 goto bad;
10521 }
10522 } else {
10523 if (strcmp(straddr, "127.0.0.1") != 0) {
10524 goto bad;
10525 }
10526 }
10527 inet4++;
10528 break;
10529 case AF_INET6:
10530 if (strcmp(strport, "54321") != 0) {
10531 goto bad;
10532 }
10533 if (passive) {
10534 if (strcmp(straddr, "::") != 0) {
10535 goto bad;
10536 }
10537 } else {
10538 if (strcmp(straddr, "::1") != 0) {
10539 goto bad;
10540 }
10541 }
10542 inet6++;
10543 break;
10544 case AF_UNSPEC:
10545 goto bad;
10546 break;
10547 default:
10548 /* another family support? */
10549 break;
10550 }
10551 }
10552 }
10553
10554 if (!(inet4 == 0 || inet4 == 2))
10555 goto bad;
10556 if (!(inet6 == 0 || inet6 == 2))
10557 goto bad;
10558
10559 if (aitop)
10560 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010561 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010562
10563 bad:
10564 if (aitop)
10565 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010566 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010567}
10568
Martin v. Löwis11437992002-04-12 09:54:03 +000010569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010570if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010571 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010572else
Matthias Kloseb9621712010-04-24 17:59:49 +000010573 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010574fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010575rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10576 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010578
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010579fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010580
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010582
Mark Dickinson2df5d282009-12-31 21:22:50 +000010583if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010584then
10585 if test $ipv6 = yes
10586 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010587 echo 'Fatal: You must get working getaddrinfo() function.'
10588 echo ' or you can specify "--disable-ipv6"'.
10589 exit 1
10590 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010591else
Martin v. Löwis11437992002-04-12 09:54:03 +000010592
Matthias Kloseb9621712010-04-24 17:59:49 +000010593$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010594
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010595fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010596for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010597do :
10598 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10599if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010600 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010601#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010602_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010603
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010604fi
10605done
10606
Michael W. Hudson54241132001-12-07 15:38:26 +000010607
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010608# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10610$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10611if test "${ac_cv_header_time+set}" = set; then :
10612 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010613else
Matthias Kloseb9621712010-04-24 17:59:49 +000010614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010615/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010616#include <sys/types.h>
10617#include <sys/time.h>
10618#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010619
Martin v. Löwis11437992002-04-12 09:54:03 +000010620int
10621main ()
10622{
10623if ((struct tm *) 0)
10624return 0;
10625 ;
10626 return 0;
10627}
10628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010629if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010630 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010631else
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10637$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010638if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010639
Matthias Kloseb9621712010-04-24 17:59:49 +000010640$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010641
10642fi
10643
Matthias Kloseb9621712010-04-24 17:59:49 +000010644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10645$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10646if test "${ac_cv_struct_tm+set}" = set; then :
10647 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010648else
Matthias Kloseb9621712010-04-24 17:59:49 +000010649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010650/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010651#include <sys/types.h>
10652#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010653
Martin v. Löwis11437992002-04-12 09:54:03 +000010654int
10655main ()
10656{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010657struct tm tm;
10658 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010659 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010660 ;
10661 return 0;
10662}
10663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010664if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010665 ac_cv_struct_tm=time.h
10666else
Matthias Kloseb9621712010-04-24 17:59:49 +000010667 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010670fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10672$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010673if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010674
Matthias Kloseb9621712010-04-24 17:59:49 +000010675$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010676
10677fi
10678
Matthias Kloseb9621712010-04-24 17:59:49 +000010679ac_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 +000010680#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010681
Matthias Kloseb9621712010-04-24 17:59:49 +000010682"
10683if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010684
10685cat >>confdefs.h <<_ACEOF
10686#define HAVE_STRUCT_TM_TM_ZONE 1
10687_ACEOF
10688
10689
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010690fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010691
Martin v. Löwis11437992002-04-12 09:54:03 +000010692if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10693
Matthias Kloseb9621712010-04-24 17:59:49 +000010694$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010695
10696else
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10698"
10699if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10700 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701else
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010703fi
10704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010705cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010706#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707_ACEOF
10708
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10710$as_echo_n "checking for tzname... " >&6; }
10711if test "${ac_cv_var_tzname+set}" = set; then :
10712 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010713else
Matthias Kloseb9621712010-04-24 17:59:49 +000010714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010715/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010716#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010717#if !HAVE_DECL_TZNAME
10718extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010719#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010720
Martin v. Löwis11437992002-04-12 09:54:03 +000010721int
10722main ()
10723{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010724return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010725 ;
10726 return 0;
10727}
10728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010729if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010730 ac_cv_var_tzname=yes
10731else
Matthias Kloseb9621712010-04-24 17:59:49 +000010732 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010733fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010734rm -f core conftest.err conftest.$ac_objext \
10735 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10738$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010739 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010740
Matthias Kloseb9621712010-04-24 17:59:49 +000010741$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010742
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010743 fi
10744fi
10745
Matthias Kloseb9621712010-04-24 17:59:49 +000010746ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10747if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010748
10749cat >>confdefs.h <<_ACEOF
10750#define HAVE_STRUCT_STAT_ST_RDEV 1
10751_ACEOF
10752
10753
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010754fi
10755
Matthias Kloseb9621712010-04-24 17:59:49 +000010756ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10757if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010758
Martin v. Löwis11437992002-04-12 09:54:03 +000010759cat >>confdefs.h <<_ACEOF
10760#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10761_ACEOF
10762
10763
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010764fi
10765
Matthias Kloseb9621712010-04-24 17:59:49 +000010766ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10767if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010768
10769cat >>confdefs.h <<_ACEOF
10770#define HAVE_STRUCT_STAT_ST_FLAGS 1
10771_ACEOF
10772
10773
10774fi
10775
Matthias Kloseb9621712010-04-24 17:59:49 +000010776ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10777if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010778
10779cat >>confdefs.h <<_ACEOF
10780#define HAVE_STRUCT_STAT_ST_GEN 1
10781_ACEOF
10782
10783
10784fi
10785
Matthias Kloseb9621712010-04-24 17:59:49 +000010786ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10787if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010788
10789cat >>confdefs.h <<_ACEOF
10790#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10791_ACEOF
10792
10793
10794fi
10795
Matthias Kloseb9621712010-04-24 17:59:49 +000010796ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10797if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010798
Martin v. Löwis11437992002-04-12 09:54:03 +000010799cat >>confdefs.h <<_ACEOF
10800#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10801_ACEOF
10802
10803
Matthias Kloseb9621712010-04-24 17:59:49 +000010804$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010805
10806else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010807 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010808 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010809 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10810 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010811esac
10812
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010813fi
10814
Michael W. Hudson54241132001-12-07 15:38:26 +000010815
Martin v. Löwis11437992002-04-12 09:54:03 +000010816
Matthias Kloseb9621712010-04-24 17:59:49 +000010817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10818$as_echo_n "checking for time.h that defines altzone... " >&6; }
10819if test "${ac_cv_header_time_altzone+set}" = set; then :
10820 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010821else
Matthias Kloseb159a552010-04-25 21:00:44 +000010822
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010824/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010825#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010826int
10827main ()
10828{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010829return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010830 ;
10831 return 0;
10832}
10833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010834if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010835 ac_cv_header_time_altzone=yes
10836else
Matthias Kloseb9621712010-04-24 17:59:49 +000010837 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010841fi
10842
Matthias Kloseb9621712010-04-24 17:59:49 +000010843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10844$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010845if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010846
Matthias Kloseb9621712010-04-24 17:59:49 +000010847$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010848
10849fi
10850
Guido van Rossumda88dad1995-01-26 00:46:29 +000010851was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10853$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010855/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010856
10857#include <sys/types.h>
10858#include <sys/select.h>
10859#include <sys/time.h>
10860
Martin v. Löwis11437992002-04-12 09:54:03 +000010861int
10862main ()
10863{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010864;
Martin v. Löwis11437992002-04-12 09:54:03 +000010865 ;
10866 return 0;
10867}
10868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010869if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010870
10871
Matthias Kloseb9621712010-04-24 17:59:49 +000010872$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010873
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010874 was_it_defined=yes
10875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10879$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010880
Matthias Kloseb9621712010-04-24 17:59:49 +000010881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10882$as_echo_n "checking for addrinfo... " >&6; }
10883if test "${ac_cv_struct_addrinfo+set}" = set; then :
10884 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010885else
Matthias Kloseb9621712010-04-24 17:59:49 +000010886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010887/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010888#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010889int
10890main ()
10891{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010892struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010893 ;
10894 return 0;
10895}
10896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010897if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010898 ac_cv_struct_addrinfo=yes
10899else
Matthias Kloseb9621712010-04-24 17:59:49 +000010900 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10903fi
10904
Matthias Kloseb9621712010-04-24 17:59:49 +000010905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10906$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010907if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010908
Matthias Kloseb9621712010-04-24 17:59:49 +000010909$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010910
10911fi
10912
Matthias Kloseb9621712010-04-24 17:59:49 +000010913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10914$as_echo_n "checking for sockaddr_storage... " >&6; }
10915if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10916 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010917else
Matthias Kloseb9621712010-04-24 17:59:49 +000010918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010919/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010920
10921# include <sys/types.h>
10922# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010923int
10924main ()
10925{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010926struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010927 ;
10928 return 0;
10929}
10930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010931if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010932 ac_cv_struct_sockaddr_storage=yes
10933else
Matthias Kloseb9621712010-04-24 17:59:49 +000010934 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10937fi
10938
Matthias Kloseb9621712010-04-24 17:59:49 +000010939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10940$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010941if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010942
Matthias Kloseb9621712010-04-24 17:59:49 +000010943$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010944
10945fi
10946
Guido van Rossum627b2d71993-12-24 10:39:16 +000010947# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010948
Matthias Kloseb9621712010-04-24 17:59:49 +000010949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10950$as_echo_n "checking whether char is unsigned... " >&6; }
10951if test "${ac_cv_c_char_unsigned+set}" = set; then :
10952 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010953else
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010956$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010957int
10958main ()
10959{
10960static int test_array [1 - 2 * !(((char) -1) < 0)];
10961test_array [0] = 0
10962
10963 ;
10964 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010965}
Martin v. Löwis11437992002-04-12 09:54:03 +000010966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010967if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010968 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010969else
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010973fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10975$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010976if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010977 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010978
10979fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010980
Matthias Kloseb9621712010-04-24 17:59:49 +000010981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10982$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10983if test "${ac_cv_c_const+set}" = set; then :
10984 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010985else
Matthias Kloseb9621712010-04-24 17:59:49 +000010986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010987/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010988
Martin v. Löwis11437992002-04-12 09:54:03 +000010989int
10990main ()
10991{
10992/* FIXME: Include the comments suggested by Paul. */
10993#ifndef __cplusplus
10994 /* Ultrix mips cc rejects this. */
10995 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010996 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000010997 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010998 char const *const *pcpcc;
10999 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011000 /* NEC SVR4.0.2 mips cc rejects this. */
11001 struct point {int x, y;};
11002 static struct point const zero = {0,0};
11003 /* AIX XL C 1.02.0.0 rejects this.
11004 It does not let you subtract one const X* pointer from another in
11005 an arm of an if-expression whose if-part is not a constant
11006 expression */
11007 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011008 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011009 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011010 ++pcpcc;
11011 ppc = (char**) pcpcc;
11012 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011013 { /* SCO 3.2v4 cc rejects this. */
11014 char *t;
11015 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011016
Martin v. Löwis11437992002-04-12 09:54:03 +000011017 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011018 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011019 }
11020 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11021 int x[] = {25, 17};
11022 const int *foo = &x[0];
11023 ++foo;
11024 }
11025 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11026 typedef const int *iptr;
11027 iptr p = 0;
11028 ++p;
11029 }
11030 { /* AIX XL C 1.02.0.0 rejects this saying
11031 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11032 struct s { int j; const int *ap[3]; };
11033 struct s *b; b->j = 5;
11034 }
11035 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11036 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011037 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011039 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011040#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011041
Martin v. Löwis11437992002-04-12 09:54:03 +000011042 ;
11043 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011044}
Martin v. Löwis11437992002-04-12 09:54:03 +000011045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011046if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011047 ac_cv_c_const=yes
11048else
Matthias Kloseb9621712010-04-24 17:59:49 +000011049 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11054$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011055if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011056
Matthias Kloseb9621712010-04-24 17:59:49 +000011057$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011058
11059fi
11060
Michael W. Hudson54241132001-12-07 15:38:26 +000011061
Guido van Rossumda88dad1995-01-26 00:46:29 +000011062works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11064$as_echo_n "checking for working volatile... " >&6; }
11065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011066/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011067
Martin v. Löwis11437992002-04-12 09:54:03 +000011068int
11069main ()
11070{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011071volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011072 ;
11073 return 0;
11074}
11075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011076if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011077 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011078else
Skip Montanaro6dead952003-09-25 14:50:04 +000011079
Matthias Kloseb9621712010-04-24 17:59:49 +000011080$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011081
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011082
Guido van Rossum627b2d71993-12-24 10:39:16 +000011083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11086$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011087
Guido van Rossumda88dad1995-01-26 00:46:29 +000011088works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11090$as_echo_n "checking for working signed char... " >&6; }
11091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011092/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011093
Martin v. Löwis11437992002-04-12 09:54:03 +000011094int
11095main ()
11096{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011097signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011098 ;
11099 return 0;
11100}
11101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011102if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011103 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011104else
Skip Montanaro6dead952003-09-25 14:50:04 +000011105
Matthias Kloseb9621712010-04-24 17:59:49 +000011106$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011107
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011108
Guido van Rossum7f43da71994-08-01 12:15:30 +000011109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11112$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011113
Guido van Rossumda88dad1995-01-26 00:46:29 +000011114have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11116$as_echo_n "checking for prototypes... " >&6; }
11117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011118/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011119int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011120int
11121main ()
11122{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011123return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011124 ;
11125 return 0;
11126}
11127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011128if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011129
Matthias Kloseb9621712010-04-24 17:59:49 +000011130$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011131
Matthias Kloseb159a552010-04-25 21:00:44 +000011132 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11136$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011137
Guido van Rossumda88dad1995-01-26 00:46:29 +000011138works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11140$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011142/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011143
11144#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011145int foo(int x, ...) {
11146 va_list va;
11147 va_start(va, x);
11148 va_arg(va, int);
11149 va_arg(va, char *);
11150 va_arg(va, double);
11151 return 0;
11152}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011153
Martin v. Löwis11437992002-04-12 09:54:03 +000011154int
11155main ()
11156{
Guido van Rossum90eea071996-08-30 20:58:57 +000011157return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011158 ;
11159 return 0;
11160}
11161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011162if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011163
11164
Matthias Kloseb9621712010-04-24 17:59:49 +000011165$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011166
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011167 works=yes
11168
Guido van Rossum627b2d71993-12-24 10:39:16 +000011169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11172$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011173
Martin v. Löwisd6320502004-08-12 13:45:08 +000011174# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11176$as_echo_n "checking for socketpair... " >&6; }
11177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011178/* end confdefs.h. */
11179
11180#include <sys/types.h>
11181#include <sys/socket.h>
11182
11183int
11184main ()
11185{
11186void *x=socketpair
11187 ;
11188 return 0;
11189}
11190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011191if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011192
Matthias Kloseb9621712010-04-24 17:59:49 +000011193$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011194
Matthias Kloseb159a552010-04-25 21:00:44 +000011195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011196$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011197else
Matthias Kloseb9621712010-04-24 17:59:49 +000011198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11199$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011200
11201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011203
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011204# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11206$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011208/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011209#include <sys/types.h>
11210#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011211int
11212main ()
11213{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011214struct sockaddr x;
11215x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011216 ;
11217 return 0;
11218}
11219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011220if ac_fn_c_try_compile "$LINENO"; then :
11221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11222$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011223
Matthias Kloseb9621712010-04-24 17:59:49 +000011224$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011225
11226else
Matthias Kloseb9621712010-04-24 17:59:49 +000011227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11228$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011229
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011232
Guido van Rossumda88dad1995-01-26 00:46:29 +000011233va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11235$as_echo_n "checking whether va_list is an array... " >&6; }
11236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011237/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011238
11239#ifdef HAVE_STDARG_PROTOTYPES
11240#include <stdarg.h>
11241#else
11242#include <varargs.h>
11243#endif
11244
Martin v. Löwis11437992002-04-12 09:54:03 +000011245int
11246main ()
11247{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011248va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011249 ;
11250 return 0;
11251}
11252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011253if ac_fn_c_try_compile "$LINENO"; then :
11254
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011255else
Skip Montanaro6dead952003-09-25 14:50:04 +000011256
Martin v. Löwis11437992002-04-12 09:54:03 +000011257
Matthias Kloseb9621712010-04-24 17:59:49 +000011258$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011259
Guido van Rossumda88dad1995-01-26 00:46:29 +000011260 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011261
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11265$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011266
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011267# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011268
11269
Matthias Kloseb9621712010-04-24 17:59:49 +000011270ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11271if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011272
Matthias Kloseb9621712010-04-24 17:59:49 +000011273 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011274
Matthias Kloseb9621712010-04-24 17:59:49 +000011275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11276$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011277 OLD_CFLAGS=$CFLAGS
11278 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011280/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011281
11282# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011283
Martin v. Löwis11437992002-04-12 09:54:03 +000011284int
11285main ()
11286{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011287
11288 char *name;
11289 struct hostent *he, *res;
11290 char buffer[2048];
11291 int buflen = 2048;
11292 int h_errnop;
11293
11294 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011295
11296 ;
11297 return 0;
11298}
11299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011300if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011301
Matthias Kloseb9621712010-04-24 17:59:49 +000011302 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011303
Martin v. Löwis11437992002-04-12 09:54:03 +000011304
Matthias Kloseb9621712010-04-24 17:59:49 +000011305$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011306
Matthias Kloseb9621712010-04-24 17:59:49 +000011307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11308$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011309
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011310else
Skip Montanaro6dead952003-09-25 14:50:04 +000011311
Matthias Kloseb9621712010-04-24 17:59:49 +000011312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11313$as_echo "no" >&6; }
11314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11315$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011317/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011318
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011319# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011320
Martin v. Löwis11437992002-04-12 09:54:03 +000011321int
11322main ()
11323{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011324
11325 char *name;
11326 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011327 char buffer[2048];
11328 int buflen = 2048;
11329 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011330
Matthias Kloseb159a552010-04-25 21:00:44 +000011331 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011332
11333 ;
11334 return 0;
11335}
11336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011337if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011338
Matthias Kloseb9621712010-04-24 17:59:49 +000011339 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011340
Martin v. Löwis11437992002-04-12 09:54:03 +000011341
Matthias Kloseb159a552010-04-25 21:00:44 +000011342$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011343
Matthias Kloseb9621712010-04-24 17:59:49 +000011344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11345$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011346
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011347else
Skip Montanaro6dead952003-09-25 14:50:04 +000011348
Matthias Kloseb9621712010-04-24 17:59:49 +000011349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11350$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11352$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11354/* end confdefs.h. */
11355
11356# include <netdb.h>
11357
11358int
11359main ()
11360{
11361
11362 char *name;
11363 struct hostent *he;
11364 struct hostent_data data;
11365
11366 (void) gethostbyname_r(name, he, &data);
11367
11368 ;
11369 return 0;
11370}
11371_ACEOF
11372if ac_fn_c_try_compile "$LINENO"; then :
11373
11374 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11375
11376
11377$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11378
11379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11380$as_echo "yes" >&6; }
11381
11382else
11383
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11385$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011386
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011389
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011392
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011395 CFLAGS=$OLD_CFLAGS
11396
11397else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011398
Matthias Kloseb9621712010-04-24 17:59:49 +000011399 for ac_func in gethostbyname
11400do :
11401 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11402if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011403 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011404#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011405_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011406
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011407fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011408done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011409
Michael W. Hudson54241132001-12-07 15:38:26 +000011410
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011411fi
11412
Michael W. Hudson54241132001-12-07 15:38:26 +000011413
11414
11415
11416
11417
11418
Guido van Rossum627b2d71993-12-24 10:39:16 +000011419# checks for system services
11420# (none yet)
11421
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011422# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011423ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11424if test "x$ac_cv_func___fpu_control" = x""yes; then :
11425
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011426else
Matthias Kloseb9621712010-04-24 17:59:49 +000011427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11428$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11429if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11430 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011431else
Martin v. Löwis11437992002-04-12 09:54:03 +000011432 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011433LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011437/* Override any GCC internal prototype to avoid an error.
11438 Use char because int might match the return type of a GCC
11439 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011440#ifdef __cplusplus
11441extern "C"
11442#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011443char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011444int
11445main ()
11446{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011447return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011448 ;
11449 return 0;
11450}
11451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011452if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011453 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011454else
Matthias Kloseb9621712010-04-24 17:59:49 +000011455 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011457rm -f core conftest.err conftest.$ac_objext \
11458 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011459LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11462$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11463if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011464 cat >>confdefs.h <<_ACEOF
11465#define HAVE_LIBIEEE 1
11466_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011467
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011468 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011469
Guido van Rossum627b2d71993-12-24 10:39:16 +000011470fi
11471
Michael W. Hudson54241132001-12-07 15:38:26 +000011472
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011473fi
11474
Michael W. Hudson54241132001-12-07 15:38:26 +000011475
Guido van Rossum7f253911997-05-09 02:42:48 +000011476# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11478$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011480# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011481if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011482 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011483if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011484then
11485
Matthias Kloseb9621712010-04-24 17:59:49 +000011486$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011487
Matthias Kloseb9621712010-04-24 17:59:49 +000011488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11489$as_echo "yes" >&6; }
11490else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11491$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011492fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011493else
Matthias Kloseb9621712010-04-24 17:59:49 +000011494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11495$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496fi
11497
Guido van Rossum7f253911997-05-09 02:42:48 +000011498
Guido van Rossum7f43da71994-08-01 12:15:30 +000011499# check for --with-libm=...
11500
Guido van Rossum563e7081996-09-10 18:20:48 +000011501case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011502Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011503*) LIBM=-lm
11504esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11506$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011507
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011508# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011509if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011510 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011511if test "$withval" = no
11512then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11514$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011515elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011516then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11518$as_echo "set LIBM=\"$withval\"" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011519else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011520fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011521else
Matthias Kloseb9621712010-04-24 17:59:49 +000011522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11523$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011524fi
11525
Guido van Rossum7f43da71994-08-01 12:15:30 +000011526
11527# check for --with-libc=...
11528
Matthias Kloseb9621712010-04-24 17:59:49 +000011529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11530$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011533if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011535if test "$withval" = no
11536then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11538$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011539elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011540then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11542$as_echo "set LIBC=\"$withval\"" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011543else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011544fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011545else
Matthias Kloseb9621712010-04-24 17:59:49 +000011546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11547$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011548fi
11549
Guido van Rossum7f43da71994-08-01 12:15:30 +000011550
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011551# **************************************************
11552# * Check for various properties of floating point *
11553# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011554
Matthias Kloseb9621712010-04-24 17:59:49 +000011555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11556$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11557if test "${ac_cv_little_endian_double+set}" = set; then :
11558 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011559else
11560
Matthias Kloseb9621712010-04-24 17:59:49 +000011561if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011562 ac_cv_little_endian_double=no
11563else
Matthias Kloseb9621712010-04-24 17:59:49 +000011564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011565/* end confdefs.h. */
11566
11567#include <string.h>
11568int main() {
11569 double x = 9006104071832581.0;
11570 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11571 return 0;
11572 else
11573 return 1;
11574}
11575
11576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011577if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011578 ac_cv_little_endian_double=yes
11579else
Matthias Kloseb9621712010-04-24 17:59:49 +000011580 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11583 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011584fi
11585
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011586fi
11587
Matthias Kloseb9621712010-04-24 17:59:49 +000011588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11589$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011590if test "$ac_cv_little_endian_double" = yes
11591then
11592
Matthias Kloseb9621712010-04-24 17:59:49 +000011593$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011594
11595fi
11596
Matthias Kloseb9621712010-04-24 17:59:49 +000011597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11598$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11599if test "${ac_cv_big_endian_double+set}" = set; then :
11600 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011601else
11602
Matthias Kloseb9621712010-04-24 17:59:49 +000011603if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011604 ac_cv_big_endian_double=no
11605else
Matthias Kloseb9621712010-04-24 17:59:49 +000011606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011607/* end confdefs.h. */
11608
11609#include <string.h>
11610int main() {
11611 double x = 9006104071832581.0;
11612 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11613 return 0;
11614 else
11615 return 1;
11616}
11617
11618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011619if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011620 ac_cv_big_endian_double=yes
11621else
Matthias Kloseb9621712010-04-24 17:59:49 +000011622 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011623fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011624rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11625 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011626fi
11627
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011628fi
11629
Matthias Kloseb9621712010-04-24 17:59:49 +000011630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11631$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011632if test "$ac_cv_big_endian_double" = yes
11633then
11634
Matthias Kloseb9621712010-04-24 17:59:49 +000011635$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011636
11637fi
11638
11639# Some ARM platforms use a mixed-endian representation for doubles.
11640# While Python doesn't currently have full support for these platforms
11641# (see e.g., issue 1762561), we can at least make sure that float <-> string
11642# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11644$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11645if test "${ac_cv_mixed_endian_double+set}" = set; then :
11646 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011647else
11648
Matthias Kloseb9621712010-04-24 17:59:49 +000011649if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011650 ac_cv_mixed_endian_double=no
11651else
Matthias Kloseb9621712010-04-24 17:59:49 +000011652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011653/* end confdefs.h. */
11654
11655#include <string.h>
11656int main() {
11657 double x = 9006104071832581.0;
11658 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11659 return 0;
11660 else
11661 return 1;
11662}
11663
11664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011665if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011666 ac_cv_mixed_endian_double=yes
11667else
Matthias Kloseb9621712010-04-24 17:59:49 +000011668 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11671 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011672fi
11673
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011674fi
11675
Matthias Kloseb9621712010-04-24 17:59:49 +000011676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11677$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011678if test "$ac_cv_mixed_endian_double" = yes
11679then
11680
Matthias Kloseb9621712010-04-24 17:59:49 +000011681$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011682
11683fi
11684
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011685# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011686# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011687# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011688# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011689# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011690# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011691
11692# This inline assembler syntax may also work for suncc and icc,
11693# so we try it on all platforms.
11694
Matthias Kloseb9621712010-04-24 17:59:49 +000011695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11696$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011698/* end confdefs.h. */
11699
11700int
11701main ()
11702{
11703
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011704 unsigned short cw;
11705 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11706 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011707
11708 ;
11709 return 0;
11710}
11711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011712if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011713 have_gcc_asm_for_x87=yes
11714else
Matthias Kloseb9621712010-04-24 17:59:49 +000011715 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011716fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11719$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011720if test "$have_gcc_asm_for_x87" = yes
11721then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011722
Matthias Kloseb9621712010-04-24 17:59:49 +000011723$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011724
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011725fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011726
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011727# Detect whether system arithmetic is subject to x87-style double
11728# rounding issues. The result of this test has little meaning on non
11729# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11730# mode is round-to-nearest and double rounding issues are present, and
11731# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11733$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011734# $BASECFLAGS may affect the result
11735ac_save_cc="$CC"
11736CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011737if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011738 ac_cv_x87_double_rounding=no
11739else
Matthias Kloseb9621712010-04-24 17:59:49 +000011740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011741/* end confdefs.h. */
11742
11743#include <stdlib.h>
11744#include <math.h>
11745int main() {
11746 volatile double x, y, z;
11747 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11748 x = 0.99999999999999989; /* 1-2**-53 */
11749 y = 1./x;
11750 if (y != 1.)
11751 exit(0);
11752 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11753 x = 1e16;
11754 y = 2.99999;
11755 z = x + y;
11756 if (z != 1e16+4.)
11757 exit(0);
11758 /* both tests show evidence of double rounding */
11759 exit(1);
11760}
11761
11762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011763if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011764 ac_cv_x87_double_rounding=no
11765else
Matthias Kloseb9621712010-04-24 17:59:49 +000011766 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011767fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11769 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011770fi
11771
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011772CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11774$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011775if test "$ac_cv_x87_double_rounding" = yes
11776then
11777
Matthias Kloseb9621712010-04-24 17:59:49 +000011778$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011779
11780fi
11781
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011782# ************************************
11783# * Check for mathematical functions *
11784# ************************************
11785
11786LIBS_SAVE=$LIBS
11787LIBS="$LIBS $LIBM"
11788
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011789# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11790# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11792$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11793if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11794 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011795else
11796
Matthias Kloseb9621712010-04-24 17:59:49 +000011797if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011798 ac_cv_tanh_preserves_zero_sign=no
11799else
Matthias Kloseb9621712010-04-24 17:59:49 +000011800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011801/* end confdefs.h. */
11802
11803#include <math.h>
11804#include <stdlib.h>
11805int main() {
11806 /* return 0 if either negative zeros don't exist
11807 on this platform or if negative zeros exist
11808 and tanh(-0.) == -0. */
11809 if (atan2(0., -1.) == atan2(-0., -1.) ||
11810 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11811 else exit(1);
11812}
11813
11814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011815if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011816 ac_cv_tanh_preserves_zero_sign=yes
11817else
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11821 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011822fi
11823
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011824fi
11825
Matthias Kloseb9621712010-04-24 17:59:49 +000011826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11827$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011828if test "$ac_cv_tanh_preserves_zero_sign" = yes
11829then
11830
Matthias Kloseb9621712010-04-24 17:59:49 +000011831$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011832
11833fi
11834
Mark Dickinson9c113362009-09-05 10:36:23 +000011835for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011836do :
11837 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11838ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011839if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011840 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011841#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011842_ACEOF
11843
11844fi
11845done
11846
Mark Dickinson9c113362009-09-05 10:36:23 +000011847for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011848do :
11849 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11850ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011851if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011852 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011853#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011854_ACEOF
11855
11856fi
11857done
11858
Matthias Kloseb9621712010-04-24 17:59:49 +000011859ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11860"
11861if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11862 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011863else
Matthias Kloseb9621712010-04-24 17:59:49 +000011864 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011865fi
11866
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011867cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011868#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011870ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11871"
11872if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11873 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011874else
Matthias Kloseb9621712010-04-24 17:59:49 +000011875 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011876fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011877
11878cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011879#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011881ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11882"
11883if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11884 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011885else
Matthias Kloseb9621712010-04-24 17:59:49 +000011886 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011887fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011888
11889cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011890#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011891_ACEOF
11892
11893
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011894LIBS=$LIBS_SAVE
11895
Mark Dickinsona614f042009-11-28 12:48:43 +000011896# For multiprocessing module, check that sem_open
11897# actually works. For FreeBSD versions <= 7.2,
11898# the kernel module that provides POSIX semaphores
11899# isn't loaded by default, so an attempt to call
11900# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11902$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11903if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11904 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011905else
Matthias Kloseb9621712010-04-24 17:59:49 +000011906 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011907 ac_cv_posix_semaphores_enabled=yes
11908else
Matthias Kloseb9621712010-04-24 17:59:49 +000011909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011910/* end confdefs.h. */
11911
11912#include <unistd.h>
11913#include <fcntl.h>
11914#include <stdio.h>
11915#include <semaphore.h>
11916#include <sys/stat.h>
11917
11918int main(void) {
11919 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11920 if (a == SEM_FAILED) {
11921 perror("sem_open");
11922 return 1;
11923 }
11924 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011925 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011926 return 0;
11927}
11928
11929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011930if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011931 ac_cv_posix_semaphores_enabled=yes
11932else
Matthias Kloseb9621712010-04-24 17:59:49 +000011933 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011934fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11936 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011937fi
11938
11939
Mark Dickinsona614f042009-11-28 12:48:43 +000011940fi
11941
Matthias Kloseb9621712010-04-24 17:59:49 +000011942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11943$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011944if test $ac_cv_posix_semaphores_enabled = no
11945then
11946
Matthias Kloseb9621712010-04-24 17:59:49 +000011947$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011948
11949fi
11950
Mark Dickinson10683072009-04-18 21:18:19 +000011951# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11953$as_echo_n "checking for broken sem_getvalue... " >&6; }
11954if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11955 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011956else
Matthias Kloseb9621712010-04-24 17:59:49 +000011957 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011958 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000011959else
Matthias Kloseb9621712010-04-24 17:59:49 +000011960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011961/* end confdefs.h. */
11962
11963#include <unistd.h>
11964#include <fcntl.h>
11965#include <stdio.h>
11966#include <semaphore.h>
11967#include <sys/stat.h>
11968
11969int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000011970 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000011971 int count;
11972 int res;
11973 if(a==SEM_FAILED){
11974 perror("sem_open");
11975 return 1;
11976
11977 }
11978 res = sem_getvalue(a, &count);
11979 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011980 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000011981 return res==-1 ? 1 : 0;
11982}
11983
Mark Dickinson10683072009-04-18 21:18:19 +000011984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011985if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011986 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000011987else
Matthias Kloseb9621712010-04-24 17:59:49 +000011988 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011990rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11991 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011992fi
11993
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011994
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011995fi
11996
Matthias Kloseb9621712010-04-24 17:59:49 +000011997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
11998$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011999if test $ac_cv_broken_sem_getvalue = yes
12000then
12001
Matthias Kloseb9621712010-04-24 17:59:49 +000012002$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012003
12004fi
12005
Mark Dickinsonbd792642009-03-18 20:06:12 +000012006# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12008$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012009# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012010if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012011 enableval=$enable_big_digits; case $enable_big_digits in
12012yes)
12013 enable_big_digits=30 ;;
12014no)
12015 enable_big_digits=15 ;;
1201615|30)
12017 ;;
12018*)
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012019 as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
Mark Dickinsonbd792642009-03-18 20:06:12 +000012020esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12022$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012023
12024cat >>confdefs.h <<_ACEOF
12025#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12026_ACEOF
12027
12028
12029else
Matthias Kloseb9621712010-04-24 17:59:49 +000012030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12031$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012032fi
12033
12034
Guido van Rossumef2255b2000-03-10 22:30:29 +000012035# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012036ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12037if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012038
12039
Matthias Kloseb9621712010-04-24 17:59:49 +000012040$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012041
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012042 wchar_h="yes"
12043
Guido van Rossumef2255b2000-03-10 22:30:29 +000012044else
Martin v. Löwis11437992002-04-12 09:54:03 +000012045 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012046
12047fi
12048
Michael W. Hudson54241132001-12-07 15:38:26 +000012049
Martin v. Löwis11437992002-04-12 09:54:03 +000012050
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012051# determine wchar_t size
12052if test "$wchar_h" = yes
12053then
Matthias Kloseb9621712010-04-24 17:59:49 +000012054 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012055# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12056# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12057# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12059$as_echo_n "checking size of wchar_t... " >&6; }
12060if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12061 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012062else
Matthias Kloseb9621712010-04-24 17:59:49 +000012063 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12064"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012065
Martin v. Löwis11437992002-04-12 09:54:03 +000012066else
Matthias Kloseb9621712010-04-24 17:59:49 +000012067 if test "$ac_cv_type_wchar_t" = yes; then
12068 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12069$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012070as_fn_error 77 "cannot compute sizeof (wchar_t)
12071See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012072 else
12073 ac_cv_sizeof_wchar_t=0
12074 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012076
Martin v. Löwis11437992002-04-12 09:54:03 +000012077fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12079$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012080
12081
12082
Martin v. Löwis11437992002-04-12 09:54:03 +000012083cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012084#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012085_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012086
Michael W. Hudson54241132001-12-07 15:38:26 +000012087
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012088fi
12089
Matthias Kloseb9621712010-04-24 17:59:49 +000012090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12091$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012092have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012094/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012095
12096#include <tcl.h>
12097#if TCL_UTF_MAX != 6
12098# error "NOT UCS4_TCL"
12099#endif
12100int
12101main ()
12102{
12103
12104 ;
12105 return 0;
12106}
12107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012108if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012109
12110
Matthias Kloseb9621712010-04-24 17:59:49 +000012111$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012112
12113 have_ucs4_tcl=yes
12114
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12118$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012119
Skip Montanaro6dead952003-09-25 14:50:04 +000012120# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012121if test "$wchar_h" = yes
12122then
12123 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12125$as_echo_n "checking whether wchar_t is signed... " >&6; }
12126 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12127 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012128else
12129
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012131 ac_cv_wchar_t_signed=yes
12132else
Matthias Kloseb9621712010-04-24 17:59:49 +000012133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012134/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012135
12136 #include <wchar.h>
12137 int main()
12138 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012139 /* Success: exit code 0 */
12140 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012141 }
12142
12143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012144if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012145 ac_cv_wchar_t_signed=yes
12146else
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12150 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012151fi
12152
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012153fi
12154
Matthias Kloseb9621712010-04-24 17:59:49 +000012155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12156$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012157fi
12158
Matthias Kloseb9621712010-04-24 17:59:49 +000012159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12160$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012161
12162# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012163if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012164 withval=$with_wide_unicode;
12165if test "$withval" != no
12166then unicode_size="4"
12167else unicode_size="2"
12168fi
12169
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012170else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012171
Georg Brandl52d168a2008-01-07 18:10:24 +000012172case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012173 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012174 *) unicode_size="2" ;;
12175esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012176
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012177fi
12178
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012179
12180
Georg Brandl52d168a2008-01-07 18:10:24 +000012181case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012182 4)
12183 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12184
12185 SOABI_QUALIFIERS="${SOABI_QUALIFIERS}u"
12186 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012187 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012188 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012189esac
12190
Michael W. Hudson54241132001-12-07 15:38:26 +000012191
Martin v. Löwis11437992002-04-12 09:54:03 +000012192
Georg Brandl52d168a2008-01-07 18:10:24 +000012193# wchar_t is only usable if it maps to an unsigned type
12194if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012195 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012196then
12197 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012198
Matthias Kloseb9621712010-04-24 17:59:49 +000012199$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012200
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012202
Georg Brandl52d168a2008-01-07 18:10:24 +000012203elif test "$ac_cv_sizeof_short" = "$unicode_size"
12204then
12205 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012206 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012207
Georg Brandl52d168a2008-01-07 18:10:24 +000012208elif test "$ac_cv_sizeof_long" = "$unicode_size"
12209then
12210 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012211 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012212
Georg Brandl52d168a2008-01-07 18:10:24 +000012213else
12214 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12217$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012218
12219# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12221$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12222if test "${ac_cv_c_bigendian+set}" = set; then :
12223 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012224else
Matthias Kloseb9621712010-04-24 17:59:49 +000012225 ac_cv_c_bigendian=unknown
12226 # See if we're dealing with a universal compiler.
12227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12228/* end confdefs.h. */
12229#ifndef __APPLE_CC__
12230 not a universal capable compiler
12231 #endif
12232 typedef int dummy;
12233
Skip Montanaro6dead952003-09-25 14:50:04 +000012234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012235if ac_fn_c_try_compile "$LINENO"; then :
12236
12237 # Check for potential -arch flags. It is not universal unless
12238 # there are at least two -arch flags with different values.
12239 ac_arch=
12240 ac_prev=
12241 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12242 if test -n "$ac_prev"; then
12243 case $ac_word in
12244 i?86 | x86_64 | ppc | ppc64)
12245 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12246 ac_arch=$ac_word
12247 else
12248 ac_cv_c_bigendian=universal
12249 break
12250 fi
12251 ;;
12252 esac
12253 ac_prev=
12254 elif test "x$ac_word" = "x-arch"; then
12255 ac_prev=arch
12256 fi
12257 done
12258fi
12259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12260 if test $ac_cv_c_bigendian = unknown; then
12261 # See if sys/param.h defines the BYTE_ORDER macro.
12262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012263/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012264#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012265 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012266
Martin v. Löwis11437992002-04-12 09:54:03 +000012267int
12268main ()
12269{
Matthias Kloseb9621712010-04-24 17:59:49 +000012270#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12271 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12272 && LITTLE_ENDIAN)
12273 bogus endian macros
12274 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012275
12276 ;
12277 return 0;
12278}
12279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012280if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012281 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012283/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012284#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012285 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012286
Martin v. Löwis11437992002-04-12 09:54:03 +000012287int
12288main ()
12289{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012290#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012291 not big endian
12292 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012293
12294 ;
12295 return 0;
12296}
12297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012298if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012299 ac_cv_c_bigendian=yes
12300else
Matthias Kloseb9621712010-04-24 17:59:49 +000012301 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012304fi
12305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12306 fi
12307 if test $ac_cv_c_bigendian = unknown; then
12308 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012310/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012311#include <limits.h>
12312
Martin v. Löwis11437992002-04-12 09:54:03 +000012313int
12314main ()
12315{
Matthias Kloseb9621712010-04-24 17:59:49 +000012316#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12317 bogus endian macros
12318 #endif
12319
Martin v. Löwis11437992002-04-12 09:54:03 +000012320 ;
12321 return 0;
12322}
12323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012324if ac_fn_c_try_compile "$LINENO"; then :
12325 # It does; now see whether it defined to _BIG_ENDIAN or not.
12326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12327/* end confdefs.h. */
12328#include <limits.h>
12329
12330int
12331main ()
12332{
12333#ifndef _BIG_ENDIAN
12334 not big endian
12335 #endif
12336
12337 ;
12338 return 0;
12339}
12340_ACEOF
12341if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012342 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012343else
Matthias Kloseb9621712010-04-24 17:59:49 +000012344 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012345fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12347fi
12348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12349 fi
12350 if test $ac_cv_c_bigendian = unknown; then
12351 # Compile a test program.
12352 if test "$cross_compiling" = yes; then :
12353 # Try to guess by grepping values from an object file.
12354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12355/* end confdefs.h. */
12356short int ascii_mm[] =
12357 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12358 short int ascii_ii[] =
12359 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12360 int use_ascii (int i) {
12361 return ascii_mm[i] + ascii_ii[i];
12362 }
12363 short int ebcdic_ii[] =
12364 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12365 short int ebcdic_mm[] =
12366 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12367 int use_ebcdic (int i) {
12368 return ebcdic_mm[i] + ebcdic_ii[i];
12369 }
12370 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371
Matthias Kloseb9621712010-04-24 17:59:49 +000012372int
12373main ()
12374{
12375return use_ascii (foo) == use_ebcdic (foo);
12376 ;
12377 return 0;
12378}
12379_ACEOF
12380if ac_fn_c_try_compile "$LINENO"; then :
12381 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12382 ac_cv_c_bigendian=yes
12383 fi
12384 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12385 if test "$ac_cv_c_bigendian" = unknown; then
12386 ac_cv_c_bigendian=no
12387 else
12388 # finding both strings is unlikely to happen, but who knows?
12389 ac_cv_c_bigendian=unknown
12390 fi
12391 fi
12392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012394else
Matthias Kloseb9621712010-04-24 17:59:49 +000012395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012396/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012397$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012398int
12399main ()
12400{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012401
Matthias Kloseb9621712010-04-24 17:59:49 +000012402 /* Are we little or big endian? From Harbison&Steele. */
12403 union
12404 {
12405 long int l;
12406 char c[sizeof (long int)];
12407 } u;
12408 u.l = 1;
12409 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012410
12411 ;
12412 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012413}
Martin v. Löwis11437992002-04-12 09:54:03 +000012414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012415if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012416 ac_cv_c_bigendian=no
12417else
Matthias Kloseb9621712010-04-24 17:59:49 +000012418 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012419fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012420rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12421 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012423
Matthias Kloseb9621712010-04-24 17:59:49 +000012424 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12427$as_echo "$ac_cv_c_bigendian" >&6; }
12428 case $ac_cv_c_bigendian in #(
12429 yes)
12430 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12431;; #(
12432 no)
12433 ;; #(
12434 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012435
Matthias Kloseb9621712010-04-24 17:59:49 +000012436$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012437
Matthias Kloseb9621712010-04-24 17:59:49 +000012438 ;; #(
12439 *)
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012440 as_fn_error $? "unknown endianness
12441 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012442 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012443
Michael W. Hudson54241132001-12-07 15:38:26 +000012444
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012445# ABI version string for Python extension modules. This appears between the
12446# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12447# from the following attributes which affect the ABI of this Python build (in
12448# this order):
12449#
12450# * The Python implementation (always 'cpython-' for us)
12451# * The major and minor version numbers
12452# * --with-pydebug (adds a 'd')
12453# * --with-pymalloc (adds a 'm')
12454# * --with-wide-unicode (adds a 'u')
12455#
12456# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
12457# would get a shared library ABI version tag of 'cpython-32udm' and shared
12458# libraries would be named 'foo.cpython-32udm.so'.
12459
12460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12461$as_echo_n "checking SOABI... " >&6; }
12462SOABI='cpython-'`echo $VERSION | tr -d .`${SOABI_QUALIFIERS}
12463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12464$as_echo "$SOABI" >&6; }
12465
12466# SO is the extension of shared libraries `(including the dot!)
12467# -- usually .so, .sl on HP-UX, .dll on Cygwin
12468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12469$as_echo_n "checking SO... " >&6; }
12470if test -z "$SO"
12471then
12472 case $ac_sys_system in
12473 hp*|HP*)
12474 case `uname -m` in
12475 ia64) SO=.so;;
12476 *) SO=.sl;;
12477 esac
12478 ;;
12479 CYGWIN*) SO=.dll;;
12480 Linux*) SO=.${SOABI}.so;;
12481 *) SO=.so;;
12482 esac
12483else
12484 # this might also be a termcap variable, see #610332
12485 echo
12486 echo '====================================================================='
12487 echo '+ +'
12488 echo '+ WARNING: You have set SO in your environment. +'
12489 echo '+ Do you really mean to change the extension for shared libraries? +'
12490 echo '+ Continuing in 10 seconds to let you to ponder. +'
12491 echo '+ +'
12492 echo '====================================================================='
12493 sleep 10
12494fi
12495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12496$as_echo "$SO" >&6; }
12497
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012498# Check whether right shifting a negative integer extends the sign bit
12499# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12501$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12502if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12503 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012504else
Martin v. Löwis11437992002-04-12 09:54:03 +000012505
Matthias Kloseb9621712010-04-24 17:59:49 +000012506if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012507 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012508else
Matthias Kloseb9621712010-04-24 17:59:49 +000012509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012510/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012511
12512int main()
12513{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012514 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012515}
12516
Martin v. Löwis11437992002-04-12 09:54:03 +000012517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012518if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012519 ac_cv_rshift_extends_sign=yes
12520else
Matthias Kloseb9621712010-04-24 17:59:49 +000012521 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12524 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012525fi
12526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012527fi
12528
Matthias Kloseb9621712010-04-24 17:59:49 +000012529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12530$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012531if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012532then
Martin v. Löwis11437992002-04-12 09:54:03 +000012533
Matthias Kloseb9621712010-04-24 17:59:49 +000012534$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012535
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012536fi
12537
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012538# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12540$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12541if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12542 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012543else
Martin v. Löwis11437992002-04-12 09:54:03 +000012544
Matthias Kloseb9621712010-04-24 17:59:49 +000012545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012546/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012547#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012548int
12549main ()
12550{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012551
12552 FILE *f = fopen("/dev/null", "r");
12553 flockfile(f);
12554 getc_unlocked(f);
12555 funlockfile(f);
12556
Martin v. Löwis11437992002-04-12 09:54:03 +000012557 ;
12558 return 0;
12559}
12560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012561if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012562 ac_cv_have_getc_unlocked=yes
12563else
Matthias Kloseb9621712010-04-24 17:59:49 +000012564 ac_cv_have_getc_unlocked=no
12565fi
12566rm -f core conftest.err conftest.$ac_objext \
12567 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012569
Matthias Kloseb9621712010-04-24 17:59:49 +000012570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12571$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012572if test "$ac_cv_have_getc_unlocked" = yes
12573then
Martin v. Löwis11437992002-04-12 09:54:03 +000012574
Matthias Kloseb9621712010-04-24 17:59:49 +000012575$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012576
12577fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012578
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012579# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012580# save the value of LIBS so we don't actually link Python with readline
12581LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012582
Gregory P. Smith18820942008-09-07 06:24:49 +000012583# On some systems we need to link readline to a termcap compatible
12584# library. NOTE: Keep the precedence of listed libraries synchronised
12585# with setup.py.
12586py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12588$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012589for py_libtermcap in "" ncursesw ncurses curses termcap; do
12590 if test -z "$py_libtermcap"; then
12591 READLINE_LIBS="-lreadline"
12592 else
12593 READLINE_LIBS="-lreadline -l$py_libtermcap"
12594 fi
12595 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012597/* end confdefs.h. */
12598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599/* Override any GCC internal prototype to avoid an error.
12600 Use char because int might match the return type of a GCC
12601 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012602#ifdef __cplusplus
12603extern "C"
12604#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012605char readline ();
12606int
12607main ()
12608{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012609return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012610 ;
12611 return 0;
12612}
12613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012614if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012615 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012616fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012617rm -f core conftest.err conftest.$ac_objext \
12618 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012619 if test $py_cv_lib_readline = yes; then
12620 break
12621 fi
12622done
12623# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12624#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012625if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12627$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012628else
Matthias Kloseb9621712010-04-24 17:59:49 +000012629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12630$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012631
Matthias Kloseb9621712010-04-24 17:59:49 +000012632$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012633
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012634fi
12635
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012636# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12638$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12639if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12640 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012641else
12642 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012643LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012645/* end confdefs.h. */
12646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012647/* Override any GCC internal prototype to avoid an error.
12648 Use char because int might match the return type of a GCC
12649 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012650#ifdef __cplusplus
12651extern "C"
12652#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012653char rl_callback_handler_install ();
12654int
12655main ()
12656{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012657return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012658 ;
12659 return 0;
12660}
12661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012662if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012663 ac_cv_lib_readline_rl_callback_handler_install=yes
12664else
Matthias Kloseb9621712010-04-24 17:59:49 +000012665 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012666fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012667rm -f core conftest.err conftest.$ac_objext \
12668 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012669LIBS=$ac_check_lib_save_LIBS
12670fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12672$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12673if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012674
Matthias Kloseb9621712010-04-24 17:59:49 +000012675$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012676
12677fi
12678
12679
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012680# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012682/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012683#include <readline/readline.h>
12684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012685if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012686 have_readline=yes
12687else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012688 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012689
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012690fi
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012691rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012692if test $have_readline = yes
12693then
Matthias Kloseb9621712010-04-24 17:59:49 +000012694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012695/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012696#include <readline/readline.h>
12697
12698_ACEOF
12699if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012700 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012701
Matthias Kloseb9621712010-04-24 17:59:49 +000012702$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012703
12704fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012705rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012706
Matthias Kloseb9621712010-04-24 17:59:49 +000012707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012708/* end confdefs.h. */
12709#include <readline/readline.h>
12710
12711_ACEOF
12712if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012713 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012714
Matthias Kloseb9621712010-04-24 17:59:49 +000012715$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012716
12717fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012718rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012719
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012720fi
12721
Martin v. Löwis0daad592001-09-30 21:09:59 +000012722# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12724$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12725if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12726 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012727else
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012729LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012733/* Override any GCC internal prototype to avoid an error.
12734 Use char because int might match the return type of a GCC
12735 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012736#ifdef __cplusplus
12737extern "C"
12738#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012739char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012740int
12741main ()
12742{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012743return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012744 ;
12745 return 0;
12746}
12747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012748if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012749 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012750else
Matthias Kloseb9621712010-04-24 17:59:49 +000012751 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012753rm -f core conftest.err conftest.$ac_objext \
12754 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012755LIBS=$ac_check_lib_save_LIBS
12756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12758$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12759if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012760
Matthias Kloseb9621712010-04-24 17:59:49 +000012761$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012762
Martin v. Löwis0daad592001-09-30 21:09:59 +000012763fi
12764
Michael W. Hudson54241132001-12-07 15:38:26 +000012765
Thomas Wouters89d996e2007-09-08 17:39:28 +000012766# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12768$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12769if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12770 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012771else
12772 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012773LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012775/* end confdefs.h. */
12776
12777/* Override any GCC internal prototype to avoid an error.
12778 Use char because int might match the return type of a GCC
12779 builtin and then its argument prototype would still apply. */
12780#ifdef __cplusplus
12781extern "C"
12782#endif
12783char rl_completion_display_matches_hook ();
12784int
12785main ()
12786{
12787return rl_completion_display_matches_hook ();
12788 ;
12789 return 0;
12790}
12791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012792if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012793 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12794else
Matthias Kloseb9621712010-04-24 17:59:49 +000012795 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012797rm -f core conftest.err conftest.$ac_objext \
12798 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012799LIBS=$ac_check_lib_save_LIBS
12800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12802$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12803if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012804
Matthias Kloseb9621712010-04-24 17:59:49 +000012805$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012806
12807fi
12808
12809
Martin v. Löwis0daad592001-09-30 21:09:59 +000012810# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12812$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12813if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12814 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012815else
Martin v. Löwis11437992002-04-12 09:54:03 +000012816 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012817LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012821/* Override any GCC internal prototype to avoid an error.
12822 Use char because int might match the return type of a GCC
12823 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012824#ifdef __cplusplus
12825extern "C"
12826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012827char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012828int
12829main ()
12830{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012831return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012832 ;
12833 return 0;
12834}
12835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012836if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012837 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012838else
Matthias Kloseb9621712010-04-24 17:59:49 +000012839 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012841rm -f core conftest.err conftest.$ac_objext \
12842 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012843LIBS=$ac_check_lib_save_LIBS
12844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12846$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12847if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012848
Matthias Kloseb9621712010-04-24 17:59:49 +000012849$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012850
Guido van Rossum353ae582001-07-10 16:45:32 +000012851fi
12852
Jack Jansendd19cf82001-12-06 22:36:17 +000012853
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012854# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012856/* end confdefs.h. */
12857#include <readline/readline.h>
12858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012859if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012860 have_readline=yes
12861else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012862 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012863
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012864fi
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012865rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012866if test $have_readline = yes
12867then
Matthias Kloseb9621712010-04-24 17:59:49 +000012868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012869/* end confdefs.h. */
12870#include <readline/readline.h>
12871
12872_ACEOF
12873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012874 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012875
Matthias Kloseb9621712010-04-24 17:59:49 +000012876$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012877
12878fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012879rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012880
12881fi
12882
Martin v. Löwis82bca632006-02-10 20:49:30 +000012883# End of readline checks: restore LIBS
12884LIBS=$LIBS_no_readline
12885
Matthias Kloseb9621712010-04-24 17:59:49 +000012886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12887$as_echo_n "checking for broken nice()... " >&6; }
12888if test "${ac_cv_broken_nice+set}" = set; then :
12889 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012890else
Martin v. Löwis11437992002-04-12 09:54:03 +000012891
Matthias Kloseb9621712010-04-24 17:59:49 +000012892if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012893 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012894else
Matthias Kloseb9621712010-04-24 17:59:49 +000012895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012896/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012897
12898int main()
12899{
12900 int val1 = nice(1);
12901 if (val1 != -1 && val1 == nice(2))
12902 exit(0);
12903 exit(1);
12904}
12905
Martin v. Löwis11437992002-04-12 09:54:03 +000012906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012907if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012908 ac_cv_broken_nice=yes
12909else
Matthias Kloseb9621712010-04-24 17:59:49 +000012910 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012912rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12913 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012914fi
12915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012916fi
12917
Matthias Kloseb9621712010-04-24 17:59:49 +000012918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12919$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012920if test "$ac_cv_broken_nice" = yes
12921then
Martin v. Löwis11437992002-04-12 09:54:03 +000012922
Matthias Kloseb9621712010-04-24 17:59:49 +000012923$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012924
12925fi
12926
Matthias Kloseb9621712010-04-24 17:59:49 +000012927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12928$as_echo_n "checking for broken poll()... " >&6; }
12929if test "${ac_cv_broken_poll+set}" = set; then :
12930 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012931else
Matthias Kloseb9621712010-04-24 17:59:49 +000012932 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012933 ac_cv_broken_poll=no
12934else
Matthias Kloseb9621712010-04-24 17:59:49 +000012935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012936/* end confdefs.h. */
12937
12938#include <poll.h>
12939
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012940int main()
12941{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012942 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012943 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012944
12945 close (42);
12946
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012947 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012948 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012949 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012950 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012951 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012952 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012953 return 1;
12954}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012955
12956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012957if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012958 ac_cv_broken_poll=yes
12959else
Matthias Kloseb9621712010-04-24 17:59:49 +000012960 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012961fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12963 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012965
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012966fi
12967
Matthias Kloseb9621712010-04-24 17:59:49 +000012968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
12969$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012970if test "$ac_cv_broken_poll" = yes
12971then
12972
Matthias Kloseb9621712010-04-24 17:59:49 +000012973$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012974
12975fi
12976
Brett Cannon43802422005-02-10 20:48:03 +000012977# 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 +000012978# (which is not required by ISO C or UNIX spec) and/or if we support
12979# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000012980ac_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 +000012981#include <$ac_cv_struct_tm>
12982
Matthias Kloseb9621712010-04-24 17:59:49 +000012983"
12984if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000012985
12986cat >>confdefs.h <<_ACEOF
12987#define HAVE_STRUCT_TM_TM_ZONE 1
12988_ACEOF
12989
12990
12991fi
12992
12993if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12994
Matthias Kloseb9621712010-04-24 17:59:49 +000012995$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012996
12997else
Matthias Kloseb9621712010-04-24 17:59:49 +000012998 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12999"
13000if test "x$ac_cv_have_decl_tzname" = x""yes; then :
13001 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013002else
Matthias Kloseb9621712010-04-24 17:59:49 +000013003 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013004fi
13005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013006cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013007#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013008_ACEOF
13009
Matthias Kloseb9621712010-04-24 17:59:49 +000013010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13011$as_echo_n "checking for tzname... " >&6; }
13012if test "${ac_cv_var_tzname+set}" = set; then :
13013 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013014else
Matthias Kloseb9621712010-04-24 17:59:49 +000013015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013016/* end confdefs.h. */
13017#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013018#if !HAVE_DECL_TZNAME
13019extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013020#endif
13021
13022int
13023main ()
13024{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013025return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013026 ;
13027 return 0;
13028}
13029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013030if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013031 ac_cv_var_tzname=yes
13032else
Matthias Kloseb9621712010-04-24 17:59:49 +000013033 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013035rm -f core conftest.err conftest.$ac_objext \
13036 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013037fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13039$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013040 if test $ac_cv_var_tzname = yes; then
13041
Matthias Kloseb9621712010-04-24 17:59:49 +000013042$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013043
13044 fi
13045fi
13046
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013047
Martin v. Löwis1d459062005-03-14 21:23:33 +000013048# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13050$as_echo_n "checking for working tzset()... " >&6; }
13051if test "${ac_cv_working_tzset+set}" = set; then :
13052 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013053else
13054
Matthias Kloseb9621712010-04-24 17:59:49 +000013055if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013056 ac_cv_working_tzset=no
13057else
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013059/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013060
13061#include <stdlib.h>
13062#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013063#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013064
13065#if HAVE_TZNAME
13066extern char *tzname[];
13067#endif
13068
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013069int main()
13070{
Brett Cannon18367812003-09-19 00:59:16 +000013071 /* Note that we need to ensure that not only does tzset(3)
13072 do 'something' with localtime, but it works as documented
13073 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013074 This includes making sure that tzname is set properly if
13075 tm->tm_zone does not exist since it is the alternative way
13076 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013077
13078 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013079 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013080 */
13081
Martin v. Löwis1d459062005-03-14 21:23:33 +000013082 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013083 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13084
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013085 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013086 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013087 if (localtime(&groundhogday)->tm_hour != 0)
13088 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013089#if HAVE_TZNAME
13090 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13091 if (strcmp(tzname[0], "UTC") ||
13092 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13093 exit(1);
13094#endif
Brett Cannon18367812003-09-19 00:59:16 +000013095
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013096 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013097 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013098 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013099 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013100#if HAVE_TZNAME
13101 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13102 exit(1);
13103#endif
Brett Cannon18367812003-09-19 00:59:16 +000013104
13105 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13106 tzset();
13107 if (localtime(&groundhogday)->tm_hour != 11)
13108 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013109#if HAVE_TZNAME
13110 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13111 exit(1);
13112#endif
13113
13114#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013115 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13116 exit(1);
13117 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13118 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013119#endif
Brett Cannon18367812003-09-19 00:59:16 +000013120
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013121 exit(0);
13122}
13123
13124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013125if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013126 ac_cv_working_tzset=yes
13127else
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13131 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013132fi
13133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013134fi
13135
Matthias Kloseb9621712010-04-24 17:59:49 +000013136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13137$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013138if test "$ac_cv_working_tzset" = yes
13139then
13140
Matthias Kloseb9621712010-04-24 17:59:49 +000013141$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013142
13143fi
13144
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013145# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13147$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13148if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13149 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013150else
Matthias Kloseb9621712010-04-24 17:59:49 +000013151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013152/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013153#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013154int
13155main ()
13156{
13157
13158struct stat st;
13159st.st_mtim.tv_nsec = 1;
13160
13161 ;
13162 return 0;
13163}
13164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013165if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013166 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013167else
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13171fi
13172
Matthias Kloseb9621712010-04-24 17:59:49 +000013173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13174$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013175if test "$ac_cv_stat_tv_nsec" = yes
13176then
13177
Matthias Kloseb9621712010-04-24 17:59:49 +000013178$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013179
13180fi
13181
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013182# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13184$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13185if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13186 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013187else
Matthias Kloseb9621712010-04-24 17:59:49 +000013188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013189/* end confdefs.h. */
13190#include <sys/stat.h>
13191int
13192main ()
13193{
13194
13195struct stat st;
13196st.st_mtimespec.tv_nsec = 1;
13197
13198 ;
13199 return 0;
13200}
13201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013202if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013203 ac_cv_stat_tv_nsec2=yes
13204else
Matthias Kloseb9621712010-04-24 17:59:49 +000013205 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13208fi
13209
Matthias Kloseb9621712010-04-24 17:59:49 +000013210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13211$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013212if test "$ac_cv_stat_tv_nsec2" = yes
13213then
13214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013216
13217fi
13218
Jack Jansen666b1e72001-10-31 12:11:48 +000013219# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13221$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13222if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13223 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013224else
Matthias Kloseb9621712010-04-24 17:59:49 +000013225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013226/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013227#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013228int
13229main ()
13230{
Jack Jansen666b1e72001-10-31 12:11:48 +000013231
13232 int rtn;
13233 rtn = mvwdelch(0,0,0);
13234
Martin v. Löwis11437992002-04-12 09:54:03 +000013235 ;
13236 return 0;
13237}
13238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013239if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013240 ac_cv_mvwdelch_is_expression=yes
13241else
Matthias Kloseb9621712010-04-24 17:59:49 +000013242 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13245fi
13246
Matthias Kloseb9621712010-04-24 17:59:49 +000013247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13248$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013249
13250if test "$ac_cv_mvwdelch_is_expression" = yes
13251then
Martin v. Löwis11437992002-04-12 09:54:03 +000013252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013254
13255fi
13256
Matthias Kloseb9621712010-04-24 17:59:49 +000013257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13258$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13259if test "${ac_cv_window_has_flags+set}" = set; then :
13260 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013261else
Matthias Kloseb9621712010-04-24 17:59:49 +000013262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013263/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013264#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013265int
13266main ()
13267{
Jack Jansen666b1e72001-10-31 12:11:48 +000013268
13269 WINDOW *w;
13270 w->_flags = 0;
13271
Martin v. Löwis11437992002-04-12 09:54:03 +000013272 ;
13273 return 0;
13274}
13275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013276if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013277 ac_cv_window_has_flags=yes
13278else
Matthias Kloseb9621712010-04-24 17:59:49 +000013279 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13282fi
13283
Matthias Kloseb9621712010-04-24 17:59:49 +000013284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13285$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013286
Jack Jansen666b1e72001-10-31 12:11:48 +000013287
13288if test "$ac_cv_window_has_flags" = yes
13289then
Martin v. Löwis11437992002-04-12 09:54:03 +000013290
Matthias Kloseb9621712010-04-24 17:59:49 +000013291$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013292
13293fi
13294
Matthias Kloseb9621712010-04-24 17:59:49 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13296$as_echo_n "checking for is_term_resized... " >&6; }
13297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013298/* end confdefs.h. */
13299#include <curses.h>
13300int
13301main ()
13302{
13303void *x=is_term_resized
13304 ;
13305 return 0;
13306}
13307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013308if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013309
Matthias Kloseb9621712010-04-24 17:59:49 +000013310$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013311
Matthias Kloseb159a552010-04-25 21:00:44 +000013312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013313$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013314else
Matthias Kloseb9621712010-04-24 17:59:49 +000013315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13316$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013317
13318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13320
Matthias Kloseb9621712010-04-24 17:59:49 +000013321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13322$as_echo_n "checking for resize_term... " >&6; }
13323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013324/* end confdefs.h. */
13325#include <curses.h>
13326int
13327main ()
13328{
13329void *x=resize_term
13330 ;
13331 return 0;
13332}
13333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013334if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013335
Matthias Kloseb9621712010-04-24 17:59:49 +000013336$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013337
Matthias Kloseb159a552010-04-25 21:00:44 +000013338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013339$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013340else
Matthias Kloseb9621712010-04-24 17:59:49 +000013341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13342$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013343
13344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13346
Matthias Kloseb9621712010-04-24 17:59:49 +000013347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13348$as_echo_n "checking for resizeterm... " >&6; }
13349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013350/* end confdefs.h. */
13351#include <curses.h>
13352int
13353main ()
13354{
13355void *x=resizeterm
13356 ;
13357 return 0;
13358}
13359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013360if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013361
Matthias Kloseb9621712010-04-24 17:59:49 +000013362$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013363
Matthias Kloseb159a552010-04-25 21:00:44 +000013364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013365$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013366else
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13368$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013369
13370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13372
Matthias Kloseb9621712010-04-24 17:59:49 +000013373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13374$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013375
13376if test -r /dev/ptmx
13377then
Matthias Kloseb9621712010-04-24 17:59:49 +000013378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13379$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013382
Thomas Wouters89f507f2006-12-13 04:49:30 +000013383else
Matthias Kloseb9621712010-04-24 17:59:49 +000013384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13385$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013386fi
13387
Matthias Kloseb9621712010-04-24 17:59:49 +000013388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13389$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013390
13391if test -r /dev/ptc
13392then
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13394$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013395
Matthias Kloseb9621712010-04-24 17:59:49 +000013396$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013397
Thomas Wouters89f507f2006-12-13 04:49:30 +000013398else
Matthias Kloseb9621712010-04-24 17:59:49 +000013399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13400$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013401fi
13402
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013403if test "$have_long_long" = yes
13404then
Matthias Kloseb9621712010-04-24 17:59:49 +000013405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13406$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13407 if test "${ac_cv_have_long_long_format+set}" = set; then :
13408 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013409else
Matthias Kloseb9621712010-04-24 17:59:49 +000013410 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013411 ac_cv_have_long_long_format=no
13412else
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013414/* end confdefs.h. */
13415
13416 #include <stdio.h>
13417 #include <stddef.h>
13418 #include <string.h>
13419
13420 #ifdef HAVE_SYS_TYPES_H
13421 #include <sys/types.h>
13422 #endif
13423
13424 int main()
13425 {
13426 char buffer[256];
13427
13428 if (sprintf(buffer, "%lld", (long long)123) < 0)
13429 return 1;
13430 if (strcmp(buffer, "123"))
13431 return 1;
13432
13433 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13434 return 1;
13435 if (strcmp(buffer, "-123"))
13436 return 1;
13437
13438 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13439 return 1;
13440 if (strcmp(buffer, "123"))
13441 return 1;
13442
13443 return 0;
13444 }
13445
13446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013447if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013448 ac_cv_have_long_long_format=yes
13449else
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013451fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13453 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013454fi
13455
13456
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013457fi
13458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13460$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013461fi
13462
Mark Dickinson89d7d412009-12-31 20:50:59 +000013463if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013464then
13465
Matthias Kloseb9621712010-04-24 17:59:49 +000013466$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013467
13468fi
13469
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013470if test $ac_sys_system = Darwin
13471then
13472 LIBS="$LIBS -framework CoreFoundation"
13473fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013474
Matthias Kloseb9621712010-04-24 17:59:49 +000013475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13476$as_echo_n "checking for %zd printf() format support... " >&6; }
13477if test "${ac_cv_have_size_t_format+set}" = set; then :
13478 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013479else
Matthias Kloseb9621712010-04-24 17:59:49 +000013480 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013481 ac_cv_have_size_t_format="cross -- assuming yes"
13482
Thomas Wouters477c8d52006-05-27 19:21:47 +000013483else
Matthias Kloseb9621712010-04-24 17:59:49 +000013484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013485/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013486
Thomas Wouters477c8d52006-05-27 19:21:47 +000013487#include <stdio.h>
13488#include <stddef.h>
13489#include <string.h>
13490
Christian Heimes2c181612007-12-17 20:04:13 +000013491#ifdef HAVE_SYS_TYPES_H
13492#include <sys/types.h>
13493#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013494
13495#ifdef HAVE_SSIZE_T
13496typedef ssize_t Py_ssize_t;
13497#elif SIZEOF_VOID_P == SIZEOF_LONG
13498typedef long Py_ssize_t;
13499#else
13500typedef int Py_ssize_t;
13501#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013502
Christian Heimes2c181612007-12-17 20:04:13 +000013503int main()
13504{
13505 char buffer[256];
13506
Thomas Wouters477c8d52006-05-27 19:21:47 +000013507 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13508 return 1;
13509
Thomas Wouters89f507f2006-12-13 04:49:30 +000013510 if (strcmp(buffer, "123"))
13511 return 1;
13512
13513 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13514 return 1;
13515
13516 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013517 return 1;
13518
13519 return 0;
13520}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013521
Thomas Wouters477c8d52006-05-27 19:21:47 +000013522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013523if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013524 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013525else
Matthias Kloseb9621712010-04-24 17:59:49 +000013526 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013528rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13529 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013530fi
13531
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13534$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013535if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013536
Matthias Kloseb9621712010-04-24 17:59:49 +000013537$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013538
13539fi
13540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013542#ifdef HAVE_SYS_TYPES_H
13543#include <sys/types.h>
13544#endif
13545#ifdef HAVE_SYS_SOCKET_H
13546#include <sys/socket.h>
13547#endif
13548
Matthias Kloseb9621712010-04-24 17:59:49 +000013549"
13550if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013551
Martin v. Löwis11437992002-04-12 09:54:03 +000013552else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013553
Matthias Kloseb9621712010-04-24 17:59:49 +000013554$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013555
13556fi
13557
Michael W. Hudson54241132001-12-07 15:38:26 +000013558
Matthias Kloseb9621712010-04-24 17:59:49 +000013559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13560$as_echo_n "checking for broken mbstowcs... " >&6; }
13561if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13562 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013563else
Matthias Kloseb9621712010-04-24 17:59:49 +000013564 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013565 ac_cv_broken_mbstowcs=no
13566else
Matthias Kloseb9621712010-04-24 17:59:49 +000013567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013568/* end confdefs.h. */
13569
13570#include<stdlib.h>
13571int main() {
13572 size_t len = -1;
13573 const char *str = "text";
13574 len = mbstowcs(NULL, str, 0);
13575 return (len != 4);
13576}
13577
13578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013579if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013580 ac_cv_broken_mbstowcs=no
13581else
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13585 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013586fi
13587
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013588fi
13589
Matthias Kloseb9621712010-04-24 17:59:49 +000013590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13591$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013592if test "$ac_cv_broken_mbstowcs" = yes
13593then
13594
Matthias Kloseb9621712010-04-24 17:59:49 +000013595$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013596
13597fi
13598
Antoine Pitrou042b1282010-08-13 21:15:58 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13600$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
13601if test "${ac_cv_computed_gotos+set}" = set; then :
13602 $as_echo_n "(cached) " >&6
13603else
13604 if test "$cross_compiling" = yes; then :
13605 ac_cv_computed_gotos=no
13606else
13607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13608/* end confdefs.h. */
13609
13610int main(int argc, char **argv)
13611{
13612 static void *targets[1] = { &&LABEL1 };
13613 goto LABEL2;
13614LABEL1:
13615 return 0;
13616LABEL2:
13617 goto *targets[0];
13618 return 1;
13619}
13620
13621_ACEOF
13622if ac_fn_c_try_run "$LINENO"; then :
13623 ac_cv_computed_gotos=yes
13624else
13625 ac_cv_computed_gotos=no
13626fi
13627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13628 conftest.$ac_objext conftest.beam conftest.$ac_ext
13629fi
13630
13631fi
13632
13633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13634$as_echo "$ac_cv_computed_gotos" >&6; }
13635if test "$ac_cv_computed_gotos" = yes
13636then
13637
13638$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13639
13640fi
13641
Antoine Pitroub52ec782009-01-25 16:34:23 +000013642# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13644$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013645
13646# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013647if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013648 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013649if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013650then
13651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013653
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13655$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013656fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013657if test "$withval" = no
13658then
13659
13660$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13661
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13663$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013664fi
13665
Antoine Pitrou042b1282010-08-13 21:15:58 +000013666else
13667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13668$as_echo "no value specified" >&6; }
13669fi
13670
Antoine Pitroub52ec782009-01-25 16:34:23 +000013671
13672
Michael W. Hudson54241132001-12-07 15:38:26 +000013673
Jesus Cea6a792292010-05-03 21:18:48 +000013674case $ac_sys_system in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013675 OSF*) as_fn_error $? "OSF* systems are deprecated unless somebody volunteers. Check http://bugs.python.org/issue8606" "$LINENO" 5 ;;
Jesus Cea6a792292010-05-03 21:18:48 +000013676esac
13677
13678
13679
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013680
13681
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013682for h in `(cd $srcdir;echo Python/thread_*.h)`
13683do
13684 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13685done
13686
Michael W. Hudson54241132001-12-07 15:38:26 +000013687
Neal Norwitzd24499d2005-12-18 21:36:39 +000013688SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13690$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013691for dir in $SRCDIRS; do
13692 if test ! -d $dir; then
13693 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013694 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013695done
Matthias Kloseb9621712010-04-24 17:59:49 +000013696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13697$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013698
Guido van Rossum627b2d71993-12-24 10:39:16 +000013699# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013700ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013701
Martin v. Löwis11437992002-04-12 09:54:03 +000013702cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013703# This file is a shell script that caches the results of configure
13704# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013705# scripts and configure runs, see configure's option --config-cache.
13706# It is not useful on other systems. If it contains results you don't
13707# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013708#
Martin v. Löwis11437992002-04-12 09:54:03 +000013709# config.status only pays attention to the cache file if you give it
13710# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013711#
Skip Montanaro6dead952003-09-25 14:50:04 +000013712# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013713# loading this file, other *unset* `ac_cv_foo' will be assigned the
13714# following values.
13715
13716_ACEOF
13717
Guido van Rossumf78abae1997-01-21 22:02:36 +000013718# The following way of writing the cache mishandles newlines in values,
13719# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013720# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013721# Ultrix sh set writes to stderr and can't be redirected directly,
13722# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013723(
13724 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13725 eval ac_val=\$$ac_var
13726 case $ac_val in #(
13727 *${as_nl}*)
13728 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013729 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13730$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013731 esac
13732 case $ac_var in #(
13733 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013734 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13735 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013736 esac ;;
13737 esac
13738 done
13739
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013741 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13742 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 # `set' does not quote correctly, so add quotes: double-quote
13744 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013745 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013746 "s/'/'\\\\''/g;
13747 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013748 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013749 *)
13750 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013751 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013752 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013753 esac |
13754 sort
13755) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013756 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013757 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013758 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013759 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13761 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013762 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13763 :end' >>confcache
13764if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13765 if test -w "$cache_file"; then
13766 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013767 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13768$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013769 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013770 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013771 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13772$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013773 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013774fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013775rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013776
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013777test "x$prefix" = xNONE && prefix=$ac_default_prefix
13778# Let make expand exec_prefix.
13779test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013780
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013781DEFS=-DHAVE_CONFIG_H
13782
Skip Montanaro6dead952003-09-25 14:50:04 +000013783ac_libobjs=
13784ac_ltlibobjs=
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013785U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013786for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13787 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013788 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013789 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013790 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13791 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013792 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13793 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013794done
13795LIBOBJS=$ac_libobjs
13796
13797LTLIBOBJS=$ac_ltlibobjs
13798
13799
Martin v. Löwis11437992002-04-12 09:54:03 +000013800
Matthias Kloseb9621712010-04-24 17:59:49 +000013801
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013802: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013803ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013804ac_clean_files_save=$ac_clean_files
13805ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013806{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13807$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13808as_write_fail=0
13809cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013810#! $SHELL
13811# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013812# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013813# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013814# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013815
Martin v. Löwis11437992002-04-12 09:54:03 +000013816debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013817ac_cs_recheck=false
13818ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013819
Matthias Kloseb9621712010-04-24 17:59:49 +000013820SHELL=\${CONFIG_SHELL-$SHELL}
13821export SHELL
13822_ASEOF
13823cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13824## -------------------- ##
13825## M4sh Initialization. ##
13826## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013828# Be more Bourne compatible
13829DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013830if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013831 emulate sh
13832 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013833 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013834 # is contrary to our usage. Disable this feature.
13835 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013836 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013837else
Matthias Kloseb9621712010-04-24 17:59:49 +000013838 case `(set -o) 2>/dev/null` in #(
13839 *posix*) :
13840 set -o posix ;; #(
13841 *) :
13842 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013843esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013844fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013845
13846
Matthias Kloseb9621712010-04-24 17:59:49 +000013847as_nl='
13848'
13849export as_nl
13850# Printing a long string crashes Solaris 7 /usr/bin/printf.
13851as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13852as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13853as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13854# Prefer a ksh shell builtin over an external printf program on Solaris,
13855# but without wasting forks for bash or zsh.
13856if test -z "$BASH_VERSION$ZSH_VERSION" \
13857 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13858 as_echo='print -r --'
13859 as_echo_n='print -rn --'
13860elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13861 as_echo='printf %s\n'
13862 as_echo_n='printf %s'
13863else
13864 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13865 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13866 as_echo_n='/usr/ucb/echo -n'
13867 else
13868 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13869 as_echo_n_body='eval
13870 arg=$1;
13871 case $arg in #(
13872 *"$as_nl"*)
13873 expr "X$arg" : "X\\(.*\\)$as_nl";
13874 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13875 esac;
13876 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13877 '
13878 export as_echo_n_body
13879 as_echo_n='sh -c $as_echo_n_body as_echo'
13880 fi
13881 export as_echo_body
13882 as_echo='sh -c $as_echo_body as_echo'
13883fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013884
13885# The user is always right.
13886if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013887 PATH_SEPARATOR=:
13888 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13889 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13890 PATH_SEPARATOR=';'
13891 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013893
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013894
13895# IFS
13896# We need space, tab and new line, in precisely that order. Quoting is
13897# there to prevent editors from complaining about space-tab.
13898# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13899# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900IFS=" "" $as_nl"
13901
13902# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013903case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013904 *[\\/]* ) as_myself=$0 ;;
13905 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013906for as_dir in $PATH
13907do
13908 IFS=$as_save_IFS
13909 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013910 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13911 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013912IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013913
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013914 ;;
13915esac
13916# We did not find ourselves, most probably we were run as `sh COMMAND'
13917# in which case we are not to be found in the path.
13918if test "x$as_myself" = x; then
13919 as_myself=$0
13920fi
13921if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013922 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13923 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013924fi
13925
Matthias Kloseb9621712010-04-24 17:59:49 +000013926# Unset variables that we do not need and which cause bugs (e.g. in
13927# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13928# suppresses any "Segmentation fault" message there. '((' could
13929# trigger a bug in pdksh 5.2.14.
13930for as_var in BASH_ENV ENV MAIL MAILPATH
13931do eval test x\${$as_var+set} = xset \
13932 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013933done
13934PS1='$ '
13935PS2='> '
13936PS4='+ '
13937
13938# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013939LC_ALL=C
13940export LC_ALL
13941LANGUAGE=C
13942export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013943
Matthias Kloseb9621712010-04-24 17:59:49 +000013944# CDPATH.
13945(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13946
13947
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013948# as_fn_error STATUS ERROR [LINENO LOG_FD]
13949# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000013950# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13951# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013952# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000013953as_fn_error ()
13954{
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013955 as_status=$1; test $as_status -eq 0 && as_status=1
13956 if test "$4"; then
13957 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13958 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 fi
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013960 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000013961 as_fn_exit $as_status
13962} # as_fn_error
13963
13964
13965# as_fn_set_status STATUS
13966# -----------------------
13967# Set $? to STATUS, without forking.
13968as_fn_set_status ()
13969{
13970 return $1
13971} # as_fn_set_status
13972
13973# as_fn_exit STATUS
13974# -----------------
13975# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13976as_fn_exit ()
13977{
13978 set +e
13979 as_fn_set_status $1
13980 exit $1
13981} # as_fn_exit
13982
13983# as_fn_unset VAR
13984# ---------------
13985# Portably unset VAR.
13986as_fn_unset ()
13987{
13988 { eval $1=; unset $1;}
13989}
13990as_unset=as_fn_unset
13991# as_fn_append VAR VALUE
13992# ----------------------
13993# Append the text in VALUE to the end of the definition contained in VAR. Take
13994# advantage of any shell optimizations that allow amortized linear growth over
13995# repeated appends, instead of the typical quadratic growth present in naive
13996# implementations.
13997if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13998 eval 'as_fn_append ()
13999 {
14000 eval $1+=\$2
14001 }'
14002else
14003 as_fn_append ()
14004 {
14005 eval $1=\$$1\$2
14006 }
14007fi # as_fn_append
14008
14009# as_fn_arith ARG...
14010# ------------------
14011# Perform arithmetic evaluation on the ARGs, and store the result in the
14012# global $as_val. Take advantage of shells that can avoid forks. The arguments
14013# must be portable across $(()) and expr.
14014if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14015 eval 'as_fn_arith ()
14016 {
14017 as_val=$(( $* ))
14018 }'
14019else
14020 as_fn_arith ()
14021 {
14022 as_val=`expr "$@" || test $? -eq 1`
14023 }
14024fi # as_fn_arith
14025
14026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014027if expr a : '\(a\)' >/dev/null 2>&1 &&
14028 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14029 as_expr=expr
14030else
14031 as_expr=false
14032fi
14033
14034if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14035 as_basename=basename
14036else
14037 as_basename=false
14038fi
14039
Matthias Kloseb9621712010-04-24 17:59:49 +000014040if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14041 as_dirname=dirname
14042else
14043 as_dirname=false
14044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014046as_me=`$as_basename -- "$0" ||
14047$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14048 X"$0" : 'X\(//\)$' \| \
14049 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014050$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014051 sed '/^.*\/\([^/][^/]*\)\/*$/{
14052 s//\1/
14053 q
14054 }
14055 /^X\/\(\/\/\)$/{
14056 s//\1/
14057 q
14058 }
14059 /^X\/\(\/\).*/{
14060 s//\1/
14061 q
14062 }
14063 s/.*/./; q'`
14064
Matthias Kloseb9621712010-04-24 17:59:49 +000014065# Avoid depending upon Character Ranges.
14066as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14067as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14068as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14069as_cr_digits='0123456789'
14070as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014071
14072ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014073case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014074-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014075 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014076 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014077 xy) ECHO_C='\c';;
14078 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14079 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014080 esac;;
14081*)
14082 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014083esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014084
Martin v. Löwis11437992002-04-12 09:54:03 +000014085rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014086if test -d conf$$.dir; then
14087 rm -f conf$$.dir/conf$$.file
14088else
14089 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014090 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014092if (echo >conf$$.file) 2>/dev/null; then
14093 if ln -s conf$$.file conf$$ 2>/dev/null; then
14094 as_ln_s='ln -s'
14095 # ... but there are two gotchas:
14096 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14097 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14098 # In both cases, we have to default to `cp -p'.
14099 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14100 as_ln_s='cp -p'
14101 elif ln conf$$.file conf$$ 2>/dev/null; then
14102 as_ln_s=ln
14103 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014104 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014105 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014106else
14107 as_ln_s='cp -p'
14108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014109rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14110rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014111
Matthias Kloseb9621712010-04-24 17:59:49 +000014112
14113# as_fn_mkdir_p
14114# -------------
14115# Create "$as_dir" as a directory, including parents if necessary.
14116as_fn_mkdir_p ()
14117{
14118
14119 case $as_dir in #(
14120 -*) as_dir=./$as_dir;;
14121 esac
14122 test -d "$as_dir" || eval $as_mkdir_p || {
14123 as_dirs=
14124 while :; do
14125 case $as_dir in #(
14126 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14127 *) as_qdir=$as_dir;;
14128 esac
14129 as_dirs="'$as_qdir' $as_dirs"
14130 as_dir=`$as_dirname -- "$as_dir" ||
14131$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14132 X"$as_dir" : 'X\(//\)[^/]' \| \
14133 X"$as_dir" : 'X\(//\)$' \| \
14134 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14135$as_echo X"$as_dir" |
14136 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14137 s//\1/
14138 q
14139 }
14140 /^X\(\/\/\)[^/].*/{
14141 s//\1/
14142 q
14143 }
14144 /^X\(\/\/\)$/{
14145 s//\1/
14146 q
14147 }
14148 /^X\(\/\).*/{
14149 s//\1/
14150 q
14151 }
14152 s/.*/./; q'`
14153 test -d "$as_dir" && break
14154 done
14155 test -z "$as_dirs" || eval "mkdir $as_dirs"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014156 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014157
14158
14159} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014160if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014161 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014162else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014163 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014164 as_mkdir_p=false
14165fi
14166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014167if test -x / >/dev/null 2>&1; then
14168 as_test_x='test -x'
14169else
14170 if ls -dL / >/dev/null 2>&1; then
14171 as_ls_L_option=L
14172 else
14173 as_ls_L_option=
14174 fi
14175 as_test_x='
14176 eval sh -c '\''
14177 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014178 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014179 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014180 case $1 in #(
14181 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014182 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014183 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014184 ???[sx]*):;;*)false;;esac;fi
14185 '\'' sh
14186 '
14187fi
14188as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014189
14190# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014191as_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 +000014192
14193# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014194as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014195
14196
Martin v. Löwis11437992002-04-12 09:54:03 +000014197exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014198## ----------------------------------- ##
14199## Main body of $CONFIG_STATUS script. ##
14200## ----------------------------------- ##
14201_ASEOF
14202test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014203
Matthias Kloseb9621712010-04-24 17:59:49 +000014204cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14205# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014206# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014207# values after options handling.
14208ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014209This file was extended by python $as_me 3.2, which was
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014210generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014211
14212 CONFIG_FILES = $CONFIG_FILES
14213 CONFIG_HEADERS = $CONFIG_HEADERS
14214 CONFIG_LINKS = $CONFIG_LINKS
14215 CONFIG_COMMANDS = $CONFIG_COMMANDS
14216 $ $0 $@
14217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014218on `(hostname || uname -n) 2>/dev/null | sed 1q`
14219"
14220
Martin v. Löwis11437992002-04-12 09:54:03 +000014221_ACEOF
14222
Matthias Kloseb9621712010-04-24 17:59:49 +000014223case $ac_config_files in *"
14224"*) set x $ac_config_files; shift; ac_config_files=$*;;
14225esac
14226
14227case $ac_config_headers in *"
14228"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14229esac
14230
14231
14232cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014233# Files that config.status was made for.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014234config_files="$ac_config_files"
14235config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014237_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014238
Matthias Kloseb9621712010-04-24 17:59:49 +000014239cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014240ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014241\`$as_me' instantiates files and other configuration actions
14242from templates according to the current configuration. Unless the files
14243and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014244
Matthias Kloseb9621712010-04-24 17:59:49 +000014245Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014246
14247 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014248 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014249 --config print configuration, then exit
14250 -q, --quiet, --silent
14251 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014252 -d, --debug don't remove temporary files
14253 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014254 --file=FILE[:TEMPLATE]
14255 instantiate the configuration file FILE
14256 --header=FILE[:TEMPLATE]
14257 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014258
14259Configuration files:
14260$config_files
14261
14262Configuration headers:
14263$config_headers
14264
Matthias Kloseb9621712010-04-24 17:59:49 +000014265Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014268cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14269ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014270ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014271python config.status 3.2
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014272configured by $0, generated by GNU Autoconf 2.67,
Matthias Kloseb9621712010-04-24 17:59:49 +000014273 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014274
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014275Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014276This config.status script is free software; the Free Software Foundation
14277gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014278
14279ac_pwd='$ac_pwd'
14280srcdir='$srcdir'
14281INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014282test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014283_ACEOF
14284
Matthias Kloseb9621712010-04-24 17:59:49 +000014285cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14286# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014287ac_need_defaults=:
14288while test $# != 0
14289do
14290 case $1 in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014291 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014292 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14293 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014294 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014295 ;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014296 --*=)
14297 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14298 ac_optarg=
14299 ac_shift=:
14300 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014301 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014302 ac_option=$1
14303 ac_optarg=$2
14304 ac_shift=shift
14305 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014306 esac
14307
Skip Montanaro6dead952003-09-25 14:50:04 +000014308 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014309 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014310 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14311 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014312 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014313 $as_echo "$ac_cs_version"; exit ;;
14314 --config | --confi | --conf | --con | --co | --c )
14315 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014316 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014317 debug=: ;;
14318 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014319 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014320 case $ac_optarg in
14321 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014322 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 esac
14324 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014325 ac_need_defaults=false;;
14326 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014327 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014328 case $ac_optarg in
14329 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14330 esac
14331 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014332 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014333 --he | --h)
14334 # Conflict between --help and --header
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014335 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014336Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014337 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014338 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014339 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14340 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14341 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014342
14343 # This is an error.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014344 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014345Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014346
Matthias Kloseb9621712010-04-24 17:59:49 +000014347 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014348 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014349
14350 esac
14351 shift
14352done
14353
Skip Montanaro6dead952003-09-25 14:50:04 +000014354ac_configure_extra_args=
14355
14356if $ac_cs_silent; then
14357 exec 6>/dev/null
14358 ac_configure_extra_args="$ac_configure_extra_args --silent"
14359fi
14360
14361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014362cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014363if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014364 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14365 shift
14366 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14367 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014368 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014370fi
14371
Martin v. Löwis11437992002-04-12 09:54:03 +000014372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014373cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014374exec 5>>config.log
14375{
14376 echo
14377 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14378## Running $as_me. ##
14379_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014380 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014381} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014382
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014384cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014385_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014386
Matthias Kloseb9621712010-04-24 17:59:49 +000014387cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014388
14389# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014390for ac_config_target in $ac_config_targets
14391do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014392 case $ac_config_target in
14393 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14394 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14395 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014396 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14397 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014398 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14399 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014400 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014401
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014402 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014403 esac
14404done
14405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014406
Martin v. Löwis11437992002-04-12 09:54:03 +000014407# If the user did not use the arguments to specify the items to instantiate,
14408# then the envvar interface is used. Set only those that are not.
14409# We use the long form for the default assignment because of an extremely
14410# bizarre bug on SunOS 4.1.3.
14411if $ac_need_defaults; then
14412 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14413 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14414fi
14415
Skip Montanaro6dead952003-09-25 14:50:04 +000014416# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014417# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014418# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014419# Hook for its removal unless debugging.
14420# Note that there is a small window in which the directory will not be cleaned:
14421# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014422$debug ||
14423{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014424 tmp=
14425 trap 'exit_status=$?
14426 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14427' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014428 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014429}
Martin v. Löwis11437992002-04-12 09:54:03 +000014430# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014431
Martin v. Löwis11437992002-04-12 09:54:03 +000014432{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014433 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014434 test -n "$tmp" && test -d "$tmp"
14435} ||
14436{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014437 tmp=./conf$$-$RANDOM
14438 (umask 077 && mkdir "$tmp")
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014439} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014440
Matthias Kloseb9621712010-04-24 17:59:49 +000014441# Set up the scripts for CONFIG_FILES section.
14442# No need to generate them if there are no CONFIG_FILES.
14443# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014444if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014445
Matthias Kloseb9621712010-04-24 17:59:49 +000014446
14447ac_cr=`echo X | tr X '\015'`
14448# On cygwin, bash can eat \r inside `` if the user requested igncr.
14449# But we know of no other shell where ac_cr would be empty at this
14450# point, so we can use a bashism as a fallback.
14451if test "x$ac_cr" = x; then
14452 eval ac_cr=\$\'\\r\'
14453fi
14454ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14455if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014456 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014457else
14458 ac_cs_awk_cr=$ac_cr
14459fi
14460
14461echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014462_ACEOF
14463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464
Matthias Kloseb9621712010-04-24 17:59:49 +000014465{
14466 echo "cat >conf$$subs.awk <<_ACEOF" &&
14467 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14468 echo "_ACEOF"
14469} >conf$$subs.sh ||
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014470 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14471ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014472ac_delim='%!_!# '
14473for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014474 . ./conf$$subs.sh ||
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014475 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014476
Matthias Kloseb9621712010-04-24 17:59:49 +000014477 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14478 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479 break
14480 elif $ac_last_try; then
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014481 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014482 else
14483 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014484 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014485done
Matthias Kloseb9621712010-04-24 17:59:49 +000014486rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487
Matthias Kloseb9621712010-04-24 17:59:49 +000014488cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14489cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014491sed -n '
14492h
14493s/^/S["/; s/!.*/"]=/
14494p
14495g
14496s/^[^!]*!//
14497:repl
14498t repl
14499s/'"$ac_delim"'$//
14500t delim
14501:nl
14502h
14503s/\(.\{148\}\)..*/\1/
14504t more1
14505s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14506p
14507n
14508b repl
14509:more1
14510s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14511p
14512g
14513s/.\{148\}//
14514t nl
14515:delim
14516h
14517s/\(.\{148\}\)..*/\1/
14518t more2
14519s/["\\]/\\&/g; s/^/"/; s/$/"/
14520p
14521b
14522:more2
14523s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14524p
14525g
14526s/.\{148\}//
14527t delim
14528' <conf$$subs.awk | sed '
14529/^[^""]/{
14530 N
14531 s/\n//
14532}
14533' >>$CONFIG_STATUS || ac_write_fail=1
14534rm -f conf$$subs.awk
14535cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14536_ACAWK
14537cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14538 for (key in S) S_is_set[key] = 1
14539 FS = ""
14540
14541}
14542{
14543 line = $ 0
14544 nfields = split(line, field, "@")
14545 substed = 0
14546 len = length(field[1])
14547 for (i = 2; i < nfields; i++) {
14548 key = field[i]
14549 keylen = length(key)
14550 if (S_is_set[key]) {
14551 value = S[key]
14552 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14553 len += length(value) + length(field[++i])
14554 substed = 1
14555 } else
14556 len += 1 + keylen
14557 }
14558
14559 print line
14560}
14561
14562_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014564cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14565if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14566 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14567else
14568 cat
14569fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014570 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014571_ACEOF
14572
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014573# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14574# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014575# trailing colons and then remove the whole line if VPATH becomes empty
14576# (actually we leave an empty line to preserve line numbers).
14577if test "x$srcdir" = x.; then
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014578 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14579h
14580s///
14581s/^/:/
14582s/[ ]*$/:/
14583s/:\$(srcdir):/:/g
14584s/:\${srcdir}:/:/g
14585s/:@srcdir@:/:/g
14586s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014587s/:*$//
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014588x
14589s/\(=[ ]*\).*/\1/
14590G
14591s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014592s/^[^=]*=[ ]*$//
14593}'
14594fi
14595
Matthias Kloseb9621712010-04-24 17:59:49 +000014596cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014597fi # test -n "$CONFIG_FILES"
14598
Matthias Kloseb9621712010-04-24 17:59:49 +000014599# Set up the scripts for CONFIG_HEADERS section.
14600# No need to generate them if there are no CONFIG_HEADERS.
14601# This happens for instance with `./config.status Makefile'.
14602if test -n "$CONFIG_HEADERS"; then
14603cat >"$tmp/defines.awk" <<\_ACAWK ||
14604BEGIN {
14605_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014606
Matthias Kloseb9621712010-04-24 17:59:49 +000014607# Transform confdefs.h into an awk script `defines.awk', embedded as
14608# here-document in config.status, that substitutes the proper values into
14609# config.h.in to produce config.h.
14610
14611# Create a delimiter string that does not exist in confdefs.h, to ease
14612# handling of long lines.
14613ac_delim='%!_!# '
14614for ac_last_try in false false :; do
14615 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14616 if test -z "$ac_t"; then
14617 break
14618 elif $ac_last_try; then
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014619 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014620 else
14621 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14622 fi
14623done
14624
14625# For the awk script, D is an array of macro values keyed by name,
14626# likewise P contains macro parameters if any. Preserve backslash
14627# newline sequences.
14628
14629ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14630sed -n '
14631s/.\{148\}/&'"$ac_delim"'/g
14632t rset
14633:rset
14634s/^[ ]*#[ ]*define[ ][ ]*/ /
14635t def
14636d
14637:def
14638s/\\$//
14639t bsnl
14640s/["\\]/\\&/g
14641s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14642D["\1"]=" \3"/p
14643s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14644d
14645:bsnl
14646s/["\\]/\\&/g
14647s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14648D["\1"]=" \3\\\\\\n"\\/p
14649t cont
14650s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14651t cont
14652d
14653:cont
14654n
14655s/.\{148\}/&'"$ac_delim"'/g
14656t clear
14657:clear
14658s/\\$//
14659t bsnlc
14660s/["\\]/\\&/g; s/^/"/; s/$/"/p
14661d
14662:bsnlc
14663s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14664b cont
14665' <confdefs.h | sed '
14666s/'"$ac_delim"'/"\\\
14667"/g' >>$CONFIG_STATUS || ac_write_fail=1
14668
14669cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14670 for (key in D) D_is_set[key] = 1
14671 FS = ""
14672}
14673/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14674 line = \$ 0
14675 split(line, arg, " ")
14676 if (arg[1] == "#") {
14677 defundef = arg[2]
14678 mac1 = arg[3]
14679 } else {
14680 defundef = substr(arg[1], 2)
14681 mac1 = arg[2]
14682 }
14683 split(mac1, mac2, "(") #)
14684 macro = mac2[1]
14685 prefix = substr(line, 1, index(line, defundef) - 1)
14686 if (D_is_set[macro]) {
14687 # Preserve the white space surrounding the "#".
14688 print prefix "define", macro P[macro] D[macro]
14689 next
14690 } else {
14691 # Replace #undef with comments. This is necessary, for example,
14692 # in the case of _POSIX_SOURCE, which is predefined and required
14693 # on some systems where configure will not decide to define it.
14694 if (defundef == "undef") {
14695 print "/*", prefix defundef, macro, "*/"
14696 next
14697 }
14698 }
14699}
14700{ print }
14701_ACAWK
14702_ACEOF
14703cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014704 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014705fi # test -n "$CONFIG_HEADERS"
14706
14707
14708eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14709shift
14710for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014711do
14712 case $ac_tag in
14713 :[FHLC]) ac_mode=$ac_tag; continue;;
14714 esac
14715 case $ac_mode$ac_tag in
14716 :[FHL]*:*);;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014717 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014718 :[FH]-) ac_tag=-:-;;
14719 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14720 esac
14721 ac_save_IFS=$IFS
14722 IFS=:
14723 set x $ac_tag
14724 IFS=$ac_save_IFS
14725 shift
14726 ac_file=$1
14727 shift
14728
14729 case $ac_mode in
14730 :L) ac_source=$1;;
14731 :[FH])
14732 ac_file_inputs=
14733 for ac_f
14734 do
14735 case $ac_f in
14736 -) ac_f="$tmp/stdin";;
14737 *) # Look for the file first in the build tree, then in the source tree
14738 # (if the path is not absolute). The absolute path cannot be DOS-style,
14739 # because $ac_f cannot contain `:'.
14740 test -f "$ac_f" ||
14741 case $ac_f in
14742 [\\/$]*) false;;
14743 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14744 esac ||
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014745 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014746 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014747 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14748 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014749 done
14750
14751 # Let's still pretend it is `configure' which instantiates (i.e., don't
14752 # use $as_me), people would be surprised to read:
14753 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014754 configure_input='Generated from '`
14755 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14756 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014757 if test x"$ac_file" != x-; then
14758 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014759 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14760$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014761 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014762 # Neutralize special characters interpreted by sed in replacement strings.
14763 case $configure_input in #(
14764 *\&* | *\|* | *\\* )
14765 ac_sed_conf_input=`$as_echo "$configure_input" |
14766 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14767 *) ac_sed_conf_input=$configure_input;;
14768 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014769
14770 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014771 *:-:* | *:-) cat >"$tmp/stdin" \
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014772 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014773 esac
14774 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014775 esac
14776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014777 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014778$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014779 X"$ac_file" : 'X\(//\)[^/]' \| \
14780 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014781 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014782$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014783 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14784 s//\1/
14785 q
14786 }
14787 /^X\(\/\/\)[^/].*/{
14788 s//\1/
14789 q
14790 }
14791 /^X\(\/\/\)$/{
14792 s//\1/
14793 q
14794 }
14795 /^X\(\/\).*/{
14796 s//\1/
14797 q
14798 }
14799 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014800 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014801 ac_builddir=.
14802
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014803case "$ac_dir" in
14804.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14805*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014806 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014807 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014808 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014809 case $ac_top_builddir_sub in
14810 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14811 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14812 esac ;;
14813esac
14814ac_abs_top_builddir=$ac_pwd
14815ac_abs_builddir=$ac_pwd$ac_dir_suffix
14816# for backward compatibility:
14817ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014818
14819case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014820 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014821 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014822 ac_top_srcdir=$ac_top_builddir_sub
14823 ac_abs_top_srcdir=$ac_pwd ;;
14824 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014825 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014826 ac_top_srcdir=$srcdir
14827 ac_abs_top_srcdir=$srcdir ;;
14828 *) # Relative name.
14829 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14830 ac_top_srcdir=$ac_top_build_prefix$srcdir
14831 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014832esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014833ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014834
Martin v. Löwis11437992002-04-12 09:54:03 +000014835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014836 case $ac_mode in
14837 :F)
14838 #
14839 # CONFIG_FILE
14840 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014841
14842 case $INSTALL in
14843 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014844 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014845 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014846_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014847
Matthias Kloseb9621712010-04-24 17:59:49 +000014848cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014849# If the template does not know about datarootdir, expand it.
14850# FIXME: This hack should be removed a few years after 2.60.
14851ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014852ac_sed_dataroot='
14853/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014854 p
14855 q
14856}
14857/@datadir@/p
14858/@docdir@/p
14859/@infodir@/p
14860/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014861/@mandir@/p'
14862case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014863*datarootdir*) ac_datarootdir_seen=yes;;
14864*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014865 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14866$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014868cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014869 ac_datarootdir_hack='
14870 s&@datadir@&$datadir&g
14871 s&@docdir@&$docdir&g
14872 s&@infodir@&$infodir&g
14873 s&@localedir@&$localedir&g
14874 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014875 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014876esac
14877_ACEOF
14878
14879# Neutralize VPATH when `$srcdir' = `.'.
14880# Shell code in configure.ac might set extrasub.
14881# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014882cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14883ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014884$extrasub
14885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014886cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014887:t
14888/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014889s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014890s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014891s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014892s&@srcdir@&$ac_srcdir&;t t
14893s&@abs_srcdir@&$ac_abs_srcdir&;t t
14894s&@top_srcdir@&$ac_top_srcdir&;t t
14895s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14896s&@builddir@&$ac_builddir&;t t
14897s&@abs_builddir@&$ac_abs_builddir&;t t
14898s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14899s&@INSTALL@&$ac_INSTALL&;t t
14900$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014901"
14902eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014903 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014905test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14906 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14907 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014909which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014910$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014911which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014912
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014914 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014915 -) cat "$tmp/out" && rm -f "$tmp/out";;
14916 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14917 esac \
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014918 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919 ;;
14920 :H)
14921 #
14922 # CONFIG_HEADER
14923 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014924 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014925 {
14926 $as_echo "/* $configure_input */" \
14927 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14928 } >"$tmp/config.h" \
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014929 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014930 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14931 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14932$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014933 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014934 rm -f "$ac_file"
14935 mv "$tmp/config.h" "$ac_file" \
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014936 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014937 fi
14938 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014939 $as_echo "/* $configure_input */" \
14940 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014941 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014942 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014943 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014944
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945
14946 esac
14947
14948done # for ac_tag
14949
Guido van Rossum627b2d71993-12-24 10:39:16 +000014950
Matthias Kloseb9621712010-04-24 17:59:49 +000014951as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014952_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014953ac_clean_files=$ac_clean_files_save
14954
Matthias Kloseb9621712010-04-24 17:59:49 +000014955test $ac_write_fail = 0 ||
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014956 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014957
Martin v. Löwis11437992002-04-12 09:54:03 +000014958
14959# configure is writing to config.log, and then calls config.status.
14960# config.status does its own redirection, appending to config.log.
14961# Unfortunately, on DOS this fails, as config.log is still kept open
14962# by configure, so config.status won't be able to write to it; its
14963# output is simply discarded. So we exec the FD to /dev/null,
14964# effectively closing config.log, so it can be properly (re)opened and
14965# appended to by config.status. When coming back to configure, we
14966# need to make the FD available again.
14967if test "$no_create" != yes; then
14968 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014969 ac_config_status_args=
14970 test "$silent" = yes &&
14971 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000014973 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000014974 exec 5>>config.log
14975 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14976 # would make configure fail if this is the last instruction.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014977 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000014978fi
14979if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14980 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14981$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014982fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014983
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014984
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014985echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014986if test ! -f Modules/Setup
14987then
14988 cp $srcdir/Modules/Setup.dist Modules/Setup
14989fi
14990
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014991echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014992if test ! -f Modules/Setup.local
14993then
14994 echo "# Edit this file for local setup changes" >Modules/Setup.local
14995fi
14996
14997echo "creating Makefile"
14998$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
14999 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015000 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015001mv config.c Modules